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

Test Automation Framework Ashesh Jain 2007EE50403 Manager Amit Maheshwari.

Dec 16, 2015

Download

Documents

Lucas Crowner
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Test Automation Framework Ashesh Jain 2007EE50403 Manager Amit Maheshwari.

Test Automation Framework

Ashesh Jain

2007EE50403

Manager

Amit Maheshwari

Click icon to add picture

Page 2: Test Automation Framework Ashesh Jain 2007EE50403 Manager Amit Maheshwari.

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

Page 3: Test Automation Framework Ashesh Jain 2007EE50403 Manager Amit Maheshwari.

Work Assigned

Write Test CasesDesign a framework for running test casesIntegrating test cases with the nightly buildDesign a UI to run selective test cases

Page 4: Test Automation Framework Ashesh Jain 2007EE50403 Manager Amit Maheshwari.

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.

Page 5: Test Automation Framework Ashesh Jain 2007EE50403 Manager Amit Maheshwari.

Software Used

Selenium IDE and Selenium RCMavenJBoss, TOMCATEclipse IDE

Page 6: Test Automation Framework Ashesh Jain 2007EE50403 Manager Amit Maheshwari.

Selenium

Has two major componentsSelenium IDESelenium RC

Page 7: Test Automation Framework Ashesh Jain 2007EE50403 Manager Amit Maheshwari.

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

Page 8: Test Automation Framework Ashesh Jain 2007EE50403 Manager Amit Maheshwari.

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

Page 9: Test Automation Framework Ashesh Jain 2007EE50403 Manager Amit Maheshwari.

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

Page 10: Test Automation Framework Ashesh Jain 2007EE50403 Manager Amit Maheshwari.

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

Page 11: Test Automation Framework Ashesh Jain 2007EE50403 Manager Amit Maheshwari.

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

Page 12: Test Automation Framework Ashesh Jain 2007EE50403 Manager Amit Maheshwari.

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

Page 13: Test Automation Framework Ashesh Jain 2007EE50403 Manager Amit Maheshwari.

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

Page 14: Test Automation Framework Ashesh Jain 2007EE50403 Manager Amit Maheshwari.

Directory Structure

Page 15: Test Automation Framework Ashesh Jain 2007EE50403 Manager Amit Maheshwari.

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

Page 16: Test Automation Framework Ashesh Jain 2007EE50403 Manager Amit Maheshwari.

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

Page 17: Test Automation Framework Ashesh Jain 2007EE50403 Manager Amit Maheshwari.

Flowchart

Page 18: Test Automation Framework Ashesh Jain 2007EE50403 Manager Amit Maheshwari.

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

Page 19: Test Automation Framework Ashesh Jain 2007EE50403 Manager Amit Maheshwari.

UI

Page 20: Test Automation Framework Ashesh Jain 2007EE50403 Manager Amit Maheshwari.

Steps

Page 21: Test Automation Framework Ashesh Jain 2007EE50403 Manager Amit Maheshwari.

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

Page 22: Test Automation Framework Ashesh Jain 2007EE50403 Manager Amit Maheshwari.

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

Page 23: Test Automation Framework Ashesh Jain 2007EE50403 Manager Amit Maheshwari.

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

Page 24: Test Automation Framework Ashesh Jain 2007EE50403 Manager Amit Maheshwari.

Thank YOU!!