SlideShare a Scribd company logo
SO YOU THINK YOU CAN WRITE A
TEST CASE
Srilu Pinjala (Sridevi)
PNSQC
ASSUMING
 Audience has experience
estimating tests and
scenarios.
Audience attempted to write
test cases at some point.
ISSUES
 Can’t understand test cases
written by others.
 New testers are dependent
on legacy testers.
 Test Cases are not aiding to
test accurately or completely.
WHY ARE WE HERE?
 Test Cases written during a project do not
suffice in supporting the product through its life.
INTRODUCTION
Difference between TESTING and TEST CASE
Testing is ACTION Test Case is a DOCUMENT
TEST CASE ..
 Test Case is mere text. It is instructions and
verification in its simplest form.
 Test Case is a journal with information about
what was tested and how.
 Test Case belongs to the product.
PURPOSE OF A TEST CASE
“A Test Case has two purposes: to expose an error, or
to demonstrate correct execution.” (Jorgensen, 2014)
 It explains when and how to test.
 It serves as a guide to learn about the product.
It exposes errors in case of regression.
TYPES OF TEST CASES
(Not to be confused with the types of testing.)
TYPES OF TEST CASES
EXPLORING
 To actually test
elements, functions,
flows, and more.
 To test the heck out
of the product.
PILOTING
 To navigate to the
test elements, that
need to be tested.
 To avoid testing the
same thing twice.
TYPES OF TEST CASES
EXPLORING PILOTING
TYPES OF TEST CASES
EXPLORING
 Unique
 One action
 Verify specifics
 Do not cram
PILOTING
 Usual
 One set of actions
 Verify generic
 Do not cram
USERS
Identify the test case user base
 Author
 Other testers
 UA Testers
 End Users
 Business Analysts
 Developers
 Project, Product,
Program managers
WHEN TO START WRITING
TEST CASES?
REQUIREMENTS
Requirements are written to create products that are powerful, with
the hopes that the whole process and the product can be controlled.
Every Freaking time!!
Products could end up different, even when the acceptance
criteria is met.
REQUIREMENT TO PRODUCT
TAKES ON A NEW LIFE
• Due to many moving
parts, the product ends
up slightly or entirely
different with some
expected features.
• It is what was asked for,
but somehow different.
TESTING REQUIREMENTS
 Testing a requirement is not always possible.
 They are abstract like
and not clear.
 Interpreting them
leaves to assumptions
BEST TIME TO WRITE
 As soon as the requirement is signed off
 Before the application is developed
 Before starting any testing
AFTER THE FIRST ROUND OF
TESTING
 GUI is available for exploring
 Environment, database, services, etc. are
evident
 Questions can be answered clearly
WHAT DOES THE TEST
CASE BELONG TO?
SPEC, PROJECT,
PRODUCT?
 Verifying requirements is not enough testing
 They are project specific for a limited time
 Test Cases are for supporting the product
 They have to be written, edited, and deleted as the
product changes through its life
KEY COMPONENTS OF A
TEST CASE
KEY COMPONENTS
Test Step
 User actions
 Data inputs
 Instructions to the
tester
Expected Result
 Verification of GUI
and Data changes
 Specifics of changed
state
Everything else are bells and whistles.
HOW NOT TO WRITE
Scenario Test step Expected
Result
Cell phone
charges
Charge the
cell phone
Cell phone
charged fully
Scenario Test step Expected Result
Open Website Go to Home Page Page Loads fully
HOW TO WRITE
 Robots do not understand logic
 They execute specific
instructions
 They are only as good as your
instructions
LIKE TALKING TO A ROBOT
CASE IS ABOUT HOW
TEST STEP - EXAMPLES
 Go to URL – www.pnsqc.org
 Type in field Username (myname)
 Check ON checkbox ALL
 SQL - [SELECT userID, userKey FROM Users
WHERE userKey = 7]
 Go back one page; Refresh page; Go forward one page.
TEST STEP - DO
 Keep the steps clear, simple, specific (CSS)
 One step at a time / One function at a time
 Instruct to use specific data. Explain where to
get it.
 Present Tense – test case should be in present
tense
TEST STEP – DON’TS
 Jargons, abbreviations, project specific terms to
describe. They change!!
 Repeat above steps. They change!!
 Test a feature. Tell how to test.
 Valid data, invalid data, etc. Give examples of
valid and invalid
RESULTS - EXAMPLES
 Page appears with title Login
 Header consists of link Click here
 Error message “so and so” appears.
 Auto-complete appears with 5 matching suggestions.
 SQL verification – columns UserID & Pass
SQL Result – Top 5 match the search results
RESULT – DO’S
 Results should be tangible and verifiable.
 Keep it clear, simples, specific (CSS)
 one step can have multiple verifications.
 List as many verifications as necessary (title,
logo, text, images, links, error messages, etc.)
 Describe verbatim / WYSWIG
RESULTS – DON’TS
 Loads successfully – Explain successful
 It has no errors – Explain what kind of errors
 System accepts – Explain how the system
accepts by verifying text, database, etc.
 It works – Explain how to verify it works
TEST CASE LIFE CYCLE
test case Life
Cycle
START HERE
 Study / Revise – the application
 Map – the pages, elements, functions or features
 Explore – the interfaces, databases, environments, services, etc.
 Design – test cases with appropriate names and organize them
in suitable categories.
 Integrate – the mini test cases and update related information
needed for test execution.
STUDY / REVISE
Study the product
 No. of pages, each page
 CSS and unique parts
 Authentication roles
 Session timeouts
 Notifications and Errors
 Many more
PICK A STYLE
 Model the tests around the GUI features,
core functions, flows, data, etc.
 There is no wrong or right way of testing.
The decision is based on your best
judgement.
 If it does not work, change it. Its okay.
MAP
page Login
field Email or phone
field Password
checkbox Keep me signed in
button Sign In
link Can’t access your account?
link Sign in with a single-use code
logo Outlook
MAP
 Split the application into modules or pages
 Identify the common CSS elements
 List the unique elements and their hierarchy
 Use a spreadsheet to list the elements by their hierarchy.
 Hierarchy – If functions in Level-1 fail, there is not point in
testing the functions in Level-2 under that function.
EXPLORE
 URL – invoke in multiple browser and operating systems.
 Page – refresh, resize, go back and forth
 Authenticate – login flow, user roles, etc.
 Profile information – set up, edit, delete profiles.
 Search feature – autocomplete, results, etc.
 Text fields – field validation (alpha, numeric, chars)
 Links – what do they open. Buttons – what do they process
 Session time out, etc.
EXPLORATORY TEST CASE
Page Attributes
Go to URL Hotmail.com Page open with title – Sign In
Left section –
Image – www.wiki.com/mycompany/signimage
Field – enter your phone number and we’ll send you the
download link; Button – Send My Link
Right section –
Logo – Outlook
Fields – Email or Phone, Password
Checkbox – Keep me signed in
Button – Sign in
Links – What’s this?, Can’t access your account?, Sign in with a
single-use code
Footer section –
Links – Contact Us, Terms of Use, Privacy & Cookies, Link
Disclaimer ©Copyright
DESIGN
 Design test cases for all the known scenarios with data,
environment, services information.
 They maybe used individually or in sets.
 Multiple scenarios may be listed in one test case. (This is not
same as cramming)
 Maintain a separate suite of these test cases to be called easily.
 Update here and related test sets update instantly.
DESIGN TEST CASES
Test Step Expected Result
Select any amount of text.
Click icon CUT (Home > Clipboard >
Cut)
The selected text is cut (disappears) from the page /
cell.
Test Step Expected Result
Select any amount of text.
Click icon Copy (Home > Clipboard >
Copy)
The selected text persists on the page.
It does not disappear from the page.
INTEGRATE
 Integrate the individual test cases to form scenario based test
cases from end to end telling a story.
 Add information about data inputs and verification. Any other
verifications too.
These test cases may now be linked to any requirements as they
fit.
 Organize the test cases in test execution order and dependency.
THE CYCLE GOES ON
 Test case is not a one time thing.
 Write it, but don’t forget it. Visit them from time to time.
 CHANGED FEATURES – update existing test cases.
 NEW FEATURE New test case will be needed.
 Edit, Merge and delete as necessary.
 Having an Owner for the test cases is recommended.
REVISE
 When a exploratory test
case or condition or data is
updated, the Full test case is
automatically updated.
 Updating one test case will
update the test sets across
the suite.
TEST CASE NAMING
CONVENTION
Naming is a part of Test Case DESIGN
NAME IS ABOUT WHAT
 First part – belongs to the product
 Second part – belongs to the module, page
 Third part – belongs to the feature
 Fourth part – belongs to the function
(It could have more parts)
EXAMPLES
• Ms.PPT.Invoke
• Ms.PPT.mHome_iCut
• Ms.PPT.mHome_iCopy
• Ms.PPT.mHome_iPaste
• Ms.PPT.mHome_iPaste_oPa
ste
• Col.Search
• Col.nav.Home
Clearly identifying test cases
make it easy to sort through
them to identify..
 What is covered.
 What is not covered.
 Eliminates redundancy
 Locating, locating, locating
GO THE DISTANCE
ENABLE THE TESTER
PROVIDE TOOLS
ACCESSORIZE THE
TEST CASES
TEST DATA
 List test data in the test step OR
 List test data in a separate column
 Provide exact data, SQL queries and verification
 Maintain Wikis, Excel sheets, etc. with Test
data, environment information and screen shots.
 Provide ideas and tools to execute tests faster.
DATA SHEET
 Test data may be provided in data sheets.
 Certain test cases require the same steps and
flow, but require variety of data to result various
expected results.
 Each iteration does not need a new test case
 Pair the test case with a data sheet.
AVOID HUMAN ERRORS
We are intelligent beings, but not as smart as we assume we
are. If you think you cannot error, you don’t know yourself
TEST THIS!!
 If you can read this, You
just missed typo bugs!!
 Instruct to copy paste text
in a Word document, to not
miss typos.
 Don’t forget to compare it
to previous versions.
PICTURE SAYS A 1000 WORDS
So, be Specific about what to look for.
 Highlight what to look for and what to ignore.
 Avoid missing on actual
bugs as well as invalid
bugs.
 Going the extra mile, saves
tons of time
FIND THE DIFFERENCES
 Explain what is acceptable
 Explain localization and
marketplace exceptions
 Explain if variations are
expected and known between
browsers and devices.
PROVIDE THE TOOLS
 Provide tools to get the job done fast and
Right!!
Testing is not the place to test the testers
about testing a product they don’t know.
LESSONS LEARNT
 School teaches lessons and gives tests. Software
gives you tests and teaches you lessons.
 Note down what you learnt in Clear, Simple, Specific
instructions.
 Don’t assume the tester will understand and know
how to test. They are just executing your instructions.
SUMMARY
 Test Case belongs to the product. Its name should be
associated to the product, module, feature and functions.
 Test Cases support the product through its life, so don’t
write the them on assumptions based on requirements.
 Write test cases after exploring first hand.
 Exploratory test cases explore every inch of the product.
 Pilot test cases merely navigate through the product.
THE END
Want a laugh – http://qasrilu.blogspot.com
Want to connect – https://linkedin.com/in/SriluPinjala
Want to join PNSQC – Srilu.PNSQC@gmail.com
Srilu is leaving the building. I hope you had fun!!

More Related Content

What's hot

Test Case Naming 02
Test Case Naming 02Test Case Naming 02
Test Case Naming 02SriluBalla
 
Test case techniques
Test case techniquesTest case techniques
Test case techniques
Pina Parmar
 
Test Cases Vs Test Scenarios
Test Cases Vs Test ScenariosTest Cases Vs Test Scenarios
Test Cases Vs Test Scenarios
Sneha Singh
 
Test Case, Use Case and Test Scenario
Test Case, Use Case and Test ScenarioTest Case, Use Case and Test Scenario
Test Case, Use Case and Test Scenario
Lokesh Agrawal
 
How To Write A Test Case In Software Testing | Edureka
How To Write A Test Case In Software Testing | EdurekaHow To Write A Test Case In Software Testing | Edureka
How To Write A Test Case In Software Testing | Edureka
Edureka!
 
Test case design techniques
Test case design techniquesTest case design techniques
Test case design techniques
Ashutosh Garg
 
Software Testing Process
Software Testing ProcessSoftware Testing Process
Software Testing Process
guest1f2740
 
Writing Test Cases in Agile
Writing Test Cases in AgileWriting Test Cases in Agile
Writing Test Cases in Agile
Saroj Singh
 
Manual software-testing-interview-questions-with-answers
Manual software-testing-interview-questions-with-answersManual software-testing-interview-questions-with-answers
Manual software-testing-interview-questions-with-answers
Sachin Gupta
 
Agile testing - Testing From Day 1
Agile testing - Testing From Day 1Agile testing - Testing From Day 1
Agile testing - Testing From Day 1
Kaizenko
 
Automation frameworks
Automation frameworksAutomation frameworks
Automation frameworks
Vishwanath KC
 
Testing methodology
Testing methodologyTesting methodology
Testing methodology
Dina Hanbazazah
 
Test scenarios for sending & receiving emails
Test scenarios for sending & receiving emailsTest scenarios for sending & receiving emails
Test scenarios for sending & receiving emailsMorpheous Algan
 
Testing fundamentals
Testing fundamentalsTesting fundamentals
Testing fundamentals
Raviteja Chowdary Adusumalli
 
Manual testing concepts course 1
Manual testing concepts course 1Manual testing concepts course 1
Manual testing concepts course 1Raghu Kiran
 
Black Box Testing
Black Box TestingBlack Box Testing
Black Box Testing
Nivetha Padmanaban
 
Software Testing Process, Testing Automation and Software Testing Trends
Software Testing Process, Testing Automation and Software Testing TrendsSoftware Testing Process, Testing Automation and Software Testing Trends
Software Testing Process, Testing Automation and Software Testing Trends
KMS Technology
 
What is Test Plan? Edureka
What is Test Plan? EdurekaWhat is Test Plan? Edureka
What is Test Plan? Edureka
Edureka!
 

What's hot (20)

Test Case Naming 02
Test Case Naming 02Test Case Naming 02
Test Case Naming 02
 
Test case techniques
Test case techniquesTest case techniques
Test case techniques
 
Test Cases Vs Test Scenarios
Test Cases Vs Test ScenariosTest Cases Vs Test Scenarios
Test Cases Vs Test Scenarios
 
Test Case, Use Case and Test Scenario
Test Case, Use Case and Test ScenarioTest Case, Use Case and Test Scenario
Test Case, Use Case and Test Scenario
 
How To Write A Test Case In Software Testing | Edureka
How To Write A Test Case In Software Testing | EdurekaHow To Write A Test Case In Software Testing | Edureka
How To Write A Test Case In Software Testing | Edureka
 
Test case design techniques
Test case design techniquesTest case design techniques
Test case design techniques
 
Software Testing Process
Software Testing ProcessSoftware Testing Process
Software Testing Process
 
Writing Test Cases in Agile
Writing Test Cases in AgileWriting Test Cases in Agile
Writing Test Cases in Agile
 
Manual software-testing-interview-questions-with-answers
Manual software-testing-interview-questions-with-answersManual software-testing-interview-questions-with-answers
Manual software-testing-interview-questions-with-answers
 
Agile testing - Testing From Day 1
Agile testing - Testing From Day 1Agile testing - Testing From Day 1
Agile testing - Testing From Day 1
 
Automation frameworks
Automation frameworksAutomation frameworks
Automation frameworks
 
Testing
TestingTesting
Testing
 
Testing methodology
Testing methodologyTesting methodology
Testing methodology
 
Test scenarios for sending & receiving emails
Test scenarios for sending & receiving emailsTest scenarios for sending & receiving emails
Test scenarios for sending & receiving emails
 
Testing fundamentals
Testing fundamentalsTesting fundamentals
Testing fundamentals
 
Manual testing concepts course 1
Manual testing concepts course 1Manual testing concepts course 1
Manual testing concepts course 1
 
Black Box Testing
Black Box TestingBlack Box Testing
Black Box Testing
 
Exploratory test
Exploratory testExploratory test
Exploratory test
 
Software Testing Process, Testing Automation and Software Testing Trends
Software Testing Process, Testing Automation and Software Testing TrendsSoftware Testing Process, Testing Automation and Software Testing Trends
Software Testing Process, Testing Automation and Software Testing Trends
 
What is Test Plan? Edureka
What is Test Plan? EdurekaWhat is Test Plan? Edureka
What is Test Plan? Edureka
 

Similar to So you think you can write a test case

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
Tabăra de Testare
 
Generating Test Cases
Generating Test CasesGenerating Test Cases
Generating Test Cases
VivekRajawat9
 
Testcase training
Testcase trainingTestcase training
Testcase trainingmedsherb
 
Lightning Talks by Globant - Automation (This app runs by itself )
Lightning Talks by Globant -  Automation (This app runs by itself ) Lightning Talks by Globant -  Automation (This app runs by itself )
Lightning Talks by Globant - Automation (This app runs by itself )
Globant
 
Testcase definition
Testcase definitionTestcase definition
Testcase definitionOana Feidi
 
Testing 1 - the Basics
Testing 1 - the BasicsTesting 1 - the Basics
Testing 1 - the Basics
ArleneAndrews2
 
Use Automation to Assist—Not Replace—Manual Testing
Use Automation to Assist—Not Replace—Manual TestingUse Automation to Assist—Not Replace—Manual Testing
Use Automation to Assist—Not Replace—Manual Testing
TechWell
 
How can Test Cases benefit a tester .pptx
How can Test Cases benefit a tester .pptxHow can Test Cases benefit a tester .pptx
How can Test Cases benefit a tester .pptx
test2k
 
Real Life Unit Testing
Real Life Unit TestingReal Life Unit Testing
Real Life Unit Testing
Dror Helper
 
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
99tests
 
September_08 SQuAd Presentation
September_08 SQuAd PresentationSeptember_08 SQuAd Presentation
September_08 SQuAd Presentation
iradari
 
Beyond "Quality Assurance"
Beyond "Quality Assurance"Beyond "Quality Assurance"
Beyond "Quality Assurance"
Jason Benton
 
Software Testing
Software TestingSoftware Testing
Software Testing
AdroitLogic
 
An introduction to unit testing
An introduction to unit testingAn introduction to unit testing
An introduction to unit testing
Adam Stephensen
 
Testing
TestingTesting
Testing
Kiran Kumar
 
Introduction to testing.
Introduction to testing.Introduction to testing.
Introduction to testing.
Jithinctzz
 
Leveraging Visual Testing with Your Functional Tests
Leveraging Visual Testing with Your Functional TestsLeveraging Visual Testing with Your Functional Tests
Leveraging Visual Testing with Your Functional Tests
TEST Huddle
 
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
 

Similar to So you think you can write a test case (20)

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
 
Generating Test Cases
Generating Test CasesGenerating Test Cases
Generating Test Cases
 
Testcase training
Testcase trainingTestcase training
Testcase training
 
Lightning Talks by Globant - Automation (This app runs by itself )
Lightning Talks by Globant -  Automation (This app runs by itself ) Lightning Talks by Globant -  Automation (This app runs by itself )
Lightning Talks by Globant - Automation (This app runs by itself )
 
Testcase definition
Testcase definitionTestcase definition
Testcase definition
 
Testing 1 - the Basics
Testing 1 - the BasicsTesting 1 - the Basics
Testing 1 - the Basics
 
Use Automation to Assist—Not Replace—Manual Testing
Use Automation to Assist—Not Replace—Manual TestingUse Automation to Assist—Not Replace—Manual Testing
Use Automation to Assist—Not Replace—Manual Testing
 
How can Test Cases benefit a tester .pptx
How can Test Cases benefit a tester .pptxHow can Test Cases benefit a tester .pptx
How can Test Cases benefit a tester .pptx
 
Real Life Unit Testing
Real Life Unit TestingReal Life Unit Testing
Real Life Unit 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
 
Testing
TestingTesting
Testing
 
September_08 SQuAd Presentation
September_08 SQuAd PresentationSeptember_08 SQuAd Presentation
September_08 SQuAd Presentation
 
Beyond "Quality Assurance"
Beyond "Quality Assurance"Beyond "Quality Assurance"
Beyond "Quality Assurance"
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
An introduction to unit testing
An introduction to unit testingAn introduction to unit testing
An introduction to unit testing
 
Testing
TestingTesting
Testing
 
Introduction to testing.
Introduction to testing.Introduction to testing.
Introduction to testing.
 
Leveraging Visual Testing with Your Functional Tests
Leveraging Visual Testing with Your Functional TestsLeveraging Visual Testing with Your Functional Tests
Leveraging Visual Testing with Your Functional Tests
 
Ooad
OoadOoad
Ooad
 
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
 

Recently uploaded

Nidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, TipsNidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, Tips
vrstrong314
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
abdulrafaychaudhry
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 

Recently uploaded (20)

Nidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, TipsNidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, Tips
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 

So you think you can write a test case

  • 1. SO YOU THINK YOU CAN WRITE A TEST CASE Srilu Pinjala (Sridevi) PNSQC
  • 2. ASSUMING  Audience has experience estimating tests and scenarios. Audience attempted to write test cases at some point.
  • 3. ISSUES  Can’t understand test cases written by others.  New testers are dependent on legacy testers.  Test Cases are not aiding to test accurately or completely.
  • 4. WHY ARE WE HERE?  Test Cases written during a project do not suffice in supporting the product through its life.
  • 5. INTRODUCTION Difference between TESTING and TEST CASE Testing is ACTION Test Case is a DOCUMENT
  • 6. TEST CASE ..  Test Case is mere text. It is instructions and verification in its simplest form.  Test Case is a journal with information about what was tested and how.  Test Case belongs to the product.
  • 7. PURPOSE OF A TEST CASE “A Test Case has two purposes: to expose an error, or to demonstrate correct execution.” (Jorgensen, 2014)  It explains when and how to test.  It serves as a guide to learn about the product. It exposes errors in case of regression.
  • 8. TYPES OF TEST CASES (Not to be confused with the types of testing.)
  • 9. TYPES OF TEST CASES EXPLORING  To actually test elements, functions, flows, and more.  To test the heck out of the product. PILOTING  To navigate to the test elements, that need to be tested.  To avoid testing the same thing twice.
  • 10. TYPES OF TEST CASES EXPLORING PILOTING
  • 11. TYPES OF TEST CASES EXPLORING  Unique  One action  Verify specifics  Do not cram PILOTING  Usual  One set of actions  Verify generic  Do not cram
  • 12. USERS Identify the test case user base  Author  Other testers  UA Testers  End Users  Business Analysts  Developers  Project, Product, Program managers
  • 13. WHEN TO START WRITING TEST CASES?
  • 14. REQUIREMENTS Requirements are written to create products that are powerful, with the hopes that the whole process and the product can be controlled. Every Freaking time!!
  • 15. Products could end up different, even when the acceptance criteria is met. REQUIREMENT TO PRODUCT
  • 16. TAKES ON A NEW LIFE • Due to many moving parts, the product ends up slightly or entirely different with some expected features. • It is what was asked for, but somehow different.
  • 17. TESTING REQUIREMENTS  Testing a requirement is not always possible.  They are abstract like and not clear.  Interpreting them leaves to assumptions
  • 18. BEST TIME TO WRITE  As soon as the requirement is signed off  Before the application is developed  Before starting any testing
  • 19. AFTER THE FIRST ROUND OF TESTING  GUI is available for exploring  Environment, database, services, etc. are evident  Questions can be answered clearly
  • 20. WHAT DOES THE TEST CASE BELONG TO?
  • 21. SPEC, PROJECT, PRODUCT?  Verifying requirements is not enough testing  They are project specific for a limited time  Test Cases are for supporting the product  They have to be written, edited, and deleted as the product changes through its life
  • 22. KEY COMPONENTS OF A TEST CASE
  • 23. KEY COMPONENTS Test Step  User actions  Data inputs  Instructions to the tester Expected Result  Verification of GUI and Data changes  Specifics of changed state Everything else are bells and whistles.
  • 24. HOW NOT TO WRITE Scenario Test step Expected Result Cell phone charges Charge the cell phone Cell phone charged fully Scenario Test step Expected Result Open Website Go to Home Page Page Loads fully
  • 25. HOW TO WRITE  Robots do not understand logic  They execute specific instructions  They are only as good as your instructions LIKE TALKING TO A ROBOT
  • 27. TEST STEP - EXAMPLES  Go to URL – www.pnsqc.org  Type in field Username (myname)  Check ON checkbox ALL  SQL - [SELECT userID, userKey FROM Users WHERE userKey = 7]  Go back one page; Refresh page; Go forward one page.
  • 28. TEST STEP - DO  Keep the steps clear, simple, specific (CSS)  One step at a time / One function at a time  Instruct to use specific data. Explain where to get it.  Present Tense – test case should be in present tense
  • 29. TEST STEP – DON’TS  Jargons, abbreviations, project specific terms to describe. They change!!  Repeat above steps. They change!!  Test a feature. Tell how to test.  Valid data, invalid data, etc. Give examples of valid and invalid
  • 30. RESULTS - EXAMPLES  Page appears with title Login  Header consists of link Click here  Error message “so and so” appears.  Auto-complete appears with 5 matching suggestions.  SQL verification – columns UserID & Pass SQL Result – Top 5 match the search results
  • 31. RESULT – DO’S  Results should be tangible and verifiable.  Keep it clear, simples, specific (CSS)  one step can have multiple verifications.  List as many verifications as necessary (title, logo, text, images, links, error messages, etc.)  Describe verbatim / WYSWIG
  • 32. RESULTS – DON’TS  Loads successfully – Explain successful  It has no errors – Explain what kind of errors  System accepts – Explain how the system accepts by verifying text, database, etc.  It works – Explain how to verify it works
  • 33. TEST CASE LIFE CYCLE
  • 35. START HERE  Study / Revise – the application  Map – the pages, elements, functions or features  Explore – the interfaces, databases, environments, services, etc.  Design – test cases with appropriate names and organize them in suitable categories.  Integrate – the mini test cases and update related information needed for test execution.
  • 36. STUDY / REVISE Study the product  No. of pages, each page  CSS and unique parts  Authentication roles  Session timeouts  Notifications and Errors  Many more
  • 37. PICK A STYLE  Model the tests around the GUI features, core functions, flows, data, etc.  There is no wrong or right way of testing. The decision is based on your best judgement.  If it does not work, change it. Its okay.
  • 38. MAP page Login field Email or phone field Password checkbox Keep me signed in button Sign In link Can’t access your account? link Sign in with a single-use code logo Outlook
  • 39. MAP  Split the application into modules or pages  Identify the common CSS elements  List the unique elements and their hierarchy  Use a spreadsheet to list the elements by their hierarchy.  Hierarchy – If functions in Level-1 fail, there is not point in testing the functions in Level-2 under that function.
  • 40. EXPLORE  URL – invoke in multiple browser and operating systems.  Page – refresh, resize, go back and forth  Authenticate – login flow, user roles, etc.  Profile information – set up, edit, delete profiles.  Search feature – autocomplete, results, etc.  Text fields – field validation (alpha, numeric, chars)  Links – what do they open. Buttons – what do they process  Session time out, etc.
  • 41. EXPLORATORY TEST CASE Page Attributes Go to URL Hotmail.com Page open with title – Sign In Left section – Image – www.wiki.com/mycompany/signimage Field – enter your phone number and we’ll send you the download link; Button – Send My Link Right section – Logo – Outlook Fields – Email or Phone, Password Checkbox – Keep me signed in Button – Sign in Links – What’s this?, Can’t access your account?, Sign in with a single-use code Footer section – Links – Contact Us, Terms of Use, Privacy & Cookies, Link Disclaimer ©Copyright
  • 42. DESIGN  Design test cases for all the known scenarios with data, environment, services information.  They maybe used individually or in sets.  Multiple scenarios may be listed in one test case. (This is not same as cramming)  Maintain a separate suite of these test cases to be called easily.  Update here and related test sets update instantly.
  • 43. DESIGN TEST CASES Test Step Expected Result Select any amount of text. Click icon CUT (Home > Clipboard > Cut) The selected text is cut (disappears) from the page / cell. Test Step Expected Result Select any amount of text. Click icon Copy (Home > Clipboard > Copy) The selected text persists on the page. It does not disappear from the page.
  • 44. INTEGRATE  Integrate the individual test cases to form scenario based test cases from end to end telling a story.  Add information about data inputs and verification. Any other verifications too. These test cases may now be linked to any requirements as they fit.  Organize the test cases in test execution order and dependency.
  • 45. THE CYCLE GOES ON  Test case is not a one time thing.  Write it, but don’t forget it. Visit them from time to time.  CHANGED FEATURES – update existing test cases.  NEW FEATURE New test case will be needed.  Edit, Merge and delete as necessary.  Having an Owner for the test cases is recommended.
  • 46. REVISE  When a exploratory test case or condition or data is updated, the Full test case is automatically updated.  Updating one test case will update the test sets across the suite.
  • 47. TEST CASE NAMING CONVENTION Naming is a part of Test Case DESIGN
  • 48. NAME IS ABOUT WHAT  First part – belongs to the product  Second part – belongs to the module, page  Third part – belongs to the feature  Fourth part – belongs to the function (It could have more parts)
  • 49. EXAMPLES • Ms.PPT.Invoke • Ms.PPT.mHome_iCut • Ms.PPT.mHome_iCopy • Ms.PPT.mHome_iPaste • Ms.PPT.mHome_iPaste_oPa ste • Col.Search • Col.nav.Home Clearly identifying test cases make it easy to sort through them to identify..  What is covered.  What is not covered.  Eliminates redundancy  Locating, locating, locating
  • 50. GO THE DISTANCE ENABLE THE TESTER PROVIDE TOOLS ACCESSORIZE THE TEST CASES
  • 51. TEST DATA  List test data in the test step OR  List test data in a separate column  Provide exact data, SQL queries and verification  Maintain Wikis, Excel sheets, etc. with Test data, environment information and screen shots.  Provide ideas and tools to execute tests faster.
  • 52. DATA SHEET  Test data may be provided in data sheets.  Certain test cases require the same steps and flow, but require variety of data to result various expected results.  Each iteration does not need a new test case  Pair the test case with a data sheet.
  • 53. AVOID HUMAN ERRORS We are intelligent beings, but not as smart as we assume we are. If you think you cannot error, you don’t know yourself
  • 54. TEST THIS!!  If you can read this, You just missed typo bugs!!  Instruct to copy paste text in a Word document, to not miss typos.  Don’t forget to compare it to previous versions.
  • 55. PICTURE SAYS A 1000 WORDS So, be Specific about what to look for.  Highlight what to look for and what to ignore.  Avoid missing on actual bugs as well as invalid bugs.  Going the extra mile, saves tons of time
  • 56. FIND THE DIFFERENCES  Explain what is acceptable  Explain localization and marketplace exceptions  Explain if variations are expected and known between browsers and devices.
  • 57. PROVIDE THE TOOLS  Provide tools to get the job done fast and Right!! Testing is not the place to test the testers about testing a product they don’t know.
  • 58. LESSONS LEARNT  School teaches lessons and gives tests. Software gives you tests and teaches you lessons.  Note down what you learnt in Clear, Simple, Specific instructions.  Don’t assume the tester will understand and know how to test. They are just executing your instructions.
  • 59. SUMMARY  Test Case belongs to the product. Its name should be associated to the product, module, feature and functions.  Test Cases support the product through its life, so don’t write the them on assumptions based on requirements.  Write test cases after exploring first hand.  Exploratory test cases explore every inch of the product.  Pilot test cases merely navigate through the product.
  • 60. THE END Want a laugh – http://qasrilu.blogspot.com Want to connect – https://linkedin.com/in/SriluPinjala Want to join PNSQC – Srilu.PNSQC@gmail.com Srilu is leaving the building. I hope you had fun!!