KEMBAR78
How To Write A Test Case In Software Testing | Edureka | PDF
SOFTWARE TESTING DOCUMENTATION
WHAT IS TEST CASE?
TEST CASE FORMAT
TEST CASE DESIGN TECHNIQUES
DEMO: HOW TO WRITE A TEST CASE?
TEST CASE GUIDELINES
www.edureka.co
www.edureka.co
SoftwareTestershashighdemandinITmarket.Accordingto Capgemini’sWorldQualityReportcompaniescontribute
25%budgettothetesting.Andby2025,itmaybearound33%.
Software Testing
www.edureka.cowww.edureka.co
www.edureka.co
Is documentation necessary in
Software Testing?
YES! Documentation plays a critical role in
Test Automation. Let me share my
experience…
A Project….unknown technical
issue…angry client....no
documented requirement
Test Cases: Well-designed
and easy understandable steps
executed to verify a particular
feature of software.
Test Scenario: A
description of an objective a
user might face when using the
program.
Test Scripts: A line-by-line
description of all the actions
and data needed to perform a
test.
www.edureka.co
www.edureka.co
A Test Case is a document which consists of a set of conditions or actions which are performed on the
software application in order to verify the expected functionality of the feature
Good Test Coverage
Better Compliance
Low Deployment Risks
Customer Satisfaction
www.edureka.co
www.edureka.co
Test Case Name Test Case Scenario Pre-Conditions Test Case Steps Test-Data Expected Result Actual Result CommentsTest Case Name Test Case Scenario Pre-Conditions Test Case Steps Test-Data Expected Result Actual Result Comments
A strong name or title that is
self explanatory. Ex. Login
Page, Logout Page.
A test case scenario should
depict particular behaviour
that is being validated. Ex.
Check user login.
Any assumptions or pre-
conditions that must be met
prior to test being executed.
The detailed steps one needs to
execute in order to ensure the
feature under test is working as
expected.
Select a data set that gives
sufficient coverage.
The expected result helps the
tester determine if the test
case passed or failed.
Specifies how the application
actually behaved while test
cases were being executed.
Any other useful information
such as screenshots.
A strong name or title that is
self explanatory. Ex. Login
Page, Logout Page.
A test case scenario should
depict particular behaviour
that is being validated. Ex.
Check user login.
Any assumptions or pre-
conditions that must be met
prior to test being executed.
The detailed steps one needs to
execute in order to ensure the
feature under test is working as
expected.
Select a data set that gives
sufficient coverage.
The expected result helps the
tester determine if the test
case passed or failed.
Specifies how the application
actually behaved while test
cases were being executed.
Any other useful information
such as screenshots.
www.edureka.co
The main purpose of test case design techniques is to test the functionalities and features of the software with the help of
effective test cases. The test case design techniques are broadly classified into three major categories.
TEST CASE DESIGN TECHNIQUES
www.edureka.co
Specification-Based(Black-
Box) Techniques
Leverages external description
of software to test cases:
➢ Technical specifications
➢ Design
➢ Client’s requirements
Experienced-Based
Techniques
Highly dependent on tester’s
experience:
➢ Skills
➢ Knowledge
➢ Expertise
Structure-Based(White-Box)
Techniques
Test cases are designed based
on the internal design:
➢ Software code
➢ Internal structure
➢ Design
www.edureka.co
Test Case Design Techniques
MainAPP
Experience-Based
Black-Box
(Specification–Based)
Boundary Value Analysis
Equivalence Partitioning
Decision Table Testing
State Transition Diagram
Use Case Testing
Statement Coverage
Decision Coverage
Condition Coverage
Multiple Condition Testing
Path Coverage
White-Box
(Specification–Based)
Error Guessing
Exploratory Testing
www.edureka.co
www.edureka.co
Guidelines to follow when writing a good test:
Consider test cases based on risks &
priorities
Remember the 80/20 rule
Start with ‘good enough’ test cases Write, to the point test cases
Classify test cases based on business
scenario & functionality
Put yourself in shoes of the customer
Actively use a test case management tool Monitor all the test cases
www.edureka.co
How not to
write test
cases?
CompositeSteps
WrongWayofWriting
RightWayofWriting
www.edureka.co
How not to
write test
cases?
Multipleconditionsinonetestcase
Solution:Writemodulartests
www.edureka.co
www.edureka.co
Preparing to Write a Test Case
Consider whether a test case already exists or not Know the characteristics of a good test case
Accuracy
Re-Usability
Concision
Performance
Reliability
www.edureka.co
Preparing to Write a Test Case
Consider different scenarios possible before writing Know the characteristics of a good test case
www.edureka.co
Writing a Test Case
Select a tool for writing a test case Write a test case with chosen tool
www.edureka.co
Writing a Test Case
Write a basic test statement for the test case Review the written test case
www.edureka.co
YouTube Video Link in the Description
www.edureka.co

How To Write A Test Case In Software Testing | Edureka

  • 2.
    SOFTWARE TESTING DOCUMENTATION WHATIS TEST CASE? TEST CASE FORMAT TEST CASE DESIGN TECHNIQUES DEMO: HOW TO WRITE A TEST CASE? TEST CASE GUIDELINES www.edureka.co
  • 3.
  • 4.
  • 5.
    www.edureka.co Is documentation necessaryin Software Testing? YES! Documentation plays a critical role in Test Automation. Let me share my experience… A Project….unknown technical issue…angry client....no documented requirement Test Cases: Well-designed and easy understandable steps executed to verify a particular feature of software. Test Scenario: A description of an objective a user might face when using the program. Test Scripts: A line-by-line description of all the actions and data needed to perform a test.
  • 6.
  • 7.
    www.edureka.co A Test Caseis a document which consists of a set of conditions or actions which are performed on the software application in order to verify the expected functionality of the feature Good Test Coverage Better Compliance Low Deployment Risks Customer Satisfaction
  • 8.
  • 9.
    www.edureka.co Test Case NameTest Case Scenario Pre-Conditions Test Case Steps Test-Data Expected Result Actual Result CommentsTest Case Name Test Case Scenario Pre-Conditions Test Case Steps Test-Data Expected Result Actual Result Comments A strong name or title that is self explanatory. Ex. Login Page, Logout Page. A test case scenario should depict particular behaviour that is being validated. Ex. Check user login. Any assumptions or pre- conditions that must be met prior to test being executed. The detailed steps one needs to execute in order to ensure the feature under test is working as expected. Select a data set that gives sufficient coverage. The expected result helps the tester determine if the test case passed or failed. Specifies how the application actually behaved while test cases were being executed. Any other useful information such as screenshots. A strong name or title that is self explanatory. Ex. Login Page, Logout Page. A test case scenario should depict particular behaviour that is being validated. Ex. Check user login. Any assumptions or pre- conditions that must be met prior to test being executed. The detailed steps one needs to execute in order to ensure the feature under test is working as expected. Select a data set that gives sufficient coverage. The expected result helps the tester determine if the test case passed or failed. Specifies how the application actually behaved while test cases were being executed. Any other useful information such as screenshots.
  • 10.
  • 11.
    The main purposeof test case design techniques is to test the functionalities and features of the software with the help of effective test cases. The test case design techniques are broadly classified into three major categories. TEST CASE DESIGN TECHNIQUES www.edureka.co Specification-Based(Black- Box) Techniques Leverages external description of software to test cases: ➢ Technical specifications ➢ Design ➢ Client’s requirements Experienced-Based Techniques Highly dependent on tester’s experience: ➢ Skills ➢ Knowledge ➢ Expertise Structure-Based(White-Box) Techniques Test cases are designed based on the internal design: ➢ Software code ➢ Internal structure ➢ Design
  • 12.
    www.edureka.co Test Case DesignTechniques MainAPP Experience-Based Black-Box (Specification–Based) Boundary Value Analysis Equivalence Partitioning Decision Table Testing State Transition Diagram Use Case Testing Statement Coverage Decision Coverage Condition Coverage Multiple Condition Testing Path Coverage White-Box (Specification–Based) Error Guessing Exploratory Testing
  • 13.
  • 14.
    www.edureka.co Guidelines to followwhen writing a good test: Consider test cases based on risks & priorities Remember the 80/20 rule Start with ‘good enough’ test cases Write, to the point test cases Classify test cases based on business scenario & functionality Put yourself in shoes of the customer Actively use a test case management tool Monitor all the test cases
  • 15.
    www.edureka.co How not to writetest cases? CompositeSteps WrongWayofWriting RightWayofWriting
  • 16.
    www.edureka.co How not to writetest cases? Multipleconditionsinonetestcase Solution:Writemodulartests
  • 17.
  • 18.
    www.edureka.co Preparing to Writea Test Case Consider whether a test case already exists or not Know the characteristics of a good test case Accuracy Re-Usability Concision Performance Reliability
  • 19.
    www.edureka.co Preparing to Writea Test Case Consider different scenarios possible before writing Know the characteristics of a good test case
  • 20.
    www.edureka.co Writing a TestCase Select a tool for writing a test case Write a test case with chosen tool
  • 21.
    www.edureka.co Writing a TestCase Write a basic test statement for the test case Review the written test case
  • 22.
  • 23.