why automate

22
Software Development Software Development Lifecycle (SLDC) Lifecycle (SLDC) QA process and the automation QA process and the automation process can be different for process can be different for different software lifecycles different software lifecycles 2 most popular SLDC 2 most popular SLDC Agile Agile Waterfall Waterfall

Upload: vladimir-zaremba

Post on 20-Jan-2015

422 views

Category:

Documents


4 download

DESCRIPTION

automation for beginners

TRANSCRIPT

Page 1: Why Automate

Software Development Lifecycle Software Development Lifecycle (SLDC)(SLDC)

►QA process and the automation QA process and the automation process can be different for different process can be different for different software lifecyclessoftware lifecycles

►2 most popular SLDC2 most popular SLDC►AgileAgile►WaterfallWaterfall

Page 2: Why Automate

AgileAgile

►Complete software development is Complete software development is broken in many sprints.broken in many sprints.

►For every sprint, certain software For every sprint, certain software features need to be completedfeatures need to be completed

►Each sprint is typically 2 to 3 weeksEach sprint is typically 2 to 3 weeks

Page 3: Why Automate

QA process for AgileQA process for Agile

►2 kinds of testing needs to be done:2 kinds of testing needs to be done:►New feature testing- Make sure new New feature testing- Make sure new

features working properlyfeatures working properly►Regression testing- Make sure features Regression testing- Make sure features

from last weeks are still workingfrom last weeks are still working Regression testing are automated. Tests Regression testing are automated. Tests

for new features from each sprint are for new features from each sprint are added to existing automation tests.added to existing automation tests.

Page 4: Why Automate

WaterfallWaterfall

►Waterfall SLDC consists of following Waterfall SLDC consists of following steps:steps: IdeaIdea AnalysisAnalysis DesignDesign DevelopmentDevelopment TestTest Final productFinal product

Page 5: Why Automate

QA process for WaterfallQA process for Waterfall

►Test case is prepared after Design and Test case is prepared after Design and before Developmentbefore Development

►Automation is done after development Automation is done after development when Software is relatively stable when Software is relatively stable (towards the middle of test period)(towards the middle of test period)

►Generally Smoke test and Regression Generally Smoke test and Regression tests are automatedtests are automated

Page 6: Why Automate

Automation TestingAutomation Testing

► Simulates actual user testing the softwareSimulates actual user testing the software► Based on scripting languagesBased on scripting languages QTP – VBSQTP – VBS Selenium – Perl, Ruby, Python etcSelenium – Perl, Ruby, Python etc Rational robot – SQABasic (similar to visual Rational robot – SQABasic (similar to visual

basic)basic) PAMIE – PythonPAMIE – Python►High initial cost/effort High initial cost/effort ► Pays off when used for long time.Pays off when used for long time.

Page 7: Why Automate

When to Automate?When to Automate?

►When same tests need to be When same tests need to be performed on an application performed on an application repeatedly, automation comes handy. repeatedly, automation comes handy.

►Regression testing to check features Regression testing to check features are working properlyare working properly

►enter massive amount of data to the enter massive amount of data to the application to facilitate next level of application to facilitate next level of testing (manual/automated)testing (manual/automated)

Page 8: Why Automate

Why Automate?Why Automate?

► Fast - Much faster in populating data and testing Fast - Much faster in populating data and testing themthem

► Reliable - tireless. no fatigueReliable - tireless. no fatigue► Repeatable – same scenario can be recreated again Repeatable – same scenario can be recreated again

and again following exact same steps.and again following exact same steps.► programmable-expert users can program tests programmable-expert users can program tests

using standard VBSusing standard VBS► Reusable - can use the tests even after the Reusable - can use the tests even after the

application changedapplication changed► unattended testing - keeps testing without the unattended testing - keeps testing without the

presence of a tester (generally done over night to presence of a tester (generally done over night to morning)morning)

Page 9: Why Automate

Why Automate?Why Automate?

►detailed test report - generates helpful detailed test report - generates helpful reportreport

►maintain log of software health - QTP maintain log of software health - QTP reports can show what was the over all reports can show what was the over all health of the software health of the software

Page 10: Why Automate

Test MethodologiesTest Methodologies

► Sanity Test – This test is conducted to determine if Sanity Test – This test is conducted to determine if further testing can be done. This tests the most further testing can be done. This tests the most fundamental functionalities of the software.fundamental functionalities of the software.

► Smoke test – Making sure every basic functionality Smoke test – Making sure every basic functionality of the software is working fine after software is of the software is working fine after software is updated with new codes. This is commonly updated with new codes. This is commonly automatedautomated

► Regression Test – Previously working functionalities Regression Test – Previously working functionalities are still working fine. Automated in most casesare still working fine. Automated in most cases

► Integration test – How a specific part of the Integration test – How a specific part of the software interacting with other parts. software interacting with other parts.

► New feature testing – Testing a feature after New feature testing – Testing a feature after development. Not automated most casesdevelopment. Not automated most cases

Page 11: Why Automate

►Critical Path Testing – Testing for cases Critical Path Testing – Testing for cases that has to work in order for the user to that has to work in order for the user to perform a task. This ignores corner perform a task. This ignores corner cases. Most automation commonly cases. Most automation commonly takes critical pathtakes critical path

►Functional Testing – Testing Functional Testing – Testing calculations, workflowscalculations, workflows

►Format testing – Testing for looks, Format testing – Testing for looks, color, spelling. color, spelling.

Page 12: Why Automate

Sanity->Smoke->RegressionSanity->Smoke->Regression

► Sanity test takes the least amount of time Sanity test takes the least amount of time (less than an hour) to conduct and covers only (less than an hour) to conduct and covers only most fundamental functionalities at high levelmost fundamental functionalities at high level

► Smoke test takes more time than sanity (half Smoke test takes more time than sanity (half day or one day) and this covers all the day or one day) and this covers all the functionality of the software but at high levelfunctionality of the software but at high level

► Regression test takes the most amount of time Regression test takes the most amount of time (one or two weeks) and this covers all (one or two weeks) and this covers all functionality at low level (very detail)functionality at low level (very detail)

Page 13: Why Automate

Steps for automationSteps for automation

► Know the application and functional Know the application and functional specifications. specifications.

► Find out what steps need to be performed to Find out what steps need to be performed to complete the processcomplete the process

► Find out what information from the application Find out what information from the application can tell you if the test passed or failedcan tell you if the test passed or failed

► Create the automation script (navigation and Create the automation script (navigation and checkpoints)checkpoints)

► Analyze the resultAnalyze the result► Verify the result manuallyVerify the result manually► Log bugLog bug

Page 14: Why Automate

Know the application and Know the application and functional specificationsfunctional specifications

►Know spec Know spec ►Know what is expected resultKnow what is expected result►Find out what needs to be testedFind out what needs to be tested

Page 15: Why Automate

Steps to perform the jobSteps to perform the job

►After determining what needs to be After determining what needs to be tested, determine what steps needed tested, determine what steps needed to perform that testto perform that test

►A manual test caseA manual test case►Determine a step by step processDetermine a step by step process

Page 16: Why Automate

Determine good CheckpointDetermine good Checkpoint

► In the application, determine what can In the application, determine what can be good check pointbe good check point

►A check point can be set on an object A check point can be set on an object or value in the application that is or value in the application that is particularly searched and a pass/fail particularly searched and a pass/fail report is createdreport is created

Page 17: Why Automate

AutomationAutomation

►Automate using VBS to navigate with Automate using VBS to navigate with in the applicationin the application

► Insert checkpoints in useful placesInsert checkpoints in useful places

Page 18: Why Automate

Analyze result and log bugAnalyze result and log bug

►View Test result/report. Try to View Test result/report. Try to understand in which step Test failed.understand in which step Test failed.

►Verify assumption by trying out Verify assumption by trying out manuallymanually

► If the assumption is true, log bug.If the assumption is true, log bug.

Page 19: Why Automate

QTPQTP

►Quick Test ProQuick Test Pro►Winrunner is replaced by QTPWinrunner is replaced by QTP►From MercuryFrom Mercury► Integrated with other Mercury product: Integrated with other Mercury product:

Quality Center,Test DirectorQuality Center,Test Director►Record and Play option for simple testsRecord and Play option for simple tests►VBS programming for complex testsVBS programming for complex tests

Page 20: Why Automate

How QTP worksHow QTP works To perform certain tasks, QTP needs to identify objects in the pageTo perform certain tasks, QTP needs to identify objects in the page BrowserBrowser FrameFrame ImageImage LinkLink PagePage ViewLinkViewLink WebAreaWebArea WebButtonWebButton WebCheckBoxWebCheckBox WebEditWebEdit WebElementWebElement WebFileWebFile WebListWebList WebRadioGroupWebRadioGroup WebTable WebTable

Page 21: Why Automate

►There can be many of same object in There can be many of same object in the page but QTP needs to perform an the page but QTP needs to perform an operation on only oneoperation on only one

►QTP separates that object from others QTP separates that object from others by specific properties unique to that by specific properties unique to that objectobject

►QTP defines an object in an QTP defines an object in an hierarchical mannerhierarchical manner

Page 22: Why Automate

► For example, when QTP want to click on For example, when QTP want to click on “Search” on google page:“Search” on google page:

► It first defines the Browser, then defines the It first defines the Browser, then defines the Page, then defines the webbutton (Search is Page, then defines the webbutton (Search is a webbutton)a webbutton)

►QTP needs to identify each of the object QTP needs to identify each of the object uniquely uniquely

►QTP programmer needs to define each QTP programmer needs to define each object such a way that QTP does not confuse object such a way that QTP does not confuse with other objectswith other objects