Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 102

Fundamentals

SOFTWARE QUALITY ASSURANCE (SQA)


SQA

DAY 05
What you will learn Today

►Test Data and Test Case Management

2
SQA

Test Cases

3
What is a Test Case?
A Test Case is a set of actions executed to verify a
particular feature or functionality of your software
application.

A Test Case contains test steps, test data,


precondition, postcondition developed for specific
test scenario to verify any requirement.

4
What is a Test Scenario?
A Test Scenario is defined as any functionality that can be
tested.

It is a collective set of test cases which helps the testing


team to determine the positive and negative characteristics
of the project.

Test Scenario gives a high-level idea of what we need to test.

5
SQA

• Example of Test Scenario: For an eCommerce Application, a few


test scenarios would be

Test Scenario
• Test Scenario 1: Check the Search Functionality Test Scenario
• Test Scenario 2: Check the Payments Functionality
• Test Scenario 3: Check the Login Functionality vs Test Case
Test Case is a set of actions executed to
Example of Test Cases: Test cases for the Test Scenario: “Check the Login
Functionality” would be verify features or functionality
Check system behavior when valid email id and password is entered.
Check system behavior when invalid email id and valid password is entered.
Check system behavior when valid email id and invalid password is entered. Test Scenario is any functionality that can be
Test Case Check system behavior when invalid email id and invalid password is entered. tested.
Check system behavior when email id and password are left blank and Sign in entered.
Check Forgot your password is working as expected
Check system behavior when valid/invalid phone number and password is entered.
Check system behavior when “Keep me signed” is

6
SQA

Test Case Design,


Development and Execution
Azure DevOps

7
SQA
Test Case Design and Development
System Study
What steps
Identify all possible test scenarios you would
Write test cases by applying test case design
take to write
techniques, using standard template test case?
Review test cases given to you for reviewing

Fix the review comment of your test cases given by


the reviewer

Test Case approval

Store in test case repository

8
SQA
Test Case Design and Development

How much to document


►Project risks (what must/must not be documented)

►The added value which the documentation brings to the project

►Standards to be followed and/or regulations to be met

►SDLC or approach used (e.g., an Agile approach aims for “just enough” documentation)

►The requirement for traceability from the test basis through test analysis and design

9
Test Case Design and Development SQA

Test Case
States of a

10
SQA
Test Case Design and Development

Common Issues in Test Cases


►Incomplete test cases.
►Missing negative test cases.
►No test data.
►Inappropriate/Incorrect test data.
►Incorrect Expected behavior.
►Grammatical problems.
►Spelling errors.
►Replication of Test Cases.
►Inconsistent tense/voice.
►Incomplete results/number of test runs.
►Defect information was not recorded in the test case.

11
SQA
Test Case Design and Development

Sample Test Case Repository


12
Why do we write Test Cases?

►Test cases help to verify conformance to applicable standards, guidelines and customer
requirements

►Helps you to validate expectations and customer requirements


►Increased control, logic, and data flow coverage
►You can simulate ‘real’ end user scenarios
►Exposes errors or defects
►When test cases are written for test execution, the test engineer’s work will be organized
better and simplified

13
Best practices of Creating Test cases

• Test Cases should be transparent and


Simple
straightforward Keep End
Peer
• Create Test Case by keeping the end user Review
user in
Mind
in the mind
• Avoid test case repetition
• You need to make sure that you will write
test cases to check all software
Evolvable Test Avoid
Repetition

requirements mentioned in the specification


document User
Testing
Case Don’t
• Never assume functionality and features of Techniques
Assume
your software application while preparing a
100%
test case Identifiable
Coverage
• Test Cases must be readily identifiable

14
SQA

Test Case Writing


Azure DevOps

15
SQA
Test Case Design and Development

Test Plan

Test Test
Suite A Suite C

Test Test Test Test Test Test


Case A1 Case A2 Case A3 Case C1 Case C2 Case C3

Test Test Test Test Test Test


Script Script Script Script Script Script

Test Data Test Data Test Data Test Data Test Data Test Data

16
17
Test Case

18
19
20
21
22
23
SQA

Test Case Execution


Azure DevOps

24
25
26
27
28
29
30
31
SQA

Test Case Config Param


Azure DevOps

32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Test Case
Test Case Scenario ID Test Case ID

Test Case Description Test Priority

Pre-Requisite Post-Requisite

Test Execution Steps:

S.No Action Inputs/Test Data Expected Output Actual Output Test Browser Test Result Test
Comments
1

48
Test Case - Executed
Test Case Scenario ID Login-1 Test Case ID Login1-A

Test Case Description Login-Positive test case Test Priority High

Pre-Requisite A valid user account Post-Requisite N/A

Test Execution Steps:

S.No Action Inputs/Test Data Expected Output Actual Output Test Browser Test Result Test
Comments
1 Launch Application https:// Hotel adactin login Hotel adactin login Chrome Pass
adactinhotelapp.com/ page page

2 Enter Correct Username: AmirTester Login Success; Login Success; Chrome Pass
username & Password: AmirTester welcome page should welcome page should
password and hit be displayed be displayed
login button
3

49
SQA

Test Data

50
Test Data
Test Data in Software Testing is the input given to a software program during
test execution.

It represents data that affects or affected by software execution while testing.

Used in
 Positive Testing  to verify that functions produce expected results for
given inputs

 Negative Testing  testing to test software ability to handle unusual,


exceptional or unexpected inputs

51
Test Data
Example Signup Form

S.No First Name Last Name Gender Birthdate Email Address Phone Password Confirm
Number Password
1 Asad Ali F 24/8/90 asadali@test.com USA 123456677 ******** ********

2 Amir ImAm K 40/13/2000 Canada

3 XYZ ahmed D 06/08/1998 abc@wilson.com Pakistan 799546456 *&@!(#&!*@ *&@!(#&!*@

4 Stc jain M 08/11/1999 Pakistan sdfsdfsfsf ASASD!@# ASD

5 AbC website M xyz@gmail.com #!@$#@!$

52
Test Data Generation
►Testing is a process that produces and consumes large amounts of data
►Depending on your testing environment you may need to CREATE Test Data or at least
identify a suitable test data for your test cases.

►Typically test data is created in-sync with the test case it is intended to be used for.

Test Data can be Generated:


►Manually
►Mass copy of data from production to testing environment
►Mass copy of test data from legacy client systems
►Automated Test Data Generation Tools

53
Test Data Generation
Test Data for White Box Testing

In White Box Testing, test data Management is derived from direct examination of the code
to be tested.

• It is desirable to cover as many branches as possible;


• testing data can be generated such that all branches in the program source code are
tested at least once
• Path testing: all paths in the program source code are tested at least once – test data
preparation can done to cover as many cases as possible
• Negative API Testing:
• Testing data may contain invalid parameter types used to call different methods
• Testing data may consist in invalid combinations of arguments which are used to call
the program’s methods
54
Test Data Generation
Test Data for Black Box Testing
In Black Box Testing the code is not visible to the tester. Your functional test cases can
have test data meeting following criteria
No data: Check system response when no data is submitted
Valid data: Check system response when Valid test data is submitted
Invalid data: Check system response when InValid test data is submitted
Illegal data format: Check system response when test data is in an invalid format
Boundary Condition Dataset: Test data meeting boundary value conditions
Equivalence Partition Data Set: Test data qualifying your equivalence partitions.
Decision Table Data Set: Test data qualifying your decision table testing strategy
State Transition Test Data Set: Test data meeting your state transition testing strategy
Use Case Test Data: Test Data in-sync with your use cases.
55
Test Data Generation
Automated Test Data Generation Tools
In order to generate various sets of data, you can use a gamut of automated test data
generation tools. Below are some examples of such tools:

DTM Test Data generator, is a fully customizable utility that generates data, tables (views,
procedures etc.) for database testing (performance testing, QA testing, load testing or
usability testing) purposes.

Datatect is a SQL data generator by Banner Software, generates a variety of realistic test
data in ASCII flat files or directly generates test data for RDBMS including Oracle, Sybase,
SQL Server, and Informix.

56
Test Data Management
How to save test How to create data How to delete data
data
For your AUT or For your AUT or
*.csv; *.xlsx; *.json; *.sql downstream app downstream app
Storage

Creation

Deletion
How to create data How to delete data
Points to Consider • Same was it was
• Average data size • Create through API calls created
used by tests • Create through UI • Do not delete. Create
• Amount of test data • Push in ingestion sources random data every time
• Create in DB directly (or • Restore DB before
• Ease of use of data
DB restore DB snapshot) every run
source & robustness

57
SQA

End of Day 05
58
SQA

Lab Exercise
 Setup and Practice Test Case Writing and Execution in JIRA / Azure DevOps
 Write and Execute BAT/SMOKE Test Cases
 Write and Execute Other Functional Test Cases

59
SQA

Test Case Design,


Development and Execution
JIRA AIO (All in One)

60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
SQA

Q&A
Instructor Notes

102

You might also like