SlideShare a Scribd company logo
Test Automation
Principles, Terminologies & Implementations
Steven Li
Steven004@gmail.com
2
Outline
•Test Automation Principles & Terminologies
 Why Test Automation
 How to do Test Automation
 Terminologies about Test Automation (Sycamore)
•Implement the Terminologies in Automation Scripts
 General Conventions
 An Example - PET
Why Test Automation
4
Top 10 Reasons for Automating Tests - What people said
1. Manual testing sucks.
2. Tool vendor said
“Capture replay works.”
3. Fun to watch the
dialogs popping on the
screen.
4. “Afterwards we can fire
all those pesky
testers.”
5. Everybody else is doing
it.
6. “No humans were
harmed in the testing of
this software.”
7. Big bucks already spent
on the test tool.
8. Looks good on the
resume.
9. No Testing for Dummies
book ... yet.
10.Keep the intern busy.

Recommended for you

Test Management introduction
Test Management introductionTest Management introduction
Test Management introduction

The document discusses test management for software quality assurance, including defining test management as organizing and controlling the testing process and artifacts. It covers the phases of test management like planning, authoring, execution, and reporting. Additionally, it discusses challenges in test management, priorities and classifications for testing, and the role and responsibilities of the test manager.

Software Testing Process
Software Testing ProcessSoftware Testing Process
Software Testing Process

Based on V-Model (Extention of Waterfall model). It describes Test Process. Including Test process,strategy,R&R,Testing model and techniques.

testingistqbunittestintegrationtestsystem
Basic Guide to Manual Testing
Basic Guide to Manual TestingBasic Guide to Manual Testing
Basic Guide to Manual Testing

In this presentation you will get brief idea about software testing, objective of software testing,testing life cycle & testing type.

software quality assurance and testing servicesqa testing services | virtueinfo
5
Reasons for Automating – What people want
• Speed up testing
• Allow more frequent testing
• Reduce manual labor costs
• Improve test coverage
• Ensure consistency
• Simplify testing
• Define the testing process
• Make testing more interesting and challenging
• Develop programming skills
• Justify cost of the tools
• Of course we’ll have automation!
How to do Test Automation
7
Keep it Simple, Sustainable
•Uniform/Common infrastructure
•Appropriate tools
•Manage source code, test data, tools
•Agreed Conventions within the team
•High-quality Scripts
•Gradual Test Automation
8
Quality of Automation Scripts
•Maintainability
 Will the tests still run after product design changes?
 Will tests for 1.0 work with 2.0? And can be easily updated?
•Reviewability
 Can others review and understand what is being covered?
 Are the scripts documented?, can we make sure it matches the original design?
 How about the coverage? How easy another engineer use the scripts for the next
release?
•Reusability
 To what degree the assets can be reused to create more, different tests?
 Can they be reused in different releases, in different environments?
•Dependability
 Integrity
 Reliability
•Repeatability
•Independence
•Performance
•Simplicity

Recommended for you

Hybrid Automation Framework Development introduction
Hybrid Automation Framework Development introductionHybrid Automation Framework Development introduction
Hybrid Automation Framework Development introduction

The document discusses hybrid test automation frameworks. A hybrid framework combines aspects of data-driven and keyword-driven frameworks to eliminate their individual disadvantages. It allows testers to write tests using keywords without coding, while supporting bulk data changes and flexible execution like data-driven frameworks. The document proposes a sample hybrid framework where test data, page objects, and keywords are defined in an Excel file, eliminating the need for code. This provides reusability, maintainability and a low learning curve while maintaining flexibility.

test automationweb driverhybrid framework development
Software testing
Software testingSoftware testing
Software testing

A brief that includes the following: - Software Testing - Quality Assurance - Quality Control - Types of Testing - Levels of Software Testing - Types of Performance Testing - API - Verification & Validation - Test Plan & Testing Strategy - Agile & Waterfall - Software Development Life Cycle - Career Path

software testingagilequality assurance
ISTQB / ISEB Foundation Exam Practice - 5
ISTQB / ISEB Foundation Exam Practice - 5ISTQB / ISEB Foundation Exam Practice - 5
ISTQB / ISEB Foundation Exam Practice - 5

The document discusses various aspects of test management including organizational structures for testing, configuration management, test estimation and monitoring, incident management, and standards for testing. It describes different levels of independence for testing, such as testing by developers, testing by development teams, and independent test teams. It also outlines the importance of configuration management, estimating and measuring test progress, logging incidents, and following standards for quality assurance and industry-specific testing.

software testingistqb certificationiseb
Terminologies for
Test Automation
10
Architecture for Automation
Test Planning Test Preparation Test PerfectingTest Performing
Test Suite
Logical TestBed
Test Case
Test Case
…
Test Case
Test Suite
…
Physical TestBed
Test Case
Test Case
…
Test Case
Test Case
Logical TestBed
Test Case
Test Case
…
Test Case
Test Case
Test Plan
…
Test Step 1
Test Step 2
…
Test Step n
Test Task
…
…
Test Report
Specify TestBed & TestCase List
For a release
Set a task to run a plan
Schedule
Runtime Options+
Schedule
Runtime Options+
Detailed Runtime Information
Detailed TestBed Information
Test Case Result
Test Case Result
…
Test Case Result
Detailed Runtime Information
Detailed TestBed Information
Test Case Result
Test Case Result
…
Test Case Result
Revised
Test Suites
Test Plans
Logical TestBed
Test Case
Test Case
…
Test Case
Physical TestBed
Test Case
Test Case
…
Test Case
Execute a task
11
Test Bed
•Briefly, a test bed is the definition of the environment for a
specified test. A test bed include the hardware/software
and configuration/provisioning.
•There are two kinds of test beds:
 Logical TestBed. A logical test bed depicts all the elements and
configuration required for the test, but not indicate which exactly
elements will be used (i.e. the index or addresses are not required.)
 Physical TestBed. A physical test bed is an instantiation of a logical
test bed. A physical test bed exactly indicates which elements are
used in the test, and a test task can be really run on the test bed.
• Base State of a test bed
 The initial state of the test bed, ready for test case (group) start to
run with it.
 A self-cleaning test case (group) should get the test bed back to the
base state when the execution completed.
12
Test Case (group)
•A test case is a sequence of operations against a system
whose results can be used to determine if a requirement
or use case upon an application of the system is partially
or fully satisfied.
 A test case contains a set of test steps, and based on a particular
test bed.
 A test step is an atomic statement of a test case, can have pass/fail
result. Usually it contains one operation and the expected result.
 A set of test cases can be grouped in a test case file.
•Test Case File (test group):
 A test case file defines one or multiple test cases, which is based on
a clean test bed for running, and do self-cleaning after performing
all the cases one by one.
 A test group are a set of test cases saved in one test case file.

Recommended for you

Test automation process
Test automation processTest automation process
Test automation process

The document discusses test automation process and framework. It provides details on what test automation means, benefits of automation, guidelines for identifying test cases to automate, challenges in automation, and components of an automation framework like data tables, libraries, object repositories, scripts, and results.

automation framework
API Testing With Katalon Studio
API Testing With Katalon StudioAPI Testing With Katalon Studio
API Testing With Katalon Studio

Katalon Studio is a free and robust automation solution for API, Web, and Mobile testing. It integrates all necessary components with built-in keywords and project templates into a complete automation framework. Katalon Studio is easy to use for beginners but still offers advanced capabilities for experienced users. This solution is trusted by an active community of over 150K users from 150+ countries around the world. In this knolx, we’ll take a look at what is API Testing and how the katalon studio is helpful in API Testing.

knolxknoldknow a knolder
Chapter 5 - Test Management
Chapter 5 - Test ManagementChapter 5 - Test Management
Chapter 5 - Test Management

Test Management as Chapter 5 of ISTQB Foundation 2018. Topics covered are Test Organization, Test Planning and Estimation, Test Monitoring and Control, Test Execution Schedule, Test Strategy, Risk and Testing, Defect Management

istqb foundation level certificationistqb foundationistqb
13
Test Suite
•A suite of test cases, which share the same test bed to
verify a specified feature in a specified test area. Usually,
there are multiple test cases in one test suite.
•In automation scripts, a test suite includes:
 A test suite file: to describe the basic information of this test suite
 A logical test bed: to define the test bed which the test suite is
based on
 One or more test case files: each test case file is self-cleaning, so
that each file can run independently.
•Usually, test suite is feature oriented. It can be created
once the feature is introduced, and keep being improved
along the product life, or even product family life.
14
Test Plan
•A test plan is an instantiation of a subset of a test suite, in
which a set of test cases selected for a particular test for a
feature in a program; and indicate the physical test bed
for test performing.
 E.g. we have a BLSR_4F_2Node test suite, then we can make a plan
for SN16K R9.0 BLSR 4F 2Node Regression test, targeted run it in
two days.
•In automation scripts, a test plan includes:
 Test suite path/name
 The physical test bed, which is an instantiation of the logical test bed
 A test case file list, selected from the test suite
•Usually, a test plan is feature and release oriented. For
different releases, one can have different test plan for one
feature. And, a test plan should be defined in the test
preparation stage.
15
Test Task
•Test Task is a runtime concept, it defines when and how to
execute a test plan. Once a test task is executed, a test
report should be reproduced
•In automation scripts, a test task could be a command in
CLI, an item in TMS, or a file, which includes:
 The test plan path/name
 A schedule for the test plan running
 Runtime options, e.g. Halt or skip if any failure? Wait or fail if the
test bed is not available? Recycle or one-time running?
•Multiple test tasks can be created for a test plan, that
means, a test plan can be executed multiple times in a
release.
•Usually, a test task is created in test performing stage by
the tester for one-time running, and will not be reused.
16
Test Report
•A test report is a result record of a test task.
•Test reports can also be organized by test plans or test
suites for broadened view to analyze requirements
satisfaction.
•A test report should have the following information
 Runtime information: e.g. who/where/how had run this task with
what options?
 Detailed test bed information: e.g. build no. for each node, serial
numbers of elements, software versions
 Test results for each case and each step.
•A test report can be valuable just with a specified test bed
on which the test was running.

Recommended for you

ISTQB / ISEB Foundation Exam Practice - 6
ISTQB / ISEB Foundation Exam Practice - 6ISTQB / ISEB Foundation Exam Practice - 6
ISTQB / ISEB Foundation Exam Practice - 6

There are many types of tools that support testing across the entire software development lifecycle. While automation can help improve testing, automating and testing require separate skills. Effective use of tools requires identifying the appropriate tests to automate through planning and effort, while maintaining control over the test automation process. Tools should support requirements testing, static analysis, test design, test data preparation, test execution, comparison, debugging, and test management.

software testingistqb certificationiseb
Manual testing concepts course 1
Manual testing concepts course 1Manual testing concepts course 1
Manual testing concepts course 1

Testing software is conducted to ensure the system meets user needs and requirements. The primary objectives of testing are to verify that the right system was built according to specifications and that it was built correctly. Testing helps instill user confidence, ensures functionality and performance, and identifies any issues where the system does not meet specifications. Different types of testing include unit, integration, system, and user acceptance testing, which are done at various stages of the software development life cycle.

sample-test-plan-template.pdf
sample-test-plan-template.pdfsample-test-plan-template.pdf
sample-test-plan-template.pdf

This document outlines a test plan template for testing a product. It includes sections for objectives and tasks, scope, testing strategy, hardware and environment requirements, test schedule, control procedures, features to be tested, resources and responsibilities, schedules, impacted departments, dependencies, risks, tools, and approvals. The testing strategy section describes the different types of testing to be performed, including unit, integration, performance, user acceptance, batch, regression, and beta testing. It provides definitions and outlines the methodology for each type. The document provides a framework to define all aspects of testing for a project.

17
Outline
•Test Automation Principles & Terminologies
 Why Test Automation
 How to do Test Automation
 Terminologies about Test Automation (Sycamore)
•Implement the Terminologies in Automation Scripts
 General Conventions
 An Example - PET
18
Classic Reasons for Automation Failure
10. No clear objectives for automation.
9. Minimal or No attention of non GUI automation.
8. Lack of methodology to success of the project.
7. Automation is easy Just record and playback. –
6. Aim for 100% automation.
5. Testing for automation scripts.
4. No clarity of real cost involved in automation.
3. Automation is part time job of testers.
2. Wrong selection of Test cases.
1. Not treating automation as software development.
General Conventions
20
A flexible framework
•General framework allows users define format and
language
•User defined languages for:
 Test bed
 Test cases
 Test report
 Test task
 Scheduler ….
•General format
 XML
 Perl, Python
 Simply BDD language,
 Spreadsheet

Recommended for you

Katalon Studio - A Codeless Automation Tool.pdf
Katalon Studio - A Codeless Automation Tool.pdfKatalon Studio - A Codeless Automation Tool.pdf
Katalon Studio - A Codeless Automation Tool.pdf

Katalon Studio is a codeless automation testing tool that allows users to create tests visually without writing code. It uses a drag and drop interface or record and playback functionality to automate tests. Some key benefits of codeless automation with Katalon Studio include reduced test automation time, higher test coverage through increased regression test execution, cross-browser and cross-platform testing capabilities, and integration with continuous integration/continuous delivery tools. The presentation demonstrated Katalon Studio's features for web UI testing, API testing, and code-based versus codeless automation approaches.

quality assurance (qa)automationcodeless automation
Agile Test Management Using Jira and Zephyr
Agile Test Management Using Jira and ZephyrAgile Test Management Using Jira and Zephyr
Agile Test Management Using Jira and Zephyr

Do you have traceability where you can efficiently determine the cause of defects if there was an unclear requirement? Are you sure your test cases cover your requirements? Can you easily execute targeted regression when you’ve updated your software’s functionality? Now with software development teams mostly working from home or in dispersed geographies, supporting effective collaboration between remote workers is critical. In this XBOSoft quarterly webinar, our CEO, Philip Lew, teams up with BDQ’s CEO Chris Bland, to discuss the problems with working remotely, integrating the phases of testing in development in an Agile, and how this can be done using Zephyr, one of the predominant plugins in the Atlassian marketplace for test management. In this webinar, you will learn how to: --Link tests with user stories and group tests within test cycles. --Tie your results (defects) all the way back to user stories for effective defect root cause analysis. --Classify defects to analyze and prioritize your test efforts. --Use the traceability matrix with Zephr for deep visibility into your Agile process.

agile testingagile project managementagile traceability
Enterprise QA and Application Testing Services
Enterprise QA and Application Testing ServicesEnterprise QA and Application Testing Services
Enterprise QA and Application Testing Services

Cygnet’s innovation and insight-driven software testing services have paved way for numerous path-breaking software applications. Our meticulous approach towards application testing eliminates pesky bugs, reduces the time-to-market while optimizing the total-cost-of-ownership.

software testingautomation testingtest automation
21
Plug-in technology
•A platform should support a general framework
•All support simple plug in
•
22
An example: PET
•Pet: Peal Engine for Test
 It is not just for Perl testing, but
 Implement a framework to support different test format
 It is independent to run as an application
 Or, to be used as a library for your bigger framework
•Key engine: Test Recorder
•Download from: https://github.com/steven004/Pet
An example: PET
24
What is Pet?
•Pet – Perl Engine for Test
 Perl: Pet is based on Perl. It can run on almost any platforms
 Engine: It will speed up your work, and provide lots of benefit
 Test: It is designed for test, not just for test execution, but test
management as well
IQstream
WebUI
SN9K/3K/16K
…
Support different products
Console
HTML
TMS
E-Mail
…
TEA XML Perl …
Support different format/language
Support different outputs
Test Plans/Suites
Pet Engine
Library
Key-Words
Objects
…
Test Cases
Test Beds
TestRecorder

Recommended for you

Test Automation Strategies For Agile
Test Automation Strategies For AgileTest Automation Strategies For Agile
Test Automation Strategies For Agile

What are the Key drivers for automation? What are the Challenges in Agile automation and How to deal with them? How to automate? Who will automate? Which tool to select? Commercial or open source? What to automate? Which features? Here is what our experience says

agile indiaagile india 2010post-modern agile
Test Automation Framework Development Introduction
Test Automation Framework Development IntroductionTest Automation Framework Development Introduction
Test Automation Framework Development Introduction

The document discusses test automation frameworks and the page object model pattern. It recommends treating automated testing as software development with principles like separation of concerns. The page object model pattern models pages as objects and allows tests to interact with pages through page object classes. Data driven testing is also discussed where test data is stored externally in spreadsheets or databases and passed into tests.

test automationautomation framework developmentselenium
Test Automation Demonstration with Dr Yongyan Wang by XBOSoft
Test Automation Demonstration with Dr Yongyan Wang by XBOSoftTest Automation Demonstration with Dr Yongyan Wang by XBOSoft
Test Automation Demonstration with Dr Yongyan Wang by XBOSoft

Dr. Yongyan Wang presented on a test automation framework (TAF). Some key points: - TAF is an open source framework for automating repeatable tasks across different languages/tools. It uses a distributed architecture. - Challenges addressed include making automation independent of test/tool types and ensuring consistency. TAF's design focuses on repeatability, adaptability, and a simple web interface. - A demonstration showed how TAF can simplify test management and provide pass/fail reports. It also integrates other tools like AutoIt and allows command-line usage. - TAF aims to make automation easy, reliable, reusable, and independent through its structured approach and extens

software testing. test automation
25
Why you need Pet?
•TestRecorder Module embedded in Pet
 You will get test results via different channels
 Console output, HTML files for Web, E-mail notification, TMS database, and more if you request
 All the channels can be configured, you can select any of them as you like/need when running your scripts.
 A bunch of test recorder functions provided
•Multi-format supported for scripts writing
 Pure-perl
 TEA format compliant
 Or mix-programming
 You can use Perl in your TEA case file; or use TEA format in Perl scripts
 Spreadsheet cases
• Scripts running control
 A mechanism provided to run scripts case by case, or step by step
 Runtime control provided, by “Ctrl-c”
 Failure handling, for collect information in your scripts.
 Error handling, If there is some syntax problem in your scripts, Pet
will let you know.
26
How to run Pet – the 1st
step
• Pet looks complicated, but we make it simple
• Let’s start
a. Log into an automation Server using your unix account
• 172.21.7.200 (Shanghai) or 172.31.115.6 (Chicago)
• Run Pet
-bash-3.2$ pet
/usr/bin/pet requires arguments. Try ‘pet –h’ for help.
-bash-3.2$ pet -h
Usage: Pet [-cnhpv] [testplanfile] [switches] [arguments]
-u UserName indicate the who is running the test scripts. Pet will get the user name from OS if no this option
-h print Usage hints
-l OutputDir indicate the output directory of log. tmppetusername will be used for the default output directory
-m the mail address for test result reports
-v print version, subversion <includes VERY IMPORTANT Pet functionality info>
-d [:debugger] run program under debugger (future)
-b BuildNumber indicate the build number of the system/software under test
-n new a test plan file in current directory based on the existing test bed and test case files
-p parse the test plan and print the case list to the standard output
-r ReleaseName indicate the release name/number of the system/software under test
-o [tms/console/html/xml/txt] indicate the environment of the Pet. Local run by default
-c Pet will just check test bed availability, instead running all cases in the test case list
-t TaskID indicate the test task ID for TMS. This option is just required by TMS to run the Pet
-f
[KEEP_RUNNING/STOP_ON_STEP_FAIL/STOP_ON_CASE_FAIL/PROMPT_ON_FAIL/PROMPT_BY_STEP/PROMPT_BY_CASE/T
EST_QUIT] continue the program or stop it when there is a case fail
27
Pet running examples
•Run a Perl file
 $ pet example.pl –r 1.0
•Run a Perl-format test plan
 $ pet example_pl.xml –r 1.2 –b B2.8
•Run a Tea-format test plan
 $ pet example_tea.xml –r 1.2 –b B2.7 –m steven004@gmail.com
•More parameters
 $ pet example_tea.xml –r 1.2 –b B2.7 –u xli –m
steven004@gmail.com –t 53432 –o CONSOLE – l /tmp/xli
•Parse TestPlan
 $pet –p exampletp.xml
28
Outline
•Pet Basic
•Quick Start
 Understand test plan, test suite, test bed and test suite
 Create your own test task
 Testbed modification
 Testcase files selection
 Where you get the results?
 Email, HTML, TMS?
•I want to do some change
•Advanced: How can I use Pet to write scripts
•Dig into Pet

Recommended for you

24 collections framework interview questions
24 collections framework interview questions24 collections framework interview questions
24 collections framework interview questions

The document discusses 24 interview questions related to Java Collections Framework. It covers common questions about the key interfaces and classes in Collections like HashMap, ArrayList, Vector, Iterator, differences between HashMap and Hashtable, fail-fast property, and more. Example questions include what is difference between Iterator and ListIterator, when to use Hashtable vs HashMap, how to make a HashMap synchronized, and importance of hashCode() and equals() methods.

Resume q.surveyor - amanat ali (updated)
Resume   q.surveyor - amanat ali (updated)Resume   q.surveyor - amanat ali (updated)
Resume q.surveyor - amanat ali (updated)

Amanat Ali has over 18 years of experience as a quantity surveyor and civil estimator. He has worked on numerous construction projects in Pakistan and Afghanistan for companies like ADEEL Construction, Descon Engineering, Lakeshore Toltest Corp, and Central Asia Development Group. His responsibilities have included cost estimation, budget management, procurement, and contract administration. He has a diploma in quantity surveying and skills in AutoCAD, MS Office, and construction estimation software.

29
Terms – Test Plan/Bed/Suite/Task/Report
•See details in
 Previous slides
•Pet is to run a test plan in which
 Test Bed, Test Suite, Test Case list are specified
•A test plan example
<?xml version="1.0" encoding="UTF-8" ?>



<TestPlan
SuiteFile="../exampleSuite.pl"
PhysicalTestBedFile="../PhysicalTestBeds/example_tb.ttb">
<TestCases>
<File>../TestCases/example_tc.ttc</File>
</TestCases>
</TestPlan>
! Use Relative paths in your test plan, instead of absolute ones !
30
Create your own test task
•Create/Modify TestBed file
•Create/Modify test plan file
 Indicate the test suite file
 Indicate the test bed file
 TestCase files selection
 Again, Use the relative paths, instead of absolute ones
•Demo …
31
Where is my test results?
•Important Environment Variables
 Get it by running ‘set’ in Linux
-bash-3.2$ set
…
TESTMAILTO=steven004@gmail.com #results will be sent to this mail.
TESTRECOPT='TESTSUMMARY|TESTDETAIL|TESTLOG|ERRORLOG|WARNINGLOG|INFOLOG|DEBUGLOG‘
# All logs will be recorded
TESTRECPATH=/shared1/users/IQstream_Result/auto_pet/output/
#The place to save output results
TESTRECTO='CONSOLE|HTML|EMAIL‘ #You can get results through Console, Email and HTML files.
…
•Demo…
32
Outline
•Pet Basic
•Quick Start
•I want to do some change
 Use default output options
 Set Pet Environment Variables
 TESTRECOPT, TESTRECPATH, TESTRECTO, TESTMAILTO
 Set Pet Options in your scripts
•Advanced: How can I use Pet to write scripts
•Dig into Pet

Recommended for you

Carnestoltes 2017
Carnestoltes 2017Carnestoltes 2017
Carnestoltes 2017

Carnestoltes 2017

Automation Framework 042009 V2
Automation Framework   042009  V2Automation Framework   042009  V2
Automation Framework 042009 V2

The document describes NexOS's test automation framework, which takes a hybrid approach combining test script modularity, library-driven testing, and data-driven testing. It utilizes VBScript library files for different application partitions and generic functions. Test data is stored in Excel files and imported into QTP. Results are recorded in an Access database and Quality Center. Scripts follow guidelines for components and are executed from Quality Center or manually from the test lab.

Cucumber questions
Cucumber questionsCucumber questions
Cucumber questions

The document contains questions and answers related to Cucumber integration with Selenium. It discusses how to integrate Cucumber and Selenium by creating a Maven project and adding the Cucumber dependency. It also addresses the need for a feature file and step definition file to run Cucumber tests and the use of tags to filter scenarios. Finally, it compares Cucumber to other frameworks like JBehave and RSpec.

software developmentsoftware testing
33
All about TestRecorder
•TestRecorder Manual
 https://github.com/steven004/Pet/blob/master/Documents/TestReco
rder.htm
•TestRecorder Training Slides
 https://github.com/steven004/Pet/blob/master/Documents/Use
%20PET%20step%20by%20step.ppt
•Default TestRecorder Options had been set in automation
servers for all users
 For TestRECTO, TESTRECPATH, TESTRECOPT
•You need to set TESTMAILTO
•You can also set your own Recorder Options in your profile
34
Use different options for a particular test
•Two ways to go
 1) Specify your options as arguments when you run your test
 pet myplan.xml –m notme@abc.com –r 1.2 –b 1 –l /tmp/xli/
 This time, notme@abc.com will get the result, and all results
files will be save in /tmp/xli in the automation server
 pet myplan.xml –u goldman –r 1.2 –b 3.8 –f STOP_ON_CASE_FAIL
 This time, pet will think the goldman is running the scripts, instead of
you, the one log into the server, and scripts will stop once there is a
case fail.
 2) Set in your scripts (not recommended)
 See more in TestRecorder Training Slides
35
Outline
•Pet Basic
•Quick Start
•I want to do some change
•Advanced: How can I use Pet to write scripts
 Call Flow in Pet
 TestSuite file writing
 TestBed & TestCase file
 Pure Perl programming
 TEA format programming
 Mix-mode programming
•Dig into Pet
36
Call Flow in Pet
•Typical call flow
Import TestSuite
(run testsuite file)
Import TestBed
(run PhyTestBed file)
TestBed Setup
Test Start
Test End
TestBed Cleanup
Run CaseFiles #1
#2
…
#n
Case, Step & TestLog
related functions (defined
in TestRecorder) can be
used here, and all activities
will be recorded by Pet.

Recommended for you

Leyenda de Sant Jordi
Leyenda de Sant JordiLeyenda de Sant Jordi
Leyenda de Sant Jordi

Este documento presenta la leyenda de Sant Jordi, el patrón de Cataluña. Narra cómo un dragón amenazaba una aldea y se iba comiendo a sus habitantes. Un día, le tocó en el sorteo a la princesa más querida ser sacrificada al dragón. Sin embargo, apareció Sant Jordi cabalgando y mató al dragón con su espada, salvando a la princesa. En conmemoración a esta leyenda, el 23 de abril en Cataluña las mujeres regalan libros y los hombres rosas a sus parejas.

cultura. tradiciones. leyendas
How To Transform the Manual Testing Process to Incorporate Test Automation
How To Transform the Manual Testing Process to Incorporate Test AutomationHow To Transform the Manual Testing Process to Incorporate Test Automation
How To Transform the Manual Testing Process to Incorporate Test Automation

Although most testing organizations have some automation, it's usually a subset of their overall testing efforts. Typically the processes have been previously defined, and the automation team must adapt accordingly. The major issue is that test automation work and deliverables do not always fit into a defined manual testing process. Learn how to transform your manual testing procedures and how to incorporate test automation into your overall testing process.

ranorextest automation webinar
Selenium for Jobseekers
Selenium for JobseekersSelenium for Jobseekers
Selenium for Jobseekers

Selenium for Jobseekers (How Indeed uses Selenium to submit job applications) For Selenium Conference, Bangalore, 2016

seleniumcase study
37
TestSuite file
•TestSuite file has to be a Perl file
•It could be very simple
•The simplest example:
# A Test Suite Example
use IQsteam::Objects; # it means you will test a IQstream system
•The TestSuite.pl template:
## use the necessary packages here
use IQsteam::Objects;
sub TestBedSetup {
#add your scripts here#
1;
}
sub TestBedClearup {
#add your scripts here#
1;
}
1;
38
TestSuite file is serving the test suite
•Anything related to the test suite should be defined in it
•It may contain
 The packages to be used in the test suite
 The attributes of the test suite
 Test Bed base state definition (TestBed Setup)
 How to recover the test bed after test completes
 Any variables/data to be used in the test suite, but not related to a
particular physical test bed
 Any functions definition for test cases & Test bed initiation
 E.g. the testsuite.pl defined for Lab Pcap running
39
TestBed & Test Case files
•Test Bed design
 Define variables/data related to particular test beds, i.e. Any
parameters may change when you change your test bed to do the
same test
•Test Case file design
 Test Case file is just to define test procedures
 Test Case files should not be modified when you run your test on
different test beds
 Case / Step / TestLog related functions defined in TestRecorder will
be used in TestCase Files
 Test Cases defined in one TestCase file should be self-clean for
better test plan making
40
TestBed & TestCase Files – Pure Perl
•TestBed Example (from WebUI test suite)
our $BrowserType='*iexplore';
our $BrowserURL='http://172.21.5.109';
our $CNIPAddress='172.21.5.109';
our $client_IP='172.21.160.154';
our $PortNumber='4444';
 All the definitions are about the particular test bed, and can be easily
changed when you run it in another test bed.
•TestSuite Example
CaseStart(“Just an example");
{
InfoMsg(“All the following steps should pass!");
Step(3*2==6, "3*2==6");
Like(“Shanghai”, “Sh”, “Shanghai =~ Sh");
Is(3*2, 6, "3*2 is 6?");
} CaseEnd();
……
CaseStart(“Other Cases….”); {…} CaseEnd();
More Functions, please
see TestRecorder Manual

Recommended for you

Font Analysis
Font AnalysisFont Analysis
Font Analysis

The document discusses font choices for a pop magazine called "We Love Pop". It considers fonts with hearts, flowers, stars, and simplistic designs that could fit the pop genre. A heart font is chosen for the masthead to represent love and follow conventions of pop magazines. Handwriting fonts will provide a personal connection for the readership while basic texts convey facts. A mixture of bold and childish fonts on the final cover design make the magazine fit the pop genre visually.

media
Laws of test automation framework
Laws of test automation frameworkLaws of test automation framework
Laws of test automation framework

The document discusses three "laws of test automation framework": 1) Test frameworks will continue growing unless changes are made, leading to complex step definitions and refactoring issues. 2) The more complex ("messy") a test framework becomes, the more effort is required to maintain it. 3) Changes to test frameworks can cause pushback from business and technical issues like merge conflicts and build failures. The document promotes a Model-View-Controller approach to structure Cucumber tests to improve code quality and maintainability. Declarative styles are preferable to imperative to make tests more robust to business changes. Regular monitoring, desk checks, and appropriate timing of changes can help address challenges.

laws of automation framework
F5 Networks - - OpenStack Summit 2016/Red Hat NFV Mini Summit
F5 Networks -  - OpenStack Summit 2016/Red Hat NFV Mini SummitF5 Networks -  - OpenStack Summit 2016/Red Hat NFV Mini Summit
F5 Networks - - OpenStack Summit 2016/Red Hat NFV Mini Summit

F5 Networks presentation on protocol normalization, given at OpenStack Summit 2016 in Barcelona, Red Hat NFV Mini Summit. Includes F5/Red Hat collaboration description.

nfvf5 networksred hat

More Related Content

What's hot

How to Design a Successful Test Automation Strategy
How to Design a Successful Test Automation Strategy How to Design a Successful Test Automation Strategy
How to Design a Successful Test Automation Strategy
Impetus Technologies
 
Test Automation Best Practices (with SOA test approach)
Test Automation Best Practices (with SOA test approach)Test Automation Best Practices (with SOA test approach)
Test Automation Best Practices (with SOA test approach)
Leonard Fingerman
 
QA process Presentation
QA process PresentationQA process Presentation
QA process Presentation
Nadeeshani Aththanagoda
 
Test Management introduction
Test Management introductionTest Management introduction
Test Management introduction
Oana Feidi
 
Software Testing Process
Software Testing ProcessSoftware Testing Process
Software Testing Process
guest1f2740
 
Basic Guide to Manual Testing
Basic Guide to Manual TestingBasic Guide to Manual Testing
Basic Guide to Manual Testing
Hiral Gosani
 
Hybrid Automation Framework Development introduction
Hybrid Automation Framework Development introductionHybrid Automation Framework Development introduction
Hybrid Automation Framework Development introduction
Ganuka Yashantha
 
Software testing
Software testingSoftware testing
Software testing
Omar Al-Bokari
 
ISTQB / ISEB Foundation Exam Practice - 5
ISTQB / ISEB Foundation Exam Practice - 5ISTQB / ISEB Foundation Exam Practice - 5
ISTQB / ISEB Foundation Exam Practice - 5
Yogindernath Gupta
 
Test automation process
Test automation processTest automation process
Test automation process
Bharathi Krishnamurthi
 
API Testing With Katalon Studio
API Testing With Katalon StudioAPI Testing With Katalon Studio
API Testing With Katalon Studio
Knoldus Inc.
 
Chapter 5 - Test Management
Chapter 5 - Test ManagementChapter 5 - Test Management
Chapter 5 - Test Management
Neeraj Kumar Singh
 
ISTQB / ISEB Foundation Exam Practice - 6
ISTQB / ISEB Foundation Exam Practice - 6ISTQB / ISEB Foundation Exam Practice - 6
ISTQB / ISEB Foundation Exam Practice - 6
Yogindernath Gupta
 
Manual testing concepts course 1
Manual testing concepts course 1Manual testing concepts course 1
Manual testing concepts course 1
Raghu Kiran
 
sample-test-plan-template.pdf
sample-test-plan-template.pdfsample-test-plan-template.pdf
sample-test-plan-template.pdf
empite
 
Katalon Studio - A Codeless Automation Tool.pdf
Katalon Studio - A Codeless Automation Tool.pdfKatalon Studio - A Codeless Automation Tool.pdf
Katalon Studio - A Codeless Automation Tool.pdf
Knoldus Inc.
 
Agile Test Management Using Jira and Zephyr
Agile Test Management Using Jira and ZephyrAgile Test Management Using Jira and Zephyr
Agile Test Management Using Jira and Zephyr
XBOSoft
 
Enterprise QA and Application Testing Services
Enterprise QA and Application Testing ServicesEnterprise QA and Application Testing Services
Enterprise QA and Application Testing Services
Cygnet Infotech
 
Test Automation Strategies For Agile
Test Automation Strategies For AgileTest Automation Strategies For Agile
Test Automation Strategies For Agile
Naresh Jain
 
Test Automation Framework Development Introduction
Test Automation Framework Development IntroductionTest Automation Framework Development Introduction
Test Automation Framework Development Introduction
Ganuka Yashantha
 

What's hot (20)

How to Design a Successful Test Automation Strategy
How to Design a Successful Test Automation Strategy How to Design a Successful Test Automation Strategy
How to Design a Successful Test Automation Strategy
 
Test Automation Best Practices (with SOA test approach)
Test Automation Best Practices (with SOA test approach)Test Automation Best Practices (with SOA test approach)
Test Automation Best Practices (with SOA test approach)
 
QA process Presentation
QA process PresentationQA process Presentation
QA process Presentation
 
Test Management introduction
Test Management introductionTest Management introduction
Test Management introduction
 
Software Testing Process
Software Testing ProcessSoftware Testing Process
Software Testing Process
 
Basic Guide to Manual Testing
Basic Guide to Manual TestingBasic Guide to Manual Testing
Basic Guide to Manual Testing
 
Hybrid Automation Framework Development introduction
Hybrid Automation Framework Development introductionHybrid Automation Framework Development introduction
Hybrid Automation Framework Development introduction
 
Software testing
Software testingSoftware testing
Software testing
 
ISTQB / ISEB Foundation Exam Practice - 5
ISTQB / ISEB Foundation Exam Practice - 5ISTQB / ISEB Foundation Exam Practice - 5
ISTQB / ISEB Foundation Exam Practice - 5
 
Test automation process
Test automation processTest automation process
Test automation process
 
API Testing With Katalon Studio
API Testing With Katalon StudioAPI Testing With Katalon Studio
API Testing With Katalon Studio
 
Chapter 5 - Test Management
Chapter 5 - Test ManagementChapter 5 - Test Management
Chapter 5 - Test Management
 
ISTQB / ISEB Foundation Exam Practice - 6
ISTQB / ISEB Foundation Exam Practice - 6ISTQB / ISEB Foundation Exam Practice - 6
ISTQB / ISEB Foundation Exam Practice - 6
 
Manual testing concepts course 1
Manual testing concepts course 1Manual testing concepts course 1
Manual testing concepts course 1
 
sample-test-plan-template.pdf
sample-test-plan-template.pdfsample-test-plan-template.pdf
sample-test-plan-template.pdf
 
Katalon Studio - A Codeless Automation Tool.pdf
Katalon Studio - A Codeless Automation Tool.pdfKatalon Studio - A Codeless Automation Tool.pdf
Katalon Studio - A Codeless Automation Tool.pdf
 
Agile Test Management Using Jira and Zephyr
Agile Test Management Using Jira and ZephyrAgile Test Management Using Jira and Zephyr
Agile Test Management Using Jira and Zephyr
 
Enterprise QA and Application Testing Services
Enterprise QA and Application Testing ServicesEnterprise QA and Application Testing Services
Enterprise QA and Application Testing Services
 
Test Automation Strategies For Agile
Test Automation Strategies For AgileTest Automation Strategies For Agile
Test Automation Strategies For Agile
 
Test Automation Framework Development Introduction
Test Automation Framework Development IntroductionTest Automation Framework Development Introduction
Test Automation Framework Development Introduction
 

Viewers also liked

Test Automation Demonstration with Dr Yongyan Wang by XBOSoft
Test Automation Demonstration with Dr Yongyan Wang by XBOSoftTest Automation Demonstration with Dr Yongyan Wang by XBOSoft
Test Automation Demonstration with Dr Yongyan Wang by XBOSoft
XBOSoft
 
24 collections framework interview questions
24 collections framework interview questions24 collections framework interview questions
24 collections framework interview questions
Arun Vasanth
 
Resume q.surveyor - amanat ali (updated)
Resume   q.surveyor - amanat ali (updated)Resume   q.surveyor - amanat ali (updated)
Resume q.surveyor - amanat ali (updated)
Amanat ali
 
Carnestoltes 2017
Carnestoltes 2017Carnestoltes 2017
Carnestoltes 2017
coordinacioprimaria
 
Automation Framework 042009 V2
Automation Framework   042009  V2Automation Framework   042009  V2
Automation Framework 042009 V2
guestb66d91
 
Cucumber questions
Cucumber questionsCucumber questions
Cucumber questions
Shivaraj R
 
Leyenda de Sant Jordi
Leyenda de Sant JordiLeyenda de Sant Jordi
Leyenda de Sant Jordi
davidmelerodomenech
 
How To Transform the Manual Testing Process to Incorporate Test Automation
How To Transform the Manual Testing Process to Incorporate Test AutomationHow To Transform the Manual Testing Process to Incorporate Test Automation
How To Transform the Manual Testing Process to Incorporate Test Automation
Ranorex
 
Selenium for Jobseekers
Selenium for JobseekersSelenium for Jobseekers
Selenium for Jobseekers
Seshu Madhav Chaturvedula
 
Font Analysis
Font AnalysisFont Analysis
Font Analysis
scarletthayward
 
Laws of test automation framework
Laws of test automation frameworkLaws of test automation framework
Laws of test automation framework
vodqancr
 
F5 Networks - - OpenStack Summit 2016/Red Hat NFV Mini Summit
F5 Networks -  - OpenStack Summit 2016/Red Hat NFV Mini SummitF5 Networks -  - OpenStack Summit 2016/Red Hat NFV Mini Summit
F5 Networks - - OpenStack Summit 2016/Red Hat NFV Mini Summit
kimw001
 
Test automation within a scrum process
Test automation within a scrum processTest automation within a scrum process
Test automation within a scrum process
Kushan Shalindra Amarasiri - Technical QE Specialist
 
Selenium Automation Framework
Selenium Automation  FrameworkSelenium Automation  Framework
Selenium Automation Framework
Mindfire Solutions
 
Test automation - What? Why? How?
Test automation - What? Why? How?Test automation - What? Why? How?
Test automation - What? Why? How?
Anand Bagmar
 
Open stack ha design & deployment kilo
Open stack ha design & deployment   kiloOpen stack ha design & deployment   kilo
Open stack ha design & deployment kilo
Steven Li
 
Carnestoltes
CarnestoltesCarnestoltes
Carnestoltes
coordinacioprimaria
 
Selenium webdriver interview questions and answers
Selenium webdriver interview questions and answersSelenium webdriver interview questions and answers
Selenium webdriver interview questions and answers
ITeLearn
 
Test Automation in Agile
Test Automation in AgileTest Automation in Agile
Test Automation in Agile
Agile Testing Alliance
 

Viewers also liked (20)

Test Automation Demonstration with Dr Yongyan Wang by XBOSoft
Test Automation Demonstration with Dr Yongyan Wang by XBOSoftTest Automation Demonstration with Dr Yongyan Wang by XBOSoft
Test Automation Demonstration with Dr Yongyan Wang by XBOSoft
 
24 collections framework interview questions
24 collections framework interview questions24 collections framework interview questions
24 collections framework interview questions
 
лист
листлист
лист
 
Resume q.surveyor - amanat ali (updated)
Resume   q.surveyor - amanat ali (updated)Resume   q.surveyor - amanat ali (updated)
Resume q.surveyor - amanat ali (updated)
 
Carnestoltes 2017
Carnestoltes 2017Carnestoltes 2017
Carnestoltes 2017
 
Automation Framework 042009 V2
Automation Framework   042009  V2Automation Framework   042009  V2
Automation Framework 042009 V2
 
Cucumber questions
Cucumber questionsCucumber questions
Cucumber questions
 
Leyenda de Sant Jordi
Leyenda de Sant JordiLeyenda de Sant Jordi
Leyenda de Sant Jordi
 
How To Transform the Manual Testing Process to Incorporate Test Automation
How To Transform the Manual Testing Process to Incorporate Test AutomationHow To Transform the Manual Testing Process to Incorporate Test Automation
How To Transform the Manual Testing Process to Incorporate Test Automation
 
Selenium for Jobseekers
Selenium for JobseekersSelenium for Jobseekers
Selenium for Jobseekers
 
Font Analysis
Font AnalysisFont Analysis
Font Analysis
 
Laws of test automation framework
Laws of test automation frameworkLaws of test automation framework
Laws of test automation framework
 
F5 Networks - - OpenStack Summit 2016/Red Hat NFV Mini Summit
F5 Networks -  - OpenStack Summit 2016/Red Hat NFV Mini SummitF5 Networks -  - OpenStack Summit 2016/Red Hat NFV Mini Summit
F5 Networks - - OpenStack Summit 2016/Red Hat NFV Mini Summit
 
Test automation within a scrum process
Test automation within a scrum processTest automation within a scrum process
Test automation within a scrum process
 
Selenium Automation Framework
Selenium Automation  FrameworkSelenium Automation  Framework
Selenium Automation Framework
 
Test automation - What? Why? How?
Test automation - What? Why? How?Test automation - What? Why? How?
Test automation - What? Why? How?
 
Open stack ha design & deployment kilo
Open stack ha design & deployment   kiloOpen stack ha design & deployment   kilo
Open stack ha design & deployment kilo
 
Carnestoltes
CarnestoltesCarnestoltes
Carnestoltes
 
Selenium webdriver interview questions and answers
Selenium webdriver interview questions and answersSelenium webdriver interview questions and answers
Selenium webdriver interview questions and answers
 
Test Automation in Agile
Test Automation in AgileTest Automation in Agile
Test Automation in Agile
 

Similar to Test automation principles, terminologies and implementations

Implementing test scripting Ian McDonald updated (minor changes) 26-04-2013
Implementing test scripting   Ian McDonald updated (minor changes) 26-04-2013Implementing test scripting   Ian McDonald updated (minor changes) 26-04-2013
Implementing test scripting Ian McDonald updated (minor changes) 26-04-2013
Ian McDonald
 
Test Case Management with MTM 2013
Test Case Management with MTM 2013Test Case Management with MTM 2013
Test Case Management with MTM 2013
Raluca Suditu
 
Unit v
Unit vUnit v
Unit v
Suvithak
 
Test case management with MTM 2013
Test case management with MTM 2013Test case management with MTM 2013
Test case management with MTM 2013
Raluca Suditu
 
iLeap- Test Automation Framework- Impetus White Paper
iLeap- Test Automation Framework- Impetus White PaperiLeap- Test Automation Framework- Impetus White Paper
iLeap- Test Automation Framework- Impetus White Paper
Impetus Technologies
 
Software Test Automation - Best Practices
Software Test Automation - Best PracticesSoftware Test Automation - Best Practices
Software Test Automation - Best Practices
Arul Selvan
 
Software automation
Software automationSoftware automation
Software automation
gokilabrindha
 
Automated Software Testing Framework Training by Quontra Solutions
Automated Software Testing Framework Training by Quontra SolutionsAutomated Software Testing Framework Training by Quontra Solutions
Automated Software Testing Framework Training by Quontra Solutions
Quontra Solutions
 
Cucumber jvm best practices v3
Cucumber jvm best practices v3Cucumber jvm best practices v3
Cucumber jvm best practices v3
Ahmed Misbah
 
Software Testing- Principles of testing- Mazenet Solution
Software Testing- Principles of testing- Mazenet SolutionSoftware Testing- Principles of testing- Mazenet Solution
Software Testing- Principles of testing- Mazenet Solution
Mazenetsolution
 
Qa documentation pp
Qa documentation ppQa documentation pp
Qa documentation pp
Bohdana Shaleva
 
Testing Frameworks
Testing FrameworksTesting Frameworks
Testing Frameworks
Moataz Nabil
 
Unit Testng with PHP Unit - A Step by Step Training
Unit Testng with PHP Unit - A Step by Step TrainingUnit Testng with PHP Unit - A Step by Step Training
Unit Testng with PHP Unit - A Step by Step Training
Ram Awadh Prasad, PMP
 
TMPA-2017: Regression Testing with Semiautomatic Test Selection for Auditing ...
TMPA-2017: Regression Testing with Semiautomatic Test Selection for Auditing ...TMPA-2017: Regression Testing with Semiautomatic Test Selection for Auditing ...
TMPA-2017: Regression Testing with Semiautomatic Test Selection for Auditing ...
Iosif Itkin
 
Istqb foundation level day 1
Istqb foundation level   day 1Istqb foundation level   day 1
Istqb foundation level day 1
Shuchi Singla AKT,SPC4,PMI-ACP,ITIL(F),CP-AAT
 
Unit testing php-unit - phing - selenium_v2
Unit testing   php-unit - phing - selenium_v2Unit testing   php-unit - phing - selenium_v2
Unit testing php-unit - phing - selenium_v2
Tricode (part of Dept)
 
ISTQB, ISEB Lecture Notes
ISTQB, ISEB Lecture NotesISTQB, ISEB Lecture Notes
ISTQB, ISEB Lecture Notes
onsoftwaretest
 
Context Driven Automation Gtac 2008
Context Driven Automation Gtac 2008Context Driven Automation Gtac 2008
Context Driven Automation Gtac 2008
Pete Schneider
 
Software engineering Testing technique,test case,test suit design
Software engineering Testing technique,test case,test suit designSoftware engineering Testing technique,test case,test suit design
Software engineering Testing technique,test case,test suit design
Maitree Patel
 
ISTQB / ISEB Foundation Exam Practice -1
ISTQB / ISEB Foundation Exam Practice -1ISTQB / ISEB Foundation Exam Practice -1
ISTQB / ISEB Foundation Exam Practice -1
Yogindernath Gupta
 

Similar to Test automation principles, terminologies and implementations (20)

Implementing test scripting Ian McDonald updated (minor changes) 26-04-2013
Implementing test scripting   Ian McDonald updated (minor changes) 26-04-2013Implementing test scripting   Ian McDonald updated (minor changes) 26-04-2013
Implementing test scripting Ian McDonald updated (minor changes) 26-04-2013
 
Test Case Management with MTM 2013
Test Case Management with MTM 2013Test Case Management with MTM 2013
Test Case Management with MTM 2013
 
Unit v
Unit vUnit v
Unit v
 
Test case management with MTM 2013
Test case management with MTM 2013Test case management with MTM 2013
Test case management with MTM 2013
 
iLeap- Test Automation Framework- Impetus White Paper
iLeap- Test Automation Framework- Impetus White PaperiLeap- Test Automation Framework- Impetus White Paper
iLeap- Test Automation Framework- Impetus White Paper
 
Software Test Automation - Best Practices
Software Test Automation - Best PracticesSoftware Test Automation - Best Practices
Software Test Automation - Best Practices
 
Software automation
Software automationSoftware automation
Software automation
 
Automated Software Testing Framework Training by Quontra Solutions
Automated Software Testing Framework Training by Quontra SolutionsAutomated Software Testing Framework Training by Quontra Solutions
Automated Software Testing Framework Training by Quontra Solutions
 
Cucumber jvm best practices v3
Cucumber jvm best practices v3Cucumber jvm best practices v3
Cucumber jvm best practices v3
 
Software Testing- Principles of testing- Mazenet Solution
Software Testing- Principles of testing- Mazenet SolutionSoftware Testing- Principles of testing- Mazenet Solution
Software Testing- Principles of testing- Mazenet Solution
 
Qa documentation pp
Qa documentation ppQa documentation pp
Qa documentation pp
 
Testing Frameworks
Testing FrameworksTesting Frameworks
Testing Frameworks
 
Unit Testng with PHP Unit - A Step by Step Training
Unit Testng with PHP Unit - A Step by Step TrainingUnit Testng with PHP Unit - A Step by Step Training
Unit Testng with PHP Unit - A Step by Step Training
 
TMPA-2017: Regression Testing with Semiautomatic Test Selection for Auditing ...
TMPA-2017: Regression Testing with Semiautomatic Test Selection for Auditing ...TMPA-2017: Regression Testing with Semiautomatic Test Selection for Auditing ...
TMPA-2017: Regression Testing with Semiautomatic Test Selection for Auditing ...
 
Istqb foundation level day 1
Istqb foundation level   day 1Istqb foundation level   day 1
Istqb foundation level day 1
 
Unit testing php-unit - phing - selenium_v2
Unit testing   php-unit - phing - selenium_v2Unit testing   php-unit - phing - selenium_v2
Unit testing php-unit - phing - selenium_v2
 
ISTQB, ISEB Lecture Notes
ISTQB, ISEB Lecture NotesISTQB, ISEB Lecture Notes
ISTQB, ISEB Lecture Notes
 
Context Driven Automation Gtac 2008
Context Driven Automation Gtac 2008Context Driven Automation Gtac 2008
Context Driven Automation Gtac 2008
 
Software engineering Testing technique,test case,test suit design
Software engineering Testing technique,test case,test suit designSoftware engineering Testing technique,test case,test suit design
Software engineering Testing technique,test case,test suit design
 
ISTQB / ISEB Foundation Exam Practice -1
ISTQB / ISEB Foundation Exam Practice -1ISTQB / ISEB Foundation Exam Practice -1
ISTQB / ISEB Foundation Exam Practice -1
 

Recently uploaded

Software Engineering and Project Management - Introduction to Project Management
Software Engineering and Project Management - Introduction to Project ManagementSoftware Engineering and Project Management - Introduction to Project Management
Software Engineering and Project Management - Introduction to Project Management
Prakhyath Rai
 
Phone Us ❤ X000XX000X ❤ #ℂall #gIRLS In Chennai By Chenai @ℂall @Girls Hotel ...
Phone Us ❤ X000XX000X ❤ #ℂall #gIRLS In Chennai By Chenai @ℂall @Girls Hotel ...Phone Us ❤ X000XX000X ❤ #ℂall #gIRLS In Chennai By Chenai @ℂall @Girls Hotel ...
Phone Us ❤ X000XX000X ❤ #ℂall #gIRLS In Chennai By Chenai @ℂall @Girls Hotel ...
Miss Khusi #V08
 
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model SafeBangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
bookhotbebes1
 
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
IJAEMSJORNAL
 
Rotary Intersection in traffic engineering.pptx
Rotary Intersection in traffic engineering.pptxRotary Intersection in traffic engineering.pptx
Rotary Intersection in traffic engineering.pptx
surekha1287
 
Social media management system project report.pdf
Social media management system project report.pdfSocial media management system project report.pdf
Social media management system project report.pdf
Kamal Acharya
 
IWISS Catalog 2024
IWISS Catalog 2024IWISS Catalog 2024
IWISS Catalog 2024
Iwiss Tools Co.,Ltd
 
CCS367-STORAGE TECHNOLOGIES QUESTION BANK.doc
CCS367-STORAGE TECHNOLOGIES QUESTION BANK.docCCS367-STORAGE TECHNOLOGIES QUESTION BANK.doc
CCS367-STORAGE TECHNOLOGIES QUESTION BANK.doc
Dss
 
Exploring Deep Learning Models for Image Recognition: A Comparative Review
Exploring Deep Learning Models for Image Recognition: A Comparative ReviewExploring Deep Learning Models for Image Recognition: A Comparative Review
Exploring Deep Learning Models for Image Recognition: A Comparative Review
sipij
 
MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme
MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme MSBTE K SchemeMSBTE K Scheme MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme
MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme
Anwar Patel
 
Online music portal management system project report.pdf
Online music portal management system project report.pdfOnline music portal management system project report.pdf
Online music portal management system project report.pdf
Kamal Acharya
 
Rohini @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model Safe
Rohini @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model SafeRohini @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model Safe
Rohini @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model Safe
binna singh$A17
 
IS Code SP 23: Handbook on concrete mixes
IS Code SP 23: Handbook  on concrete mixesIS Code SP 23: Handbook  on concrete mixes
IS Code SP 23: Handbook on concrete mixes
Mani Krishna Sarkar
 
GUIA_LEGAL_CHAPTER-9_COLOMBIAN ELECTRICITY (1).pdf
GUIA_LEGAL_CHAPTER-9_COLOMBIAN ELECTRICITY (1).pdfGUIA_LEGAL_CHAPTER-9_COLOMBIAN ELECTRICITY (1).pdf
GUIA_LEGAL_CHAPTER-9_COLOMBIAN ELECTRICITY (1).pdf
ProexportColombia1
 
Evento anual Splunk .conf24 Highlights recap
Evento anual Splunk .conf24 Highlights recapEvento anual Splunk .conf24 Highlights recap
Evento anual Splunk .conf24 Highlights recap
Rafael Santos
 
Germany Offshore Wind 010724 RE (1) 2 test.pptx
Germany Offshore Wind 010724 RE (1) 2 test.pptxGermany Offshore Wind 010724 RE (1) 2 test.pptx
Germany Offshore Wind 010724 RE (1) 2 test.pptx
rebecca841358
 
Conservation of Taksar through Economic Regeneration
Conservation of Taksar through Economic RegenerationConservation of Taksar through Economic Regeneration
Conservation of Taksar through Economic Regeneration
PriyankaKarn3
 
Understanding Cybersecurity Breaches: Causes, Consequences, and Prevention
Understanding Cybersecurity Breaches: Causes, Consequences, and PreventionUnderstanding Cybersecurity Breaches: Causes, Consequences, and Prevention
Understanding Cybersecurity Breaches: Causes, Consequences, and Prevention
Bert Blevins
 
Chlorine and Nitric Acid application, properties, impacts.pptx
Chlorine and Nitric Acid application, properties, impacts.pptxChlorine and Nitric Acid application, properties, impacts.pptx
Chlorine and Nitric Acid application, properties, impacts.pptx
yadavsuyash008
 
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
Jim Mimlitz, P.E.
 

Recently uploaded (20)

Software Engineering and Project Management - Introduction to Project Management
Software Engineering and Project Management - Introduction to Project ManagementSoftware Engineering and Project Management - Introduction to Project Management
Software Engineering and Project Management - Introduction to Project Management
 
Phone Us ❤ X000XX000X ❤ #ℂall #gIRLS In Chennai By Chenai @ℂall @Girls Hotel ...
Phone Us ❤ X000XX000X ❤ #ℂall #gIRLS In Chennai By Chenai @ℂall @Girls Hotel ...Phone Us ❤ X000XX000X ❤ #ℂall #gIRLS In Chennai By Chenai @ℂall @Girls Hotel ...
Phone Us ❤ X000XX000X ❤ #ℂall #gIRLS In Chennai By Chenai @ℂall @Girls Hotel ...
 
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model SafeBangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
 
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
 
Rotary Intersection in traffic engineering.pptx
Rotary Intersection in traffic engineering.pptxRotary Intersection in traffic engineering.pptx
Rotary Intersection in traffic engineering.pptx
 
Social media management system project report.pdf
Social media management system project report.pdfSocial media management system project report.pdf
Social media management system project report.pdf
 
IWISS Catalog 2024
IWISS Catalog 2024IWISS Catalog 2024
IWISS Catalog 2024
 
CCS367-STORAGE TECHNOLOGIES QUESTION BANK.doc
CCS367-STORAGE TECHNOLOGIES QUESTION BANK.docCCS367-STORAGE TECHNOLOGIES QUESTION BANK.doc
CCS367-STORAGE TECHNOLOGIES QUESTION BANK.doc
 
Exploring Deep Learning Models for Image Recognition: A Comparative Review
Exploring Deep Learning Models for Image Recognition: A Comparative ReviewExploring Deep Learning Models for Image Recognition: A Comparative Review
Exploring Deep Learning Models for Image Recognition: A Comparative Review
 
MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme
MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme MSBTE K SchemeMSBTE K Scheme MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme
MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme
 
Online music portal management system project report.pdf
Online music portal management system project report.pdfOnline music portal management system project report.pdf
Online music portal management system project report.pdf
 
Rohini @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model Safe
Rohini @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model SafeRohini @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model Safe
Rohini @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model Safe
 
IS Code SP 23: Handbook on concrete mixes
IS Code SP 23: Handbook  on concrete mixesIS Code SP 23: Handbook  on concrete mixes
IS Code SP 23: Handbook on concrete mixes
 
GUIA_LEGAL_CHAPTER-9_COLOMBIAN ELECTRICITY (1).pdf
GUIA_LEGAL_CHAPTER-9_COLOMBIAN ELECTRICITY (1).pdfGUIA_LEGAL_CHAPTER-9_COLOMBIAN ELECTRICITY (1).pdf
GUIA_LEGAL_CHAPTER-9_COLOMBIAN ELECTRICITY (1).pdf
 
Evento anual Splunk .conf24 Highlights recap
Evento anual Splunk .conf24 Highlights recapEvento anual Splunk .conf24 Highlights recap
Evento anual Splunk .conf24 Highlights recap
 
Germany Offshore Wind 010724 RE (1) 2 test.pptx
Germany Offshore Wind 010724 RE (1) 2 test.pptxGermany Offshore Wind 010724 RE (1) 2 test.pptx
Germany Offshore Wind 010724 RE (1) 2 test.pptx
 
Conservation of Taksar through Economic Regeneration
Conservation of Taksar through Economic RegenerationConservation of Taksar through Economic Regeneration
Conservation of Taksar through Economic Regeneration
 
Understanding Cybersecurity Breaches: Causes, Consequences, and Prevention
Understanding Cybersecurity Breaches: Causes, Consequences, and PreventionUnderstanding Cybersecurity Breaches: Causes, Consequences, and Prevention
Understanding Cybersecurity Breaches: Causes, Consequences, and Prevention
 
Chlorine and Nitric Acid application, properties, impacts.pptx
Chlorine and Nitric Acid application, properties, impacts.pptxChlorine and Nitric Acid application, properties, impacts.pptx
Chlorine and Nitric Acid application, properties, impacts.pptx
 
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
 

Test automation principles, terminologies and implementations

  • 1. Test Automation Principles, Terminologies & Implementations Steven Li Steven004@gmail.com
  • 2. 2 Outline •Test Automation Principles & Terminologies  Why Test Automation  How to do Test Automation  Terminologies about Test Automation (Sycamore) •Implement the Terminologies in Automation Scripts  General Conventions  An Example - PET
  • 4. 4 Top 10 Reasons for Automating Tests - What people said 1. Manual testing sucks. 2. Tool vendor said “Capture replay works.” 3. Fun to watch the dialogs popping on the screen. 4. “Afterwards we can fire all those pesky testers.” 5. Everybody else is doing it. 6. “No humans were harmed in the testing of this software.” 7. Big bucks already spent on the test tool. 8. Looks good on the resume. 9. No Testing for Dummies book ... yet. 10.Keep the intern busy.
  • 5. 5 Reasons for Automating – What people want • Speed up testing • Allow more frequent testing • Reduce manual labor costs • Improve test coverage • Ensure consistency • Simplify testing • Define the testing process • Make testing more interesting and challenging • Develop programming skills • Justify cost of the tools • Of course we’ll have automation!
  • 6. How to do Test Automation
  • 7. 7 Keep it Simple, Sustainable •Uniform/Common infrastructure •Appropriate tools •Manage source code, test data, tools •Agreed Conventions within the team •High-quality Scripts •Gradual Test Automation
  • 8. 8 Quality of Automation Scripts •Maintainability  Will the tests still run after product design changes?  Will tests for 1.0 work with 2.0? And can be easily updated? •Reviewability  Can others review and understand what is being covered?  Are the scripts documented?, can we make sure it matches the original design?  How about the coverage? How easy another engineer use the scripts for the next release? •Reusability  To what degree the assets can be reused to create more, different tests?  Can they be reused in different releases, in different environments? •Dependability  Integrity  Reliability •Repeatability •Independence •Performance •Simplicity
  • 10. 10 Architecture for Automation Test Planning Test Preparation Test PerfectingTest Performing Test Suite Logical TestBed Test Case Test Case … Test Case Test Suite … Physical TestBed Test Case Test Case … Test Case Test Case Logical TestBed Test Case Test Case … Test Case Test Case Test Plan … Test Step 1 Test Step 2 … Test Step n Test Task … … Test Report Specify TestBed & TestCase List For a release Set a task to run a plan Schedule Runtime Options+ Schedule Runtime Options+ Detailed Runtime Information Detailed TestBed Information Test Case Result Test Case Result … Test Case Result Detailed Runtime Information Detailed TestBed Information Test Case Result Test Case Result … Test Case Result Revised Test Suites Test Plans Logical TestBed Test Case Test Case … Test Case Physical TestBed Test Case Test Case … Test Case Execute a task
  • 11. 11 Test Bed •Briefly, a test bed is the definition of the environment for a specified test. A test bed include the hardware/software and configuration/provisioning. •There are two kinds of test beds:  Logical TestBed. A logical test bed depicts all the elements and configuration required for the test, but not indicate which exactly elements will be used (i.e. the index or addresses are not required.)  Physical TestBed. A physical test bed is an instantiation of a logical test bed. A physical test bed exactly indicates which elements are used in the test, and a test task can be really run on the test bed. • Base State of a test bed  The initial state of the test bed, ready for test case (group) start to run with it.  A self-cleaning test case (group) should get the test bed back to the base state when the execution completed.
  • 12. 12 Test Case (group) •A test case is a sequence of operations against a system whose results can be used to determine if a requirement or use case upon an application of the system is partially or fully satisfied.  A test case contains a set of test steps, and based on a particular test bed.  A test step is an atomic statement of a test case, can have pass/fail result. Usually it contains one operation and the expected result.  A set of test cases can be grouped in a test case file. •Test Case File (test group):  A test case file defines one or multiple test cases, which is based on a clean test bed for running, and do self-cleaning after performing all the cases one by one.  A test group are a set of test cases saved in one test case file.
  • 13. 13 Test Suite •A suite of test cases, which share the same test bed to verify a specified feature in a specified test area. Usually, there are multiple test cases in one test suite. •In automation scripts, a test suite includes:  A test suite file: to describe the basic information of this test suite  A logical test bed: to define the test bed which the test suite is based on  One or more test case files: each test case file is self-cleaning, so that each file can run independently. •Usually, test suite is feature oriented. It can be created once the feature is introduced, and keep being improved along the product life, or even product family life.
  • 14. 14 Test Plan •A test plan is an instantiation of a subset of a test suite, in which a set of test cases selected for a particular test for a feature in a program; and indicate the physical test bed for test performing.  E.g. we have a BLSR_4F_2Node test suite, then we can make a plan for SN16K R9.0 BLSR 4F 2Node Regression test, targeted run it in two days. •In automation scripts, a test plan includes:  Test suite path/name  The physical test bed, which is an instantiation of the logical test bed  A test case file list, selected from the test suite •Usually, a test plan is feature and release oriented. For different releases, one can have different test plan for one feature. And, a test plan should be defined in the test preparation stage.
  • 15. 15 Test Task •Test Task is a runtime concept, it defines when and how to execute a test plan. Once a test task is executed, a test report should be reproduced •In automation scripts, a test task could be a command in CLI, an item in TMS, or a file, which includes:  The test plan path/name  A schedule for the test plan running  Runtime options, e.g. Halt or skip if any failure? Wait or fail if the test bed is not available? Recycle or one-time running? •Multiple test tasks can be created for a test plan, that means, a test plan can be executed multiple times in a release. •Usually, a test task is created in test performing stage by the tester for one-time running, and will not be reused.
  • 16. 16 Test Report •A test report is a result record of a test task. •Test reports can also be organized by test plans or test suites for broadened view to analyze requirements satisfaction. •A test report should have the following information  Runtime information: e.g. who/where/how had run this task with what options?  Detailed test bed information: e.g. build no. for each node, serial numbers of elements, software versions  Test results for each case and each step. •A test report can be valuable just with a specified test bed on which the test was running.
  • 17. 17 Outline •Test Automation Principles & Terminologies  Why Test Automation  How to do Test Automation  Terminologies about Test Automation (Sycamore) •Implement the Terminologies in Automation Scripts  General Conventions  An Example - PET
  • 18. 18 Classic Reasons for Automation Failure 10. No clear objectives for automation. 9. Minimal or No attention of non GUI automation. 8. Lack of methodology to success of the project. 7. Automation is easy Just record and playback. – 6. Aim for 100% automation. 5. Testing for automation scripts. 4. No clarity of real cost involved in automation. 3. Automation is part time job of testers. 2. Wrong selection of Test cases. 1. Not treating automation as software development.
  • 20. 20 A flexible framework •General framework allows users define format and language •User defined languages for:  Test bed  Test cases  Test report  Test task  Scheduler …. •General format  XML  Perl, Python  Simply BDD language,  Spreadsheet
  • 21. 21 Plug-in technology •A platform should support a general framework •All support simple plug in •
  • 22. 22 An example: PET •Pet: Peal Engine for Test  It is not just for Perl testing, but  Implement a framework to support different test format  It is independent to run as an application  Or, to be used as a library for your bigger framework •Key engine: Test Recorder •Download from: https://github.com/steven004/Pet
  • 24. 24 What is Pet? •Pet – Perl Engine for Test  Perl: Pet is based on Perl. It can run on almost any platforms  Engine: It will speed up your work, and provide lots of benefit  Test: It is designed for test, not just for test execution, but test management as well IQstream WebUI SN9K/3K/16K … Support different products Console HTML TMS E-Mail … TEA XML Perl … Support different format/language Support different outputs Test Plans/Suites Pet Engine Library Key-Words Objects … Test Cases Test Beds TestRecorder
  • 25. 25 Why you need Pet? •TestRecorder Module embedded in Pet  You will get test results via different channels  Console output, HTML files for Web, E-mail notification, TMS database, and more if you request  All the channels can be configured, you can select any of them as you like/need when running your scripts.  A bunch of test recorder functions provided •Multi-format supported for scripts writing  Pure-perl  TEA format compliant  Or mix-programming  You can use Perl in your TEA case file; or use TEA format in Perl scripts  Spreadsheet cases • Scripts running control  A mechanism provided to run scripts case by case, or step by step  Runtime control provided, by “Ctrl-c”  Failure handling, for collect information in your scripts.  Error handling, If there is some syntax problem in your scripts, Pet will let you know.
  • 26. 26 How to run Pet – the 1st step • Pet looks complicated, but we make it simple • Let’s start a. Log into an automation Server using your unix account • 172.21.7.200 (Shanghai) or 172.31.115.6 (Chicago) • Run Pet -bash-3.2$ pet /usr/bin/pet requires arguments. Try ‘pet –h’ for help. -bash-3.2$ pet -h Usage: Pet [-cnhpv] [testplanfile] [switches] [arguments] -u UserName indicate the who is running the test scripts. Pet will get the user name from OS if no this option -h print Usage hints -l OutputDir indicate the output directory of log. tmppetusername will be used for the default output directory -m the mail address for test result reports -v print version, subversion <includes VERY IMPORTANT Pet functionality info> -d [:debugger] run program under debugger (future) -b BuildNumber indicate the build number of the system/software under test -n new a test plan file in current directory based on the existing test bed and test case files -p parse the test plan and print the case list to the standard output -r ReleaseName indicate the release name/number of the system/software under test -o [tms/console/html/xml/txt] indicate the environment of the Pet. Local run by default -c Pet will just check test bed availability, instead running all cases in the test case list -t TaskID indicate the test task ID for TMS. This option is just required by TMS to run the Pet -f [KEEP_RUNNING/STOP_ON_STEP_FAIL/STOP_ON_CASE_FAIL/PROMPT_ON_FAIL/PROMPT_BY_STEP/PROMPT_BY_CASE/T EST_QUIT] continue the program or stop it when there is a case fail
  • 27. 27 Pet running examples •Run a Perl file  $ pet example.pl –r 1.0 •Run a Perl-format test plan  $ pet example_pl.xml –r 1.2 –b B2.8 •Run a Tea-format test plan  $ pet example_tea.xml –r 1.2 –b B2.7 –m steven004@gmail.com •More parameters  $ pet example_tea.xml –r 1.2 –b B2.7 –u xli –m steven004@gmail.com –t 53432 –o CONSOLE – l /tmp/xli •Parse TestPlan  $pet –p exampletp.xml
  • 28. 28 Outline •Pet Basic •Quick Start  Understand test plan, test suite, test bed and test suite  Create your own test task  Testbed modification  Testcase files selection  Where you get the results?  Email, HTML, TMS? •I want to do some change •Advanced: How can I use Pet to write scripts •Dig into Pet
  • 29. 29 Terms – Test Plan/Bed/Suite/Task/Report •See details in  Previous slides •Pet is to run a test plan in which  Test Bed, Test Suite, Test Case list are specified •A test plan example <?xml version="1.0" encoding="UTF-8" ?> <!-- Test Engineer: Guo, Hugh --> <!-- Program: Pet Example --> <!-- Description: Tea-type example test plan --> <TestPlan SuiteFile="../exampleSuite.pl" PhysicalTestBedFile="../PhysicalTestBeds/example_tb.ttb"> <TestCases> <File>../TestCases/example_tc.ttc</File> </TestCases> </TestPlan> ! Use Relative paths in your test plan, instead of absolute ones !
  • 30. 30 Create your own test task •Create/Modify TestBed file •Create/Modify test plan file  Indicate the test suite file  Indicate the test bed file  TestCase files selection  Again, Use the relative paths, instead of absolute ones •Demo …
  • 31. 31 Where is my test results? •Important Environment Variables  Get it by running ‘set’ in Linux -bash-3.2$ set … TESTMAILTO=steven004@gmail.com #results will be sent to this mail. TESTRECOPT='TESTSUMMARY|TESTDETAIL|TESTLOG|ERRORLOG|WARNINGLOG|INFOLOG|DEBUGLOG‘ # All logs will be recorded TESTRECPATH=/shared1/users/IQstream_Result/auto_pet/output/ #The place to save output results TESTRECTO='CONSOLE|HTML|EMAIL‘ #You can get results through Console, Email and HTML files. … •Demo…
  • 32. 32 Outline •Pet Basic •Quick Start •I want to do some change  Use default output options  Set Pet Environment Variables  TESTRECOPT, TESTRECPATH, TESTRECTO, TESTMAILTO  Set Pet Options in your scripts •Advanced: How can I use Pet to write scripts •Dig into Pet
  • 33. 33 All about TestRecorder •TestRecorder Manual  https://github.com/steven004/Pet/blob/master/Documents/TestReco rder.htm •TestRecorder Training Slides  https://github.com/steven004/Pet/blob/master/Documents/Use %20PET%20step%20by%20step.ppt •Default TestRecorder Options had been set in automation servers for all users  For TestRECTO, TESTRECPATH, TESTRECOPT •You need to set TESTMAILTO •You can also set your own Recorder Options in your profile
  • 34. 34 Use different options for a particular test •Two ways to go  1) Specify your options as arguments when you run your test  pet myplan.xml –m notme@abc.com –r 1.2 –b 1 –l /tmp/xli/  This time, notme@abc.com will get the result, and all results files will be save in /tmp/xli in the automation server  pet myplan.xml –u goldman –r 1.2 –b 3.8 –f STOP_ON_CASE_FAIL  This time, pet will think the goldman is running the scripts, instead of you, the one log into the server, and scripts will stop once there is a case fail.  2) Set in your scripts (not recommended)  See more in TestRecorder Training Slides
  • 35. 35 Outline •Pet Basic •Quick Start •I want to do some change •Advanced: How can I use Pet to write scripts  Call Flow in Pet  TestSuite file writing  TestBed & TestCase file  Pure Perl programming  TEA format programming  Mix-mode programming •Dig into Pet
  • 36. 36 Call Flow in Pet •Typical call flow Import TestSuite (run testsuite file) Import TestBed (run PhyTestBed file) TestBed Setup Test Start Test End TestBed Cleanup Run CaseFiles #1 #2 … #n Case, Step & TestLog related functions (defined in TestRecorder) can be used here, and all activities will be recorded by Pet.
  • 37. 37 TestSuite file •TestSuite file has to be a Perl file •It could be very simple •The simplest example: # A Test Suite Example use IQsteam::Objects; # it means you will test a IQstream system •The TestSuite.pl template: ## use the necessary packages here use IQsteam::Objects; sub TestBedSetup { #add your scripts here# 1; } sub TestBedClearup { #add your scripts here# 1; } 1;
  • 38. 38 TestSuite file is serving the test suite •Anything related to the test suite should be defined in it •It may contain  The packages to be used in the test suite  The attributes of the test suite  Test Bed base state definition (TestBed Setup)  How to recover the test bed after test completes  Any variables/data to be used in the test suite, but not related to a particular physical test bed  Any functions definition for test cases & Test bed initiation  E.g. the testsuite.pl defined for Lab Pcap running
  • 39. 39 TestBed & Test Case files •Test Bed design  Define variables/data related to particular test beds, i.e. Any parameters may change when you change your test bed to do the same test •Test Case file design  Test Case file is just to define test procedures  Test Case files should not be modified when you run your test on different test beds  Case / Step / TestLog related functions defined in TestRecorder will be used in TestCase Files  Test Cases defined in one TestCase file should be self-clean for better test plan making
  • 40. 40 TestBed & TestCase Files – Pure Perl •TestBed Example (from WebUI test suite) our $BrowserType='*iexplore'; our $BrowserURL='http://172.21.5.109'; our $CNIPAddress='172.21.5.109'; our $client_IP='172.21.160.154'; our $PortNumber='4444';  All the definitions are about the particular test bed, and can be easily changed when you run it in another test bed. •TestSuite Example CaseStart(“Just an example"); { InfoMsg(“All the following steps should pass!"); Step(3*2==6, "3*2==6"); Like(“Shanghai”, “Sh”, “Shanghai =~ Sh"); Is(3*2, 6, "3*2 is 6?"); } CaseEnd(); …… CaseStart(“Other Cases….”); {…} CaseEnd(); More Functions, please see TestRecorder Manual

Editor's Notes

  1. Actually, Pet is not a good name, since it is really like a robot or a dog, instead of a pet, which need you to take care of. On the contrast, it provide much more benefit to you, and help you