SlideShare une entreprise Scribd logo
1  sur  26
1
Ian McDonald
Implementing Test Scripting
© 2006, 2007, 2010, 2013 Ian McDonald
2
Contents
Purpose
Overview
Test Cases
Manual Test Scripts
Automated Test Scripts
3
Purpose
 These slides were put in place over a period of
time, as I found myself often having to lead
teams on fast delivery projects, where testers
had no previous experience or training. It is
very much a quick guide and assumes that the
slides are supported by a skilled practitioner
leading the team. The approach assumes
basic level tooling. Obviously with specialist
tooling the approach will be adapted.
 There is also an assumption that other training
is also available to support test analysis to
create test cases and the use of specific tools.
4
Overview
 This presentation is written to help those who
are new to test scripting, who may have had
little previous experience in this task.
 The slides address:
 The layout and management of Test Cases.
 Naming requirements for Test Scripts.
 Limitations imposed by Test Tooling.
 Creation and content of Test Scripts.
 Structuring of Automated Test Scripts.
5
Test Cases
A Test Case is described as:
 “A set of inputs, execution, preconditions, and
expected outcomes developed for a particular
objective, such as to exercise a particular program
path or to verify compliance with a specific
requirement.” BS7925-1
 Tools like Classification Tree Editor (CTE) allow users
to generate Test Cases in terms of lists identifying
input parameters (or Test Vector sets). NOTE: A
separate presentation is available that deals with CTE.
 The Test Cases will therefore form a list of what needs
to be tested, against a Test Case will be hooked in
one or more Test Scripts which provide step by step
instructions in how to implement the Test Case.
6
Test Case and Test Script
 A test case defines the parameters that are
the vector values which are input for a specific
set of tests. Defined with the input values are
corresponding output values that are expected
for the test outcome.
 A test script details the step by step actions
and observations to implement the input of test
vectors and observations.
 Often a test case may be implemented in a
number of different scripts. This might occur,
for example, if there are different input
methods.
7
Creation of Test Cases
 Test cases are identified through systematic analysis, to identify
the test vectors to be used for testing.
 Techniques such as boundary analysis, equivalence partitioning,
state transition testing, etc can be found in BS7925-2. These
techniques can be applied to system as well as unit testing.
Note: Details of BS7925-1 and BS7925-2 can be found at:
http://www.testingstandards.co.uk/
 An additional technique is classification tree (CT), which is also
supported by the classification tree editor (CTE) tool.
Note: The CT approach and the CTE tool are described in a
separate presentation.
8
Test Case Work Packages
 Following test analysis a series of work packages are
identified. These are the individual test cases, or test
vector sets.
 These test cases then need to be developed into a
series of test scripts.
 The test scripts outline the starting assumptions and
preparation for implementing a test, followed by step
by step clear repeatable actions and the observations
to make and what is expected to be observed for a
successful outcome.
 Later a test manager will want to run specific scripts
associated with test cases.
9
Structuring Test Cases – A Practical Approach
 Test Cases are structured into well organised folders
to allow efficient management. During a test
programme, the Test manager will need to:
 Assign test cases for the creation of test scripts.
 Run scripts for specific test case sets for different software
deliveries and project milestone phases.
 Assign specific work packages to testers (so a tester will be
given a defined set of tests to run within a period of time).
 Prioritise testing for a defect fix, software delivery or
confidence test.
 Consequently Test Cases and Scripts need to be well
organised and the organisation well understood and
easily recognised by the team.
10
Early Organisation of Test Cases
 Test Cases are usually organised under a
series of folders. The organisation may differ
from project to project. In structuring Test
Cases or Scripts the following will need to be
considered as a possible workable approach
for organising Tests:
 Requirements
 Business Use Cases
 Functional Grouping
 Equipment Functionality
 Data Type
 Other….
11
Getting Started
 When creating Test Cases, it may be that the
Test Cases have been created with tooling
such as CTE and the test cases have been
created as a flat table or series of flat tables.
The test manager will want to group these for
assigning to testers to create Test Scripts.
 It is often easier to initially assign the test
cases to high level folders and then as the
Test Scripts are created, the Test Cases are
moved to a more appropriate folder structure
grouping.
12
Setting Out Test Cases
 Test Cases can
be stored
initially at a high
level and as
sorted then
transferred to
lower level
folders.
Portal
Server Agent
Project ABC
Admin
User Set-Up
System User Functions
Positive Test
Negative Test
13
Considerations for Priority and Regression
 Typically during testing a test manager will need to do the
following, which can be helped by good Test Case structure:
 Assign specific sets of Test Cases to specialist testers.
 Prioritise the creation of Test Cases by Positive testing.
 Positive tests check that the normal functional path is working for normal
inputs.
 In contrast a negative test will provide an illegal entry and will thus test
the resilience and error handling capability of the functionality. Often
negative tests are more efficient at finding less obvious defects and
specifically those defects that may cause a major system failure.
 Prioritise Test Cases for regression test sets.
 Prioritise Test Cases for automation.
 Choose Test Cases to test a defect fix.
 Choose a small subset of Test Cases to decide if a build is fit for
accepting into testing – eliminating bad build injection into test.
 Choose a subset of Test Cases for reuse in Acceptance Testing.
Hence the reason for structure needs to be understood by the
team.
14
Dealing with Test Phases
 It is often simpler to
create a library of
Test Scripts, where
these are maintained
centrally and then
copy down Test
Scripts to appropriate
level folders for the
test phase:
Project ABC
Integration
Build1
FAT
UAT
SAT
OAT
COPY
Test
Sub-
Folders
Specialist test
management tooling
allows results and
scripts to be managed
without the need for
copying. However
some tools are better
than others.
15
Limitations on Folder Structure
 Be aware that some test tools and older
versions of well established tooling, have
limitations on path length.
 The total number of characters for the Test
Case name (path) and Test Script (file) are
limited.
 If this happens to be the case then appropriate
abbreviations will need to be used that are well
understood by the team.
16
Agile
 If using an Agile approach, then you will need
to consider how you add Test Cases and map
these to Agile Stories and at the same time
allow your administration of Regression
Tests.
 Ensure that Test Cases for Performance and
Security are added early. The content will
improve over the life span of the test delivery,
however they need to be created early on in
the test cycle.
17
Warning
 Take great care to maintain a sustainable test script
library.
 There is always a danger that with a poorly defined
system, tests are not maintained and new and even
repeated tests are added. This is dangerous for a
project because:
 Older tests will eventually break, causing further delays to test
runs.
 There is a greater maintenance cost as more tests get added.
 The time to run a suite of tests increases, adding significant
costs to testing.
 Make certain the test team understand the need for
maintenance and make sure that tests for specific
functions can be quickly identified.
18
Test Script Overview
 Test Scripts have 3 key elements.:
 Step Number – providing the sequence for Action (which includes Observation).
 Action – A unique step in a sequence of Action or Observation.
 The Expected Outcome from the result, against which a Pass or Fail is measured.
 Note: When using traditional Test Management Tools, further columns are added for
Pass/Fail and Comments. However if making do with tools such as Excel, there is a
need to add columns for this and have a way of referencing any attachments – such as
screen captures. So you will need to add a column for comments, defect ID cross
reference and for any hyperlink to screen captures, which will need to be stored in a
structured directory.
 With an excel solution, there also needs to be an approach for making sure the issue of
the test script is maintained and the results of [past test runs are mapped to a specific
issue of the script.
 Test script maintenance can also be achieved by each Excel workbook having a master
blank script, which is copied within the file and used for completion during a specific
run. Try to avoid the need to edit multiple scripts, so work maintenance is minimised.
Step Action Expected Result
1
19
Setting Out Test Actions #1
 Test Script Actions need to be set out in a
logical order of events.
 Step 1 – will detail any test assumptions. Do
consider that often a test run may at times
vary. So if a test is for example about logging
in with a user name of 3 characters, then state
this early. This then avoids the situation of a
busy test team using a standard assigned user
name with more characters. Or avoiding the
automated tester writing a replacement
automated test script which misses the point of
the test.
20
Setting Out Test Actions #2
 In setting out steps, we are ensuring that we
can carry out tests in a precise and ordered
approach that is repeatable. The developer
should be able to repeat the test step and
obtain the same result and understand exactly
what the failure was.
 Test Actions also include the action of
Observation. So for specific observations
ensure that these are included as single steps.
This then guides the automated tester to
ensure that specific observations need to be
captured.
21
Setting Out Test Actions #3
Finally when all the script test actions
are complete, there is a final step which
will either:
Set the system to a known state ready for
another test OR
Direct the user to run a cleanup script.
22
Level of Detail Required
 There is a fine balance in ensuring that there is sufficient
information that can be used to understand what action needs to
be taken and the amount of information that needs to be
maintained.
 If testing is likely to utilise an army of untrained testers, then more
detail will be required within a test script. This has to be
considered early on. Depending on the company this could
include: undergraduates, new graduates with no or little previous
experience, users, administration staff, etc. So if this is likely
then the scripting needs to be addressed early on in development
of the scripts.
 If code is likely to change significantly then you do not want to
create a large number of test scripts with lots of fine detail that will
take longer to maintain than it takes to change the code. So in
this instance test scripts will be general in description and be less
prone to the need of continuous maintenance. However the key
purpose of the test case and the choice of vectors needs to be
stated clearly.
23
Test Script Referencing #1
 In Test Management Tooling, Test Scripts are often contained in
a flat table with a file reference. These files are then hooked into
Test Cases. This approach has a specific advantage that if a test
case is copied and repeated several times, they will always
reference the same batch of test scripts, that can be maintained
centrally. Changing one test script will update all instances of the
Test Script.
 Do ensure that a test run results are not impacted by changes in
the working Test Script. Any change in a Test Script should not
impact any recorded running history, where the previous version
was used. Not all Test Tools are helpful in this instance. If this
causes a problem you will need to ensure that any configuration
control deployed compensates for the flaw in the tooling.
 The reason for this is that if you needed to re-run an old version
of a test to check a result, or if development roll back code to a
previous build, you need to ne able to reference the appropriate
version of the test script. If you do not have control of this, then
you will be heading for problems.
24
Test Script Referencing #2
 In creating Test Scripts, the Script name will
need to reflect a number of criteria:
 Identify any specific order that a series of scripts
has to be run in.
 Identify any priority (High, Medium, Low) that is
required for automation and regression testing.
 Identify, where necessary any version control
reference.
 Identify the functionality being tested. This can
include reference to positive or negative testing.
25
When to Automate
 Automation creates a level of administration which can at times
be unsustainable. So in automating ensure:
 Code has stabilised and is unlikely to need automated tests to be
updated.
 Do not rely on record and play, where possible use coding to alter
data inputs. This means that scripts are far more easily adaptable
and maintainable.
 Take care with bit map comparisons. Different graphics cards have
in the past given rise to sufficient differences to cause failure, where
a pass is correct. Modern GUI automation tools allow the threshold
for bit map comparison to be adjusted to compensate. Also take
care not to compare a whole screen as routine. Positions may vary
slightly and so if looking for example a logo, it is possible in some
tools to highlight the image that is to appear on the screen and will
pass the test if the image appears anywhere on the screen, within
specific set boundaries.
26
Cutting Duplication in Test Scripting
 This applies to both automated and manual testing. If there is a set-up
sequence say of 12 steps, then if you have to repeat that for 100 test
scripts that is 1,200 steps that you need to maintain. This is very
expensive.
 Instead consider setting up a preliminary set up script (say called
“preliminary_set_up_test24v1”. This would then have those 12 steps.
Any test that needed this would then have a step that says “first run
preliminary_set_up_test24” (note no version, however the date and issue
control will allow anyone to identify the version run). Any automated
scripting would then run the preliminary test before the extension.
However any Test Script name would need to indicate that a preliminary
test needs to be run first. This is then easier to check a regression suite
for the inclusion of any preliminary test.
 For Manual Testing this is easily implemented by the tester running the
repeat step, with a print out. While in the single repeat step will have a
failure that will correspond to one of many steps in the preliminary
preparation script, the results should have the ability to detail in which
step of the preliminary script the failure occurred. However in practice if
one had may repeated failures in a preliminary script, one would raise a
defect against the preliminary script and abandon testing on any script
that relied on that preliminary test being carried out.

Contenu connexe

Tendances

John Kent - An Entity Model for Software Testing
John Kent - An Entity Model for Software TestingJohn Kent - An Entity Model for Software Testing
John Kent - An Entity Model for Software TestingTEST Huddle
 
Best practices for test case creation & maintenance
Best practices for test case creation & maintenanceBest practices for test case creation & maintenance
Best practices for test case creation & maintenance99tests
 
HCLT Whitepaper: Landmines of Software Testing Metrics
HCLT Whitepaper: Landmines of Software Testing MetricsHCLT Whitepaper: Landmines of Software Testing Metrics
HCLT Whitepaper: Landmines of Software Testing MetricsHCL Technologies
 
Importance of a Test Management Tool for Your Project
Importance of a Test Management Tool for Your ProjectImportance of a Test Management Tool for Your Project
Importance of a Test Management Tool for Your ProjectSarah Elson
 
Mt s12 test_execution
Mt s12 test_executionMt s12 test_execution
Mt s12 test_executionTestingGeeks
 
Matthias Ratert - Automated Test Case Prioritization - EuroSTAR 2012
Matthias Ratert - Automated Test Case Prioritization - EuroSTAR 2012Matthias Ratert - Automated Test Case Prioritization - EuroSTAR 2012
Matthias Ratert - Automated Test Case Prioritization - EuroSTAR 2012TEST Huddle
 
02 software test plan template
02 software test plan template02 software test plan template
02 software test plan templateAndrei Hortúa
 
Robert Magnusson - TMMI Level 2 - A Practical Approach
Robert Magnusson - TMMI Level 2 -  A Practical ApproachRobert Magnusson - TMMI Level 2 -  A Practical Approach
Robert Magnusson - TMMI Level 2 - A Practical ApproachTEST Huddle
 
Pairwise testing
Pairwise testingPairwise testing
Pairwise testingKanoah
 
Introduction to ISTQB & ISEB Certifications
Introduction to ISTQB & ISEB CertificationsIntroduction to ISTQB & ISEB Certifications
Introduction to ISTQB & ISEB CertificationsYogindernath Gupta
 
Engaging IV&V Testing Services for Agile Projects
Engaging IV&V Testing Services for Agile ProjectsEngaging IV&V Testing Services for Agile Projects
Engaging IV&V Testing Services for Agile ProjectsRavi Kumar
 
Test case-point-analysis (whitepaper)
Test case-point-analysis (whitepaper)Test case-point-analysis (whitepaper)
Test case-point-analysis (whitepaper)KMS Technology
 
www.tutorialsbook.com presents Manual testing
www.tutorialsbook.com presents Manual testingwww.tutorialsbook.com presents Manual testing
www.tutorialsbook.com presents Manual testingTutorials Book
 
Testing Experience - Evolution of Test Automation Frameworks
Testing Experience - Evolution of Test Automation FrameworksTesting Experience - Evolution of Test Automation Frameworks
Testing Experience - Evolution of Test Automation FrameworksŁukasz Morawski
 

Tendances (20)

Training program BaffleSol academy of learning
Training program BaffleSol academy of learningTraining program BaffleSol academy of learning
Training program BaffleSol academy of learning
 
John Kent - An Entity Model for Software Testing
John Kent - An Entity Model for Software TestingJohn Kent - An Entity Model for Software Testing
John Kent - An Entity Model for Software Testing
 
Best practices for test case creation & maintenance
Best practices for test case creation & maintenanceBest practices for test case creation & maintenance
Best practices for test case creation & maintenance
 
Qa documentation pp
Qa documentation ppQa documentation pp
Qa documentation pp
 
HCLT Whitepaper: Landmines of Software Testing Metrics
HCLT Whitepaper: Landmines of Software Testing MetricsHCLT Whitepaper: Landmines of Software Testing Metrics
HCLT Whitepaper: Landmines of Software Testing Metrics
 
Importance of a Test Management Tool for Your Project
Importance of a Test Management Tool for Your ProjectImportance of a Test Management Tool for Your Project
Importance of a Test Management Tool for Your Project
 
Mt s12 test_execution
Mt s12 test_executionMt s12 test_execution
Mt s12 test_execution
 
Matthias Ratert - Automated Test Case Prioritization - EuroSTAR 2012
Matthias Ratert - Automated Test Case Prioritization - EuroSTAR 2012Matthias Ratert - Automated Test Case Prioritization - EuroSTAR 2012
Matthias Ratert - Automated Test Case Prioritization - EuroSTAR 2012
 
02 software test plan template
02 software test plan template02 software test plan template
02 software test plan template
 
Ieee829mtp
Ieee829mtpIeee829mtp
Ieee829mtp
 
02 test planning
02   test planning02   test planning
02 test planning
 
Robert Magnusson - TMMI Level 2 - A Practical Approach
Robert Magnusson - TMMI Level 2 -  A Practical ApproachRobert Magnusson - TMMI Level 2 -  A Practical Approach
Robert Magnusson - TMMI Level 2 - A Practical Approach
 
Application Testing
Application TestingApplication Testing
Application Testing
 
Pairwise testing
Pairwise testingPairwise testing
Pairwise testing
 
Embedded SW Testing
Embedded SW TestingEmbedded SW Testing
Embedded SW Testing
 
Introduction to ISTQB & ISEB Certifications
Introduction to ISTQB & ISEB CertificationsIntroduction to ISTQB & ISEB Certifications
Introduction to ISTQB & ISEB Certifications
 
Engaging IV&V Testing Services for Agile Projects
Engaging IV&V Testing Services for Agile ProjectsEngaging IV&V Testing Services for Agile Projects
Engaging IV&V Testing Services for Agile Projects
 
Test case-point-analysis (whitepaper)
Test case-point-analysis (whitepaper)Test case-point-analysis (whitepaper)
Test case-point-analysis (whitepaper)
 
www.tutorialsbook.com presents Manual testing
www.tutorialsbook.com presents Manual testingwww.tutorialsbook.com presents Manual testing
www.tutorialsbook.com presents Manual testing
 
Testing Experience - Evolution of Test Automation Frameworks
Testing Experience - Evolution of Test Automation FrameworksTesting Experience - Evolution of Test Automation Frameworks
Testing Experience - Evolution of Test Automation Frameworks
 

Similaire à Implementing test scripting Ian McDonald updated (minor changes) 26-04-2013

Software Test Automation - Best Practices
Software Test Automation - Best PracticesSoftware Test Automation - Best Practices
Software Test Automation - Best PracticesArul Selvan
 
Regression Optimizer
Regression OptimizerRegression Optimizer
Regression OptimizerShradha Singh
 
Test automation principles, terminologies and implementations
Test automation principles, terminologies and implementationsTest automation principles, terminologies and implementations
Test automation principles, terminologies and implementationsSteven Li
 
A Productive Method for Improving Test Effectiveness
A Productive Method for Improving Test EffectivenessA Productive Method for Improving Test Effectiveness
A Productive Method for Improving Test EffectivenessShradha Singh
 
Generating Test Cases
Generating Test CasesGenerating Test Cases
Generating Test CasesVivekRajawat9
 
Object Oriented Testing
Object Oriented TestingObject Oriented Testing
Object Oriented TestingAMITJain879
 
Peter Zimmerer - Passion For Testing, By Examples - EuroSTAR 2010
Peter Zimmerer - Passion For Testing, By Examples - EuroSTAR 2010Peter Zimmerer - Passion For Testing, By Examples - EuroSTAR 2010
Peter Zimmerer - Passion For Testing, By Examples - EuroSTAR 2010TEST Huddle
 
types of testing with descriptions and examples
types of testing with descriptions and examplestypes of testing with descriptions and examples
types of testing with descriptions and examplesMani Deepak Choudhry
 
Test driven development and unit testing with examples in C++
Test driven development and unit testing with examples in C++Test driven development and unit testing with examples in C++
Test driven development and unit testing with examples in C++Hong Le Van
 
Best Practices for Test Case Writing
Best Practices for Test Case WritingBest Practices for Test Case Writing
Best Practices for Test Case WritingSarah Goldberg
 
Test analysis & design good practices@TDT Iasi 17Oct2013
Test analysis & design   good practices@TDT Iasi 17Oct2013Test analysis & design   good practices@TDT Iasi 17Oct2013
Test analysis & design good practices@TDT Iasi 17Oct2013Tabăra de Testare
 
Keyword Driven Testing
Keyword Driven TestingKeyword Driven Testing
Keyword Driven TestingHarish MS
 
Performance testing checklist.pdf
Performance testing checklist.pdfPerformance testing checklist.pdf
Performance testing checklist.pdfAnuSelvaraj2
 
want to contact me login to www.stqa.org
want to contact me login to www.stqa.orgwant to contact me login to www.stqa.org
want to contact me login to www.stqa.orgnazeer pasha
 
Test Driven Development with Sql Server
Test Driven Development with Sql ServerTest Driven Development with Sql Server
Test Driven Development with Sql ServerDavid P. Moore
 
Final Automation Testing
Final Automation TestingFinal Automation Testing
Final Automation Testingpriya_trivedi
 

Similaire à Implementing test scripting Ian McDonald updated (minor changes) 26-04-2013 (20)

Software Test Automation - Best Practices
Software Test Automation - Best PracticesSoftware Test Automation - Best Practices
Software Test Automation - Best Practices
 
Regression Optimizer
Regression OptimizerRegression Optimizer
Regression Optimizer
 
Test automation principles, terminologies and implementations
Test automation principles, terminologies and implementationsTest automation principles, terminologies and implementations
Test automation principles, terminologies and implementations
 
Sta unit 5(abimanyu)
Sta unit 5(abimanyu)Sta unit 5(abimanyu)
Sta unit 5(abimanyu)
 
A Productive Method for Improving Test Effectiveness
A Productive Method for Improving Test EffectivenessA Productive Method for Improving Test Effectiveness
A Productive Method for Improving Test Effectiveness
 
Generating Test Cases
Generating Test CasesGenerating Test Cases
Generating Test Cases
 
Object Oriented Testing
Object Oriented TestingObject Oriented Testing
Object Oriented Testing
 
Peter Zimmerer - Passion For Testing, By Examples - EuroSTAR 2010
Peter Zimmerer - Passion For Testing, By Examples - EuroSTAR 2010Peter Zimmerer - Passion For Testing, By Examples - EuroSTAR 2010
Peter Zimmerer - Passion For Testing, By Examples - EuroSTAR 2010
 
types of testing with descriptions and examples
types of testing with descriptions and examplestypes of testing with descriptions and examples
types of testing with descriptions and examples
 
Test driven development and unit testing with examples in C++
Test driven development and unit testing with examples in C++Test driven development and unit testing with examples in C++
Test driven development and unit testing with examples in C++
 
Best Practices for Test Case Writing
Best Practices for Test Case WritingBest Practices for Test Case Writing
Best Practices for Test Case Writing
 
STLC-ppt-1.pptx
STLC-ppt-1.pptxSTLC-ppt-1.pptx
STLC-ppt-1.pptx
 
Test analysis & design good practices@TDT Iasi 17Oct2013
Test analysis & design   good practices@TDT Iasi 17Oct2013Test analysis & design   good practices@TDT Iasi 17Oct2013
Test analysis & design good practices@TDT Iasi 17Oct2013
 
Keyword Driven Testing
Keyword Driven TestingKeyword Driven Testing
Keyword Driven Testing
 
stlc
stlcstlc
stlc
 
stlc
stlcstlc
stlc
 
Performance testing checklist.pdf
Performance testing checklist.pdfPerformance testing checklist.pdf
Performance testing checklist.pdf
 
want to contact me login to www.stqa.org
want to contact me login to www.stqa.orgwant to contact me login to www.stqa.org
want to contact me login to www.stqa.org
 
Test Driven Development with Sql Server
Test Driven Development with Sql ServerTest Driven Development with Sql Server
Test Driven Development with Sql Server
 
Final Automation Testing
Final Automation TestingFinal Automation Testing
Final Automation Testing
 

Plus de Ian McDonald

Non functional performance requirements v2.2
Non functional performance requirements v2.2Non functional performance requirements v2.2
Non functional performance requirements v2.2Ian McDonald
 
Choosing an alm tool set
Choosing an alm tool setChoosing an alm tool set
Choosing an alm tool setIan McDonald
 
Requirements Verification v3
Requirements Verification v3Requirements Verification v3
Requirements Verification v3Ian McDonald
 
Boundary and equivalnce systematic test design
Boundary and equivalnce   systematic test designBoundary and equivalnce   systematic test design
Boundary and equivalnce systematic test designIan McDonald
 
Estimating test effort part 1 of 2
Estimating test effort part 1 of 2Estimating test effort part 1 of 2
Estimating test effort part 1 of 2Ian McDonald
 
Estimating test effort part 2 of 2
Estimating test effort part 2 of 2Estimating test effort part 2 of 2
Estimating test effort part 2 of 2Ian McDonald
 
CTE Presentation V2
CTE Presentation V2CTE Presentation V2
CTE Presentation V2Ian McDonald
 
RCA Presentation V0 1
RCA Presentation V0 1RCA Presentation V0 1
RCA Presentation V0 1Ian McDonald
 
TEA Presentation V 0.3
TEA Presentation V 0.3TEA Presentation V 0.3
TEA Presentation V 0.3Ian McDonald
 

Plus de Ian McDonald (9)

Non functional performance requirements v2.2
Non functional performance requirements v2.2Non functional performance requirements v2.2
Non functional performance requirements v2.2
 
Choosing an alm tool set
Choosing an alm tool setChoosing an alm tool set
Choosing an alm tool set
 
Requirements Verification v3
Requirements Verification v3Requirements Verification v3
Requirements Verification v3
 
Boundary and equivalnce systematic test design
Boundary and equivalnce   systematic test designBoundary and equivalnce   systematic test design
Boundary and equivalnce systematic test design
 
Estimating test effort part 1 of 2
Estimating test effort part 1 of 2Estimating test effort part 1 of 2
Estimating test effort part 1 of 2
 
Estimating test effort part 2 of 2
Estimating test effort part 2 of 2Estimating test effort part 2 of 2
Estimating test effort part 2 of 2
 
CTE Presentation V2
CTE Presentation V2CTE Presentation V2
CTE Presentation V2
 
RCA Presentation V0 1
RCA Presentation V0 1RCA Presentation V0 1
RCA Presentation V0 1
 
TEA Presentation V 0.3
TEA Presentation V 0.3TEA Presentation V 0.3
TEA Presentation V 0.3
 

Dernier

DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
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
 
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
 
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
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
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
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
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
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
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
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 

Dernier (20)

DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
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
 
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
 
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
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
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
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
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
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 

Implementing test scripting Ian McDonald updated (minor changes) 26-04-2013

  • 1. 1 Ian McDonald Implementing Test Scripting © 2006, 2007, 2010, 2013 Ian McDonald
  • 3. 3 Purpose  These slides were put in place over a period of time, as I found myself often having to lead teams on fast delivery projects, where testers had no previous experience or training. It is very much a quick guide and assumes that the slides are supported by a skilled practitioner leading the team. The approach assumes basic level tooling. Obviously with specialist tooling the approach will be adapted.  There is also an assumption that other training is also available to support test analysis to create test cases and the use of specific tools.
  • 4. 4 Overview  This presentation is written to help those who are new to test scripting, who may have had little previous experience in this task.  The slides address:  The layout and management of Test Cases.  Naming requirements for Test Scripts.  Limitations imposed by Test Tooling.  Creation and content of Test Scripts.  Structuring of Automated Test Scripts.
  • 5. 5 Test Cases A Test Case is described as:  “A set of inputs, execution, preconditions, and expected outcomes developed for a particular objective, such as to exercise a particular program path or to verify compliance with a specific requirement.” BS7925-1  Tools like Classification Tree Editor (CTE) allow users to generate Test Cases in terms of lists identifying input parameters (or Test Vector sets). NOTE: A separate presentation is available that deals with CTE.  The Test Cases will therefore form a list of what needs to be tested, against a Test Case will be hooked in one or more Test Scripts which provide step by step instructions in how to implement the Test Case.
  • 6. 6 Test Case and Test Script  A test case defines the parameters that are the vector values which are input for a specific set of tests. Defined with the input values are corresponding output values that are expected for the test outcome.  A test script details the step by step actions and observations to implement the input of test vectors and observations.  Often a test case may be implemented in a number of different scripts. This might occur, for example, if there are different input methods.
  • 7. 7 Creation of Test Cases  Test cases are identified through systematic analysis, to identify the test vectors to be used for testing.  Techniques such as boundary analysis, equivalence partitioning, state transition testing, etc can be found in BS7925-2. These techniques can be applied to system as well as unit testing. Note: Details of BS7925-1 and BS7925-2 can be found at: http://www.testingstandards.co.uk/  An additional technique is classification tree (CT), which is also supported by the classification tree editor (CTE) tool. Note: The CT approach and the CTE tool are described in a separate presentation.
  • 8. 8 Test Case Work Packages  Following test analysis a series of work packages are identified. These are the individual test cases, or test vector sets.  These test cases then need to be developed into a series of test scripts.  The test scripts outline the starting assumptions and preparation for implementing a test, followed by step by step clear repeatable actions and the observations to make and what is expected to be observed for a successful outcome.  Later a test manager will want to run specific scripts associated with test cases.
  • 9. 9 Structuring Test Cases – A Practical Approach  Test Cases are structured into well organised folders to allow efficient management. During a test programme, the Test manager will need to:  Assign test cases for the creation of test scripts.  Run scripts for specific test case sets for different software deliveries and project milestone phases.  Assign specific work packages to testers (so a tester will be given a defined set of tests to run within a period of time).  Prioritise testing for a defect fix, software delivery or confidence test.  Consequently Test Cases and Scripts need to be well organised and the organisation well understood and easily recognised by the team.
  • 10. 10 Early Organisation of Test Cases  Test Cases are usually organised under a series of folders. The organisation may differ from project to project. In structuring Test Cases or Scripts the following will need to be considered as a possible workable approach for organising Tests:  Requirements  Business Use Cases  Functional Grouping  Equipment Functionality  Data Type  Other….
  • 11. 11 Getting Started  When creating Test Cases, it may be that the Test Cases have been created with tooling such as CTE and the test cases have been created as a flat table or series of flat tables. The test manager will want to group these for assigning to testers to create Test Scripts.  It is often easier to initially assign the test cases to high level folders and then as the Test Scripts are created, the Test Cases are moved to a more appropriate folder structure grouping.
  • 12. 12 Setting Out Test Cases  Test Cases can be stored initially at a high level and as sorted then transferred to lower level folders. Portal Server Agent Project ABC Admin User Set-Up System User Functions Positive Test Negative Test
  • 13. 13 Considerations for Priority and Regression  Typically during testing a test manager will need to do the following, which can be helped by good Test Case structure:  Assign specific sets of Test Cases to specialist testers.  Prioritise the creation of Test Cases by Positive testing.  Positive tests check that the normal functional path is working for normal inputs.  In contrast a negative test will provide an illegal entry and will thus test the resilience and error handling capability of the functionality. Often negative tests are more efficient at finding less obvious defects and specifically those defects that may cause a major system failure.  Prioritise Test Cases for regression test sets.  Prioritise Test Cases for automation.  Choose Test Cases to test a defect fix.  Choose a small subset of Test Cases to decide if a build is fit for accepting into testing – eliminating bad build injection into test.  Choose a subset of Test Cases for reuse in Acceptance Testing. Hence the reason for structure needs to be understood by the team.
  • 14. 14 Dealing with Test Phases  It is often simpler to create a library of Test Scripts, where these are maintained centrally and then copy down Test Scripts to appropriate level folders for the test phase: Project ABC Integration Build1 FAT UAT SAT OAT COPY Test Sub- Folders Specialist test management tooling allows results and scripts to be managed without the need for copying. However some tools are better than others.
  • 15. 15 Limitations on Folder Structure  Be aware that some test tools and older versions of well established tooling, have limitations on path length.  The total number of characters for the Test Case name (path) and Test Script (file) are limited.  If this happens to be the case then appropriate abbreviations will need to be used that are well understood by the team.
  • 16. 16 Agile  If using an Agile approach, then you will need to consider how you add Test Cases and map these to Agile Stories and at the same time allow your administration of Regression Tests.  Ensure that Test Cases for Performance and Security are added early. The content will improve over the life span of the test delivery, however they need to be created early on in the test cycle.
  • 17. 17 Warning  Take great care to maintain a sustainable test script library.  There is always a danger that with a poorly defined system, tests are not maintained and new and even repeated tests are added. This is dangerous for a project because:  Older tests will eventually break, causing further delays to test runs.  There is a greater maintenance cost as more tests get added.  The time to run a suite of tests increases, adding significant costs to testing.  Make certain the test team understand the need for maintenance and make sure that tests for specific functions can be quickly identified.
  • 18. 18 Test Script Overview  Test Scripts have 3 key elements.:  Step Number – providing the sequence for Action (which includes Observation).  Action – A unique step in a sequence of Action or Observation.  The Expected Outcome from the result, against which a Pass or Fail is measured.  Note: When using traditional Test Management Tools, further columns are added for Pass/Fail and Comments. However if making do with tools such as Excel, there is a need to add columns for this and have a way of referencing any attachments – such as screen captures. So you will need to add a column for comments, defect ID cross reference and for any hyperlink to screen captures, which will need to be stored in a structured directory.  With an excel solution, there also needs to be an approach for making sure the issue of the test script is maintained and the results of [past test runs are mapped to a specific issue of the script.  Test script maintenance can also be achieved by each Excel workbook having a master blank script, which is copied within the file and used for completion during a specific run. Try to avoid the need to edit multiple scripts, so work maintenance is minimised. Step Action Expected Result 1
  • 19. 19 Setting Out Test Actions #1  Test Script Actions need to be set out in a logical order of events.  Step 1 – will detail any test assumptions. Do consider that often a test run may at times vary. So if a test is for example about logging in with a user name of 3 characters, then state this early. This then avoids the situation of a busy test team using a standard assigned user name with more characters. Or avoiding the automated tester writing a replacement automated test script which misses the point of the test.
  • 20. 20 Setting Out Test Actions #2  In setting out steps, we are ensuring that we can carry out tests in a precise and ordered approach that is repeatable. The developer should be able to repeat the test step and obtain the same result and understand exactly what the failure was.  Test Actions also include the action of Observation. So for specific observations ensure that these are included as single steps. This then guides the automated tester to ensure that specific observations need to be captured.
  • 21. 21 Setting Out Test Actions #3 Finally when all the script test actions are complete, there is a final step which will either: Set the system to a known state ready for another test OR Direct the user to run a cleanup script.
  • 22. 22 Level of Detail Required  There is a fine balance in ensuring that there is sufficient information that can be used to understand what action needs to be taken and the amount of information that needs to be maintained.  If testing is likely to utilise an army of untrained testers, then more detail will be required within a test script. This has to be considered early on. Depending on the company this could include: undergraduates, new graduates with no or little previous experience, users, administration staff, etc. So if this is likely then the scripting needs to be addressed early on in development of the scripts.  If code is likely to change significantly then you do not want to create a large number of test scripts with lots of fine detail that will take longer to maintain than it takes to change the code. So in this instance test scripts will be general in description and be less prone to the need of continuous maintenance. However the key purpose of the test case and the choice of vectors needs to be stated clearly.
  • 23. 23 Test Script Referencing #1  In Test Management Tooling, Test Scripts are often contained in a flat table with a file reference. These files are then hooked into Test Cases. This approach has a specific advantage that if a test case is copied and repeated several times, they will always reference the same batch of test scripts, that can be maintained centrally. Changing one test script will update all instances of the Test Script.  Do ensure that a test run results are not impacted by changes in the working Test Script. Any change in a Test Script should not impact any recorded running history, where the previous version was used. Not all Test Tools are helpful in this instance. If this causes a problem you will need to ensure that any configuration control deployed compensates for the flaw in the tooling.  The reason for this is that if you needed to re-run an old version of a test to check a result, or if development roll back code to a previous build, you need to ne able to reference the appropriate version of the test script. If you do not have control of this, then you will be heading for problems.
  • 24. 24 Test Script Referencing #2  In creating Test Scripts, the Script name will need to reflect a number of criteria:  Identify any specific order that a series of scripts has to be run in.  Identify any priority (High, Medium, Low) that is required for automation and regression testing.  Identify, where necessary any version control reference.  Identify the functionality being tested. This can include reference to positive or negative testing.
  • 25. 25 When to Automate  Automation creates a level of administration which can at times be unsustainable. So in automating ensure:  Code has stabilised and is unlikely to need automated tests to be updated.  Do not rely on record and play, where possible use coding to alter data inputs. This means that scripts are far more easily adaptable and maintainable.  Take care with bit map comparisons. Different graphics cards have in the past given rise to sufficient differences to cause failure, where a pass is correct. Modern GUI automation tools allow the threshold for bit map comparison to be adjusted to compensate. Also take care not to compare a whole screen as routine. Positions may vary slightly and so if looking for example a logo, it is possible in some tools to highlight the image that is to appear on the screen and will pass the test if the image appears anywhere on the screen, within specific set boundaries.
  • 26. 26 Cutting Duplication in Test Scripting  This applies to both automated and manual testing. If there is a set-up sequence say of 12 steps, then if you have to repeat that for 100 test scripts that is 1,200 steps that you need to maintain. This is very expensive.  Instead consider setting up a preliminary set up script (say called “preliminary_set_up_test24v1”. This would then have those 12 steps. Any test that needed this would then have a step that says “first run preliminary_set_up_test24” (note no version, however the date and issue control will allow anyone to identify the version run). Any automated scripting would then run the preliminary test before the extension. However any Test Script name would need to indicate that a preliminary test needs to be run first. This is then easier to check a regression suite for the inclusion of any preliminary test.  For Manual Testing this is easily implemented by the tester running the repeat step, with a print out. While in the single repeat step will have a failure that will correspond to one of many steps in the preliminary preparation script, the results should have the ability to detail in which step of the preliminary script the failure occurred. However in practice if one had may repeated failures in a preliminary script, one would raise a defect against the preliminary script and abandon testing on any script that relied on that preliminary test being carried out.