test automation framework ashesh jain 2007ee50403 manager amit maheshwari

24
Test Automation Framework Ashesh Jain 2007EE50403 Manager Amit Maheshwari Click icon to add picture

Upload: lucas-crowner

Post on 16-Dec-2015

221 views

Category:

Documents


0 download

TRANSCRIPT

Test Automation Framework

Ashesh Jain

2007EE50403

Manager

Amit Maheshwari

Click icon to add picture

What is Test Automation?

Use of software to control the execution of tests

Comparing actual and predicted outcomesTest Report generationMailing the test reportUI testing applicationTo check if UI elements are functioning

properly

Work Assigned

Write Test CasesDesign a framework for running test casesIntegrating test cases with the nightly buildDesign 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 RCMavenJBoss, TOMCATEclipse IDE

Selenium

Has two major componentsSelenium IDESelenium RC

Selenium IDE

Building Test CasesOperates as Firefox add onHas a recording & playback featureTests 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 javaThe java code can be run using Selenium RC

Pre-requisites for running Test Cases

Selenium RC server should be upApplication war file should be installed in

maven local repository and deployed on JBoss

Framework

Provided the following features:Integrating test cases with the nightly buildDuring nightly build all the test cases are

executedProvides a UI to run a specific test case

Integration with nightly built

1. Performed SVN checkout2. Started JBoss server 3. Deployed war file on JBoss server4. Started Selenium RC server5. Executed test cases6. Stop Selenium RC server7. Stop JBoss server8. Mail test report

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

Key Points

Directory Structure

Master POMContains SVN checkout codeUpdates app and soapclientExecutes pom-1 and then pom-2POM-1Creates “app-version-uat.war”Installs it in maven local repository

Tasks Performed by POM-2

Starts JBoss serverLooks for “app-version-uat.war” in maven

local repository and deploy it on JBoss Starts Selenium RC serverExecute test casesStop Selenium RC serverStop 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 performedApplication war file should be already

installed in maven local repositoryTesters have to maintain only 3 files:

SSOA.xml, config.xml and testdata.xls

Targets achieved

Framework was designedEnd to end working of the framework was

demonstratedTest cases were integrated with nightly buildUI for executing selective test cases was

designedSample test cases were written

What I Learned

About the structure of RBSHow software development is done and what

are the different cycles involvedI 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!!