Selenium

advertisement
Ashesh Jain
2007EE50403
Manager
Amit Maheshwari
Test Automation
Framework
What is Test Automation?
 Use of software to control the execution of tests
 Comparing actual and predicted outcomes
 Test Report generation
 Mailing the test report
 UI testing application
 To check if UI elements are functioning properly
Work Assigned
 Write Test Cases
 Design a framework for running test cases
 Integrating test cases with the nightly build
 Design a UI to run selective test cases
UI Testing
 How application handles keyboard and mouse input
 How it displays screen text, images, buttons, menus,
dialog boxes, toolbars
 Different UI testing tools: Quick Test
Professional(QTP), Selenium, HP QuickTest
Professional etc.
Software Used
 Selenium IDE and Selenium RC
 Maven
 JBoss, TOMCAT
 Eclipse IDE
Selenium
Has two major components
 Selenium IDE
 Selenium RC
Selenium IDE
 Building Test Cases
 Operates as Firefox add on
 Has a recording & playback feature
 Tests created in it can also be run against other
browsers by using Selenium-RC
Selenium RC
 Allows
the use of programming language in
developing test logic
 Provides an API and library for each of its supported
languages: HTML, Java, C#, Perl, PHP and Python
 Tests developed on Firefox can be executed on any
other browser via Selenium-RC command line
Writing Test Cases
 HTML test script is generated using Selenium IDE
recording feature
 HTML script is converted to a java code, this feature
is provided by Selenium IDE
 Required logic is coded in java
 The java code can be run using Selenium RC
Pre-requisites for running Test Cases
 Selenium RC server should be up
 Application war file should be installed in maven
local repository and deployed on JBoss
Framework
Provided the following features:
 Integrating test cases with the nightly build
 During nightly build all the test cases are executed
 Provides a UI to run a specific test case
Integration with nightly built
1.
2.
3.
4.
5.
6.
7.
8.
Performed SVN checkout
Started JBoss server
Deployed war file on JBoss server
Started Selenium RC server
Executed test cases
Stop Selenium RC server
Stop JBoss server
Mail test report
Key Points
 All the tasks were performed from a single pom file
 Application directory structure was unchanged
 Both the directory structures were independent of
each other
 This simplified the task of integrating test cases with
the nightly build
Directory Structure
Master POM
 Contains SVN checkout code
 Updates app and soapclient
 Executes pom-1 and then pom-2
POM-1
 Creates “app-version-uat.war”
 Installs it in maven local repository
Tasks Performed by POM-2
 Starts JBoss server
 Looks for “app-version-uat.war” in maven local




repository and deploy it on JBoss
Starts Selenium RC server
Execute test cases
Stop Selenium RC server
Stop JBoss server
Flowchart
Executing specific test case
 UI was made from which a user can choose which
test cases to execute
 Particularly useful after nightly build to check for
failed tests
 UI is created by reading data from an xml file
UI
Steps
Key Points
 SVN checkout is not performed
 Application war file should be already installed in
maven local repository
 Testers have to maintain only 3 files: SSOA.xml,
config.xml and testdata.xls
Targets achieved
 Framework was designed
 End to end working of the framework was
demonstrated
 Test cases were integrated with nightly build
 UI for executing selective test cases was designed
 Sample test cases were written
What I Learned
 About the structure of RBS
 How software development is done and what are the
different cycles involved
 I was given a fresh project on which no previous
work was done, which provided me with the
opportunity to tackle the different problems faced
during the initial stages of software development
 Learned about maven which is extensively used in
software development
Thank YOU!!
Download