Beruflich Dokumente
Kultur Dokumente
Sajiya Tariq
Session: 2017-2019
(MSc.IT 4th Semester - Afternoon)
Submitted to:
“Ms. Sajiya Tariq”
Submitted by:
Muneeba MT17110
GROUP # 6
1
SQA PUGC Mrs. Sajiya Tariq
Contents
Tool Overview ........................................................................................................................................................ 3
Individual Task........................................................................................................................................................ 4
Individual Task........................................................................................................................................................ 6
Individual Task........................................................................................................................................................ 8
Individual Task........................................................................................................................................................ 9
Status Report ....................................................................................................................................................... 11
2
SQA PUGC Mrs. Sajiya Tariq
Group # 6
Selenium Tool
Selenium is a set of tools and libraries that automates web browser action. Selenium is not just a single
tool but a suite of software's, each catering to different testing needs of an organization. Selenium is
free, open source, used for functional testing, regression testing and known for reliable performance
and execution speed. It also allows you to run tests in parallel, unlike in other testing tools where you
are only allowed to run tests sequentially. It supports multiple programming languages, operating
systems and browsers. Selenium IDE, RC, grid and Web Driver are four basic components of selenium.
Selenium RC and Web Driver was merged to form Selenium 2. Selenium is flexible and extensible. In
short, selenium is the best tool for testing web application.
Pros
Cons
3
SQA PUGC Mrs. Sajiya Tariq
Individual Task
Group#: 6
Member Name/Roll #: Muneeba Arshad (MT17110)
Project Manager: Nida Zia
Submission Date: 30 August, 2019
Subject: SQA
1. Selenium web driver is used for automating the web-application, but it won’t generate any
reports.
2. The TestNG in selenium web driver will generate the default report.
3. TestNG library provides a very handy reporting features. After execution, testing will generate a
test-output folder at the root of the project.
4. Index.html is a type of TestNG reports and this is complete report of current execution which
contains like error, groups, time, reporter logs, TestNG XML files.
5. Emailable-report.html is the summarize report of the current test execution which contains test
case message in green(for pass test cases) and red (for failed test cases) highlight.
6. After running the selected TestNG suite and refresh the project open the test-output folder we
can see the emailable report.
7. Reporter class is also used to store the object properties file like system generated logs as well
as user generated logs. It is a simplest way to store log information in testing.
8. In test-output folder open the index.html now you can see the test case execution like report
output or time of execution etc.
9. For implementing a reporting class log method, the class has to implement an
org.TestNG.IReporter interface.
10. The log method is used to store log information that is written inside the program. By looking at
the log information, you will easily come to know where exactly the execution of the program is
stopped.
11. TestNG reporting is quite handy but still, sometimes we need some less data in reports or want
to display reports or want to display reports in some other format like pdf, excel etc. or want to
change report’s layout.
12. ITestListener Interface is used to customize real time report. If we are executing the bunch of
test cases in a TestNG suite and we want to get the report of each test case.
13. Firstly create a class and implement method iTestListener in it. Create test method and add class
as a listener in the Test Method Class.
14. After each test case we need to implement ITestListener interface. This will override on Test
Failure, on Test Start, on Test Skipped method to send the correct status of the current test case.
4
SQA PUGC Mrs. Sajiya Tariq
15. IReporter Interface is used to customize final test report generated by TestNG, we need to
implement IReporter Interface.
16. IReporter interface has only one method to implement generate report. This method has all
information of a complete test execution in the List<ISuite>, and we can generate the report
using it.
17. To create pdf report we need a Java API IText. There is another custom listener class which is
actually implementing this IText jar and creating pdf report for us.
18. After creating pdf report we wll use the annotation @AfterSuite to send email of the PDF report.
We will be sending email using Gmail.
19. To enable Email, need to import many library files mail.jar, pop3.jar smptp.jar etc. before run
the code do enter the email and password.
20. Taking the screenshot, in selenium web driver, we need to type cast web driver to
TakeScreenShot interface in case of occurring any error.
5
SQA PUGC Mrs. Sajiya Tariq
Individual Task
Group#: 6
Member Name/Roll #: Nida Zia (MT17118)
Project Manager: Nida Zia
Submission Date: 30 August, 2019
Subject: SQA
Debugging Steps:
6
SQA PUGC Mrs. Sajiya Tariq
15. Entries in the Expressions View can be selected to have more detailed information be displayed
in the Detail Pane. When debugging a Java program, data that contains variables can be
expanded to show the variables and the fields the variables contain.
16. The Breakpoints View lists all the breakpoints we currently have set in our workspace. We can
double-click a breakpoint to display its location in the editor. We can also enable or disable
breakpoints, delete them and add new ones.
17. Eclipse provides buttons in the toolbar for controlling the execution of the program we are
debugging. We can use the F5, F6, F7 and F8 key to step through our coding.
18. F5 (Step into): Executes the currently selected line and goes to the next line in your program. If
the selected line is a method call the debugger steps into the associate code.
19. F6 (Step over): It executes a method without step into the debugger.
20. F7 (Step Return): steps out the caller of the currently executed method. This finishes the
execution of the current method and returns to the caller of this method.
21. F8 (Resume): tells the Eclipse debugger to resume the execution of the program code until it
reaches the next breakpoint.
22. To deactivate a breakpoint, remove the corresponding checkbox in the Breakpoints view. To
delete it you can use the corresponding buttons in the view toolbar.
`
7
SQA PUGC Mrs. Sajiya Tariq
Individual Task
Group#: 6
Member Name/Roll #: Shiba Ansari (MT17139)
Project Manager: Nida Zia
Submission Date: 30 August, 2019
Subject: SQA
8
SQA PUGC Mrs. Sajiya Tariq
Individual Task
Group#: 6
Member Name/Roll #: Sasha Khawar (MT17152)
Project Manager: Nida Zia
Submission Date: 30 August, 2019
Subject: SQA
1. A database management system (DBMS) is a software used to store and manage data. It
guarantees the quality, durability, and confidentiality of information. The most popular type of
DBMS are Relational DBMS. Here the database consist of a structured set of tables and each row
of a table is a record.
2. Structured Query Language (SQL) is the standard language for data manipulation in a DBMS. In
simple words it’s used to talk to the data in a DBMS.
3. For database testing using selenium verification you need to use the MySQL JDBC (Java
Database Connecting).The JDBC is the SQL level API that allows you to execute SQL statements.
4. The JDBC also responsible for the connection between the java programming language and
database. Selenium Web Driver for tests database has not library itself. The JDBC API provides
the classes and interface.
5. Some classes and interface are
o Driver Manager
o Driver
o Connection
o Statement
o Result set
o SQL Exception
6. In order to test your database using selenium you need to observe some steps first of all make a
connection to the database.
7. For built a connection you need to load a driver which helps to connect with database:
Class. for Name(“con.mysql.jdbc.Driver”);
8. The driver loaded by System.out.printIn(“Driver Loaded”);
9. Now make the connection with database for the testing the sytax which is used for connection
with JDBC DriverManager.get connection(URL“userrid”,“password”)for connection you should
give the URL set a password and a username.
10. In this connection the userrid is the “username configured” in database Password of the
configured user. URL is of format (Jdbc:<dbtype>:?//ipaddress:port number/database name )
11. The <dbtype> is driver for the database you are trying to connect. For testing the database the
connection must build correctly.
9
SQA PUGC Mrs. Sajiya Tariq
Connectioncon=DriverManager.getConnection (“jdbc:mysql://hostname:
portnumber/dbname”,“username”,“password”);
Now the connection is built
System.out printIn(“connection to mySQL database”);
12. After creating the connection with database you need to execute the queries for the database
testing by using the selenium
13. You can use the statements object to send the queries
Statement stmt=con.create statement ();
14. We use the JSQL package by this we can execute any queries you want
15. Once the statement object is created use the executeQuery method to execute the SQL Queries.
Stmt. executeQuery(Select * from username);
16. And good thing about java it give you the description of every method what exactly it’s done.
After execute the query we need the result.
17. Result Set has the records whatever the record is present or you have in MySQL command.
18. Now here we need to fetch the data from database from rows and columns. Sometime we need
to delete, update, and the record it totally depend which kind of query you are executing.
For selecting the data for testing you write
ResultSet rs=stmt.executeQuery(“Select * from selenium username”);
19. Once you execute this query everything you get in (r.s) by default it focus on the first record. For
testing the result of the database by using selenium webdriver we write
(rs.next())
{rs.getString(“”)
System.out.printIn(“”)}
10
SQA PUGC Mrs. Sajiya Tariq
Status Report
Group#: 6
Project Name: Selenium Tool
Project Manager: Nida Zia
Report Date: 30 August, 2019
Subject: SQA
11