SlideShare a Scribd company logo
1 of 5
www.H2KINFOSYS.com || Training@H2KInfosys.com || H2KInfosys@Gmail.com
USA: +1-770-777-1269 || UK: +44-0203-371-7165
www.H2KINFOSYS.com || Training@H2KInfosys.com || H2KInfosys@Gmail.com
USA: +1-770-777-1269 || UK: +44-0203-371-7165
www.H2KINFOSYS.com || Training@H2KInfosys.com || H2KInfosys@Gmail.com
USA: +1-770-777-1269 || UK: +44-0203-371-7165
www.H2KINFOSYS.com || Training@H2KInfosys.com || H2KInfosys@Gmail.com
USA: +1-770-777-1269 || UK: +44-0203-371-7165
www.H2KINFOSYS.com || Training@H2KInfosys.com || H2KInfosys@Gmail.com
USA: +1-770-777-1269 || UK: +44-0203-371-7165
www.H2KINFOSYS.com || Training@H2KInfosys.com || H2KInfosys@Gmail.com
USA: +1-770-777-1269 || UK: +44-0203-371-7165
Tips and Hints for Developing Automated Test Scripts
1) Debug Scripts Incrementally
Recorded test scripts, like other software development efforts, can become quite large. Hundreds of lines of codes will
need debugging for successful playback, which might contain several sets of data for parameterized data driven test
scripts. The common approach to debugging a test script is to first record all the business processes and requirements,
then have the tester play back the test script to identify and correct any problems. The tester continues to debug the test
script until it successfully plays back with a single set of data and/or multiple sets of data.
Debugging and troubleshooting test scripts becomes extremely tedious and intractable when the test script has hundreds
of lines of code, verification points, branching logic, error handling, parameters, and data correlation among various
recorded business processes. A much more manageable approach to debugging complex and lengthy test scripts is to
record portions of the script and debug these portions individually before recording other parts of the test script. After
testing individual portions, you can determine how one portion of the test script works with another portion and how data
flows from one recorded process to the other. After all sections for a test script have been recorded, one can playback the
entire test script and ensure that it properly plays back from the beginning to the end with one or more sets of data.
2) Test Script Synchronization
Test tools can play back recorded test script at rates much faster than an end-user's manual keystrokes. Subsequently
this can overwhelm the application under test since the application might not display data or retrieve values from the
database fast enough to allow proper test script playback. When the test application cannot respond to the test script, the
script execution can terminate abruptly thus requiring user intervention. In order to synchronize applications under test
and test scripts during playback, the testing team introduces artificial wait times within the recorded test scripts. Wait times
embedded in the test script meant to slow down the test script execution are at best arbitrary and estimated through trial
and error. The main problem with wait times is that they either wait too long or not long enough.
For instance, the tester might notice the test script is playing back too fast for the application under test. He might decide
to slow it down several times until the test script execution is synchronized with the test application. This technique can
backfire--even fail--if the application is running slower than the newly introduced wait times during test execution due to
external factors such as the LAN having delays or system maintenance. In this scenario, the tester would have to
continually guess a new reasonable wait time--each time. Slowing down a script with wait times is not very scientific and
does not contribute to the creation of a robust automated test script that plays back successfully without user intervention.
If possible, testers should avoid introducing artificial wait times or arbitrary sleep variables to synchronize test scripts with
the application. "While" statements or nested "loops" are appropriate techniques used to synchronize test scripts that
require synchronization points and will playback successfully regardless of the response times of the application under
test. Inserting "nested" loops or "while" statements within a test script also reduces user intervention during the test script
playback. For example, I insert "while" statements in recorded test scripts that continually press the Enter button until a
scheduling agreement is created no matter how long the application under test takes to generate the agreement. The test
script works independently of the response times for the application under test.
3) Signed-off, Peer Reviewed
As part of the test readiness review criteria, test scripts should be formally accepted and approved prior to starting the test
cycle. SMEs, business analysts, and developers should be involved in approving recorded test scripts. The tester writing
the automated test script should demonstrate that the test script successfully plays back in the QA environment and, if
possible, with various sets of data.
4) Recording, Playing Back Against Hidden Objects
www.H2KINFOSYS.com || Training@H2KInfosys.com || H2KInfosys@Gmail.com
USA: +1-770-777-1269 || UK: +44-0203-371-7165
www.H2KINFOSYS.com || Training@H2KInfosys.com || H2KInfosys@Gmail.com
USA: +1-770-777-1269 || UK: +44-0203-371-7165
Scripts might be recorded to populate or double click values for a field within a table grid or an array where the location of
this field is not fixed. If the field's location within a table grid or array changes from the time it was recorded, the script
might fail during playback. Test scripts often fail during playback because the locations of objects that are not displayed or
visible within the screen have changed.
In order to playback scripts that are location sensitive or where the location is subject to change, it might be necessary to
enhance the script with functionality such as "scroll down," "next page," or "find." Including such utilities ensure that
hidden objects requiring playback will be identified, populated, and/or double-clicked regardless of their location within an
array, table grid, or the displayed screen.
5) Documentation
To make test scripts reusable and easier to maintain, document all relevant information for executing the test script, a test
script header, and any special conditions for execution of the test script. For example:
1. Adjust dates within the application under test for closing of the books,
2. Update any fields that require unique data,
3. Display settings for context sensitive/analog/bitmap recording,
4. List other test scripts that are dependencies,
5. Specify necessary authorization levels or user roles for executing the script,
6. Conditions under which the script can fail and work around for re-launching the script,
7. Applications that need to be either opened or closed during the script execution, and
8. Specific data formats, for instance, European date format versus US date format, etc.
Furthermore, scripts should contain a header with a description (i.e. what it is used for) and its particular purpose (i.e.
regression testing). The script header should also include the script author and owner, creation and modification date,
requirement identifiers that the script traces back to, the business area that the script supports, and number of variables
and parameters for the script. Providing this information in the test script header facilitates the execution, modification,
and maintenance of the script for future testing efforts.
6) Perform Version Control on Test Scripts
Many corporations spend tens of thousands of dollars for test tools, but ignore the by-product of the test tool -- namely the
recorded test script. For companies building libraries and repositories of automated test scripts, it is highly advisable to
perform version control on automated test scripts. Version control helps to track changes made to the test scripts, and to
maintain multiple versions of the same test script.
7) Adhere to Test Script Naming Standards and Storage
Test scripts should follow the project's accepted naming standards and should be stored in the designated repository such
as a shared drive or test management tool.
The test manager should designate naming standards for the test scripts that include information for these areas:
1. Project name (i.e. GSI which stands for Global SAP Implementation),
2. Release number (i.e. version or release number that will be released/deployed,
3. Subject area or test category (i.e. SC for Security Testing, LT for Load Testing),
4. Sequential test case number
5. Title or function that will be tested (i.e. procurement from external vendors).
Following these tips enable testers to build more robust test scripts for their organizations. Also, developing maintainable
test scripts maximizes the benefits of automated test tools. Companies can realize ROI from automated test tools when
automated test scripts are used for future testing efforts, reducing the time needed to complete a testing cycle. The
techniques above will help companies build test scripts that will meet these objectives.
www.H2KINFOSYS.com || Training@H2KInfosys.com || H2KInfosys@Gmail.com
USA: +1-770-777-1269 || UK: +44-0203-371-7165
www.H2KINFOSYS.com || Training@H2KInfosys.com || H2KInfosys@Gmail.com
USA: +1-770-777-1269 || UK: +44-0203-371-7165
Thank you
H2KInfosys

More Related Content

More from H2Kinfosys

HealthCare Project Test Case writing guidelines
HealthCare Project Test Case writing guidelinesHealthCare Project Test Case writing guidelines
HealthCare Project Test Case writing guidelinesH2Kinfosys
 
Letters test cases
Letters test casesLetters test cases
Letters test casesH2Kinfosys
 
Health Care Project Testing Process
Health Care Project Testing ProcessHealth Care Project Testing Process
Health Care Project Testing ProcessH2Kinfosys
 
Test Plan Template
Test Plan TemplateTest Plan Template
Test Plan TemplateH2Kinfosys
 
Test Plan Template
Test Plan TemplateTest Plan Template
Test Plan TemplateH2Kinfosys
 
ETL Testing Interview Questions and Answers
ETL Testing Interview Questions and AnswersETL Testing Interview Questions and Answers
ETL Testing Interview Questions and AnswersH2Kinfosys
 
CRM Project - H2Kinfosys
CRM Project - H2KinfosysCRM Project - H2Kinfosys
CRM Project - H2KinfosysH2Kinfosys
 
Online Banking Business Requirement Document
Online Banking Business Requirement DocumentOnline Banking Business Requirement Document
Online Banking Business Requirement DocumentH2Kinfosys
 
Online Shopping Cart Business Requirement Dcoument
Online Shopping Cart Business Requirement DcoumentOnline Shopping Cart Business Requirement Dcoument
Online Shopping Cart Business Requirement DcoumentH2Kinfosys
 
QA Interview Questions With Answers
QA Interview Questions With AnswersQA Interview Questions With Answers
QA Interview Questions With AnswersH2Kinfosys
 
Basic Interview Questions
Basic Interview QuestionsBasic Interview Questions
Basic Interview QuestionsH2Kinfosys
 
SDLC software testing
SDLC software testingSDLC software testing
SDLC software testingH2Kinfosys
 

More from H2Kinfosys (12)

HealthCare Project Test Case writing guidelines
HealthCare Project Test Case writing guidelinesHealthCare Project Test Case writing guidelines
HealthCare Project Test Case writing guidelines
 
Letters test cases
Letters test casesLetters test cases
Letters test cases
 
Health Care Project Testing Process
Health Care Project Testing ProcessHealth Care Project Testing Process
Health Care Project Testing Process
 
Test Plan Template
Test Plan TemplateTest Plan Template
Test Plan Template
 
Test Plan Template
Test Plan TemplateTest Plan Template
Test Plan Template
 
ETL Testing Interview Questions and Answers
ETL Testing Interview Questions and AnswersETL Testing Interview Questions and Answers
ETL Testing Interview Questions and Answers
 
CRM Project - H2Kinfosys
CRM Project - H2KinfosysCRM Project - H2Kinfosys
CRM Project - H2Kinfosys
 
Online Banking Business Requirement Document
Online Banking Business Requirement DocumentOnline Banking Business Requirement Document
Online Banking Business Requirement Document
 
Online Shopping Cart Business Requirement Dcoument
Online Shopping Cart Business Requirement DcoumentOnline Shopping Cart Business Requirement Dcoument
Online Shopping Cart Business Requirement Dcoument
 
QA Interview Questions With Answers
QA Interview Questions With AnswersQA Interview Questions With Answers
QA Interview Questions With Answers
 
Basic Interview Questions
Basic Interview QuestionsBasic Interview Questions
Basic Interview Questions
 
SDLC software testing
SDLC software testingSDLC software testing
SDLC software testing
 

Recently uploaded

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 

Recently uploaded (20)

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 

Tips Hints For Developing Automation Testing QTP

  • 1. www.H2KINFOSYS.com || Training@H2KInfosys.com || H2KInfosys@Gmail.com USA: +1-770-777-1269 || UK: +44-0203-371-7165 www.H2KINFOSYS.com || Training@H2KInfosys.com || H2KInfosys@Gmail.com USA: +1-770-777-1269 || UK: +44-0203-371-7165
  • 2. www.H2KINFOSYS.com || Training@H2KInfosys.com || H2KInfosys@Gmail.com USA: +1-770-777-1269 || UK: +44-0203-371-7165 www.H2KINFOSYS.com || Training@H2KInfosys.com || H2KInfosys@Gmail.com USA: +1-770-777-1269 || UK: +44-0203-371-7165
  • 3. www.H2KINFOSYS.com || Training@H2KInfosys.com || H2KInfosys@Gmail.com USA: +1-770-777-1269 || UK: +44-0203-371-7165 www.H2KINFOSYS.com || Training@H2KInfosys.com || H2KInfosys@Gmail.com USA: +1-770-777-1269 || UK: +44-0203-371-7165 Tips and Hints for Developing Automated Test Scripts 1) Debug Scripts Incrementally Recorded test scripts, like other software development efforts, can become quite large. Hundreds of lines of codes will need debugging for successful playback, which might contain several sets of data for parameterized data driven test scripts. The common approach to debugging a test script is to first record all the business processes and requirements, then have the tester play back the test script to identify and correct any problems. The tester continues to debug the test script until it successfully plays back with a single set of data and/or multiple sets of data. Debugging and troubleshooting test scripts becomes extremely tedious and intractable when the test script has hundreds of lines of code, verification points, branching logic, error handling, parameters, and data correlation among various recorded business processes. A much more manageable approach to debugging complex and lengthy test scripts is to record portions of the script and debug these portions individually before recording other parts of the test script. After testing individual portions, you can determine how one portion of the test script works with another portion and how data flows from one recorded process to the other. After all sections for a test script have been recorded, one can playback the entire test script and ensure that it properly plays back from the beginning to the end with one or more sets of data. 2) Test Script Synchronization Test tools can play back recorded test script at rates much faster than an end-user's manual keystrokes. Subsequently this can overwhelm the application under test since the application might not display data or retrieve values from the database fast enough to allow proper test script playback. When the test application cannot respond to the test script, the script execution can terminate abruptly thus requiring user intervention. In order to synchronize applications under test and test scripts during playback, the testing team introduces artificial wait times within the recorded test scripts. Wait times embedded in the test script meant to slow down the test script execution are at best arbitrary and estimated through trial and error. The main problem with wait times is that they either wait too long or not long enough. For instance, the tester might notice the test script is playing back too fast for the application under test. He might decide to slow it down several times until the test script execution is synchronized with the test application. This technique can backfire--even fail--if the application is running slower than the newly introduced wait times during test execution due to external factors such as the LAN having delays or system maintenance. In this scenario, the tester would have to continually guess a new reasonable wait time--each time. Slowing down a script with wait times is not very scientific and does not contribute to the creation of a robust automated test script that plays back successfully without user intervention. If possible, testers should avoid introducing artificial wait times or arbitrary sleep variables to synchronize test scripts with the application. "While" statements or nested "loops" are appropriate techniques used to synchronize test scripts that require synchronization points and will playback successfully regardless of the response times of the application under test. Inserting "nested" loops or "while" statements within a test script also reduces user intervention during the test script playback. For example, I insert "while" statements in recorded test scripts that continually press the Enter button until a scheduling agreement is created no matter how long the application under test takes to generate the agreement. The test script works independently of the response times for the application under test. 3) Signed-off, Peer Reviewed As part of the test readiness review criteria, test scripts should be formally accepted and approved prior to starting the test cycle. SMEs, business analysts, and developers should be involved in approving recorded test scripts. The tester writing the automated test script should demonstrate that the test script successfully plays back in the QA environment and, if possible, with various sets of data. 4) Recording, Playing Back Against Hidden Objects
  • 4. www.H2KINFOSYS.com || Training@H2KInfosys.com || H2KInfosys@Gmail.com USA: +1-770-777-1269 || UK: +44-0203-371-7165 www.H2KINFOSYS.com || Training@H2KInfosys.com || H2KInfosys@Gmail.com USA: +1-770-777-1269 || UK: +44-0203-371-7165 Scripts might be recorded to populate or double click values for a field within a table grid or an array where the location of this field is not fixed. If the field's location within a table grid or array changes from the time it was recorded, the script might fail during playback. Test scripts often fail during playback because the locations of objects that are not displayed or visible within the screen have changed. In order to playback scripts that are location sensitive or where the location is subject to change, it might be necessary to enhance the script with functionality such as "scroll down," "next page," or "find." Including such utilities ensure that hidden objects requiring playback will be identified, populated, and/or double-clicked regardless of their location within an array, table grid, or the displayed screen. 5) Documentation To make test scripts reusable and easier to maintain, document all relevant information for executing the test script, a test script header, and any special conditions for execution of the test script. For example: 1. Adjust dates within the application under test for closing of the books, 2. Update any fields that require unique data, 3. Display settings for context sensitive/analog/bitmap recording, 4. List other test scripts that are dependencies, 5. Specify necessary authorization levels or user roles for executing the script, 6. Conditions under which the script can fail and work around for re-launching the script, 7. Applications that need to be either opened or closed during the script execution, and 8. Specific data formats, for instance, European date format versus US date format, etc. Furthermore, scripts should contain a header with a description (i.e. what it is used for) and its particular purpose (i.e. regression testing). The script header should also include the script author and owner, creation and modification date, requirement identifiers that the script traces back to, the business area that the script supports, and number of variables and parameters for the script. Providing this information in the test script header facilitates the execution, modification, and maintenance of the script for future testing efforts. 6) Perform Version Control on Test Scripts Many corporations spend tens of thousands of dollars for test tools, but ignore the by-product of the test tool -- namely the recorded test script. For companies building libraries and repositories of automated test scripts, it is highly advisable to perform version control on automated test scripts. Version control helps to track changes made to the test scripts, and to maintain multiple versions of the same test script. 7) Adhere to Test Script Naming Standards and Storage Test scripts should follow the project's accepted naming standards and should be stored in the designated repository such as a shared drive or test management tool. The test manager should designate naming standards for the test scripts that include information for these areas: 1. Project name (i.e. GSI which stands for Global SAP Implementation), 2. Release number (i.e. version or release number that will be released/deployed, 3. Subject area or test category (i.e. SC for Security Testing, LT for Load Testing), 4. Sequential test case number 5. Title or function that will be tested (i.e. procurement from external vendors). Following these tips enable testers to build more robust test scripts for their organizations. Also, developing maintainable test scripts maximizes the benefits of automated test tools. Companies can realize ROI from automated test tools when automated test scripts are used for future testing efforts, reducing the time needed to complete a testing cycle. The techniques above will help companies build test scripts that will meet these objectives.
  • 5. www.H2KINFOSYS.com || Training@H2KInfosys.com || H2KInfosys@Gmail.com USA: +1-770-777-1269 || UK: +44-0203-371-7165 www.H2KINFOSYS.com || Training@H2KInfosys.com || H2KInfosys@Gmail.com USA: +1-770-777-1269 || UK: +44-0203-371-7165 Thank you H2KInfosys