0% found this document useful (0 votes)
2 views

Lecture 16

The document provides a comprehensive guide on writing test documentation, focusing on test scenarios and test cases. It outlines the definitions, importance, and steps to create test scenarios, as well as the differences between test scenarios and test cases. Additionally, it discusses best practices for writing test cases and the significance of a Requirement Traceability Matrix in ensuring complete test coverage.

Uploaded by

belo4kaaly
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Lecture 16

The document provides a comprehensive guide on writing test documentation, focusing on test scenarios and test cases. It outlines the definitions, importance, and steps to create test scenarios, as well as the differences between test scenarios and test cases. Additionally, it discusses best practices for writing test cases and the significance of a Requirement Traceability Matrix in ensuring complete test coverage.

Uploaded by

belo4kaaly
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Writing Test Documentation

What is a Test Scenario?

A TEST SCENARIO is defined as any functionality that can be tested. It is also called Test
Condition or Test Possibility. As a tester, you should put yourself in the end user’s shoes and
figure out the real-world scenarios and use cases of the Application Under Test.

What is Scenario Testing?


Scenario Testing is a variant of Software Testing where Scenarios are Used for Testing.
Scenarios help in an Easier Way of Testing of the more complicated Systems

https://www.youtube.com/watch?time_continue=6&v=wMN0pCyjQ9E&feature=emb_logo

Why create Test Scenarios?

Test Scenarios are created for the following reasons,

●​ Creating Test Scenarios ensures complete Test Coverage


●​ Test Scenarios can be approved by various stakeholders like Business Analyst,
Developers, Customers to ensure the Application Under Test is thoroughly tested. It
ensures that the software is working for the most common use cases.
●​ They serve as a quick tool to determine the testing work effort and accordingly create a
proposal for the client or organize the workforce.
●​ They help determine the most important end-to-end transactions or the real use of the
software applications.
●​ For studying the end-to-end functioning of the program, Test Scenario is critical.

How to Write Test Scenarios

As a tester, you can follow these five steps to create Test Scenarios-

●​ Step 1: Read the Requirement Documents, of the System Under Test (SUT). You could
also refer uses cases, books, manuals, etc. of the application to be tested.
●​ Step 2: For each requirement, figure out possible users actions and objectives. Determine
the technical aspects of the requirement. Ascertain possible scenarios of system abuse
and evaluate users with hacker's mindset.
●​ Step 3: After reading the Requirements Document and doing your due Analysis, list out
different test scenarios that verify each feature of the software.
●​ Step 4: Once you have listed all possible Test Scenarios, a Traceability Matrix is
created to verify that each & every requirement has a corresponding Test Scenario
●​ Step 5: The scenarios created are reviewed by your supervisor. Later, they are also
reviewed by other Stakeholders in the project.

Tips to Create Test Scenarios

●​ Each Test Scenario should be tied to a minimum of one Requirement or User Story as per
the Project Methodology.
●​ Before creating a Test Scenario that verifies multiple Requirements at once, ensure you
have a Test Scenario that checks that requirement in isolation.
●​ Avoid creating overly complicated Test Scenarios spanning multiple Requirements.
●​ The number of scenarios may be large, and it is expensive to run them all. Based on
customer priorities only run selected Test Scenarios
A use case is a description of a particular use of the system by an actor or user. It is used widely
in developing tests at system or acceptance level.

In a use-case, an actor is represented by "A" and system by "S". We create Use for a login
functionality of a Web Application as shown below
Example 1: Test Scenario for eCommerce Application

For an eCommerce Application, a few test scenarios would be

Test Scenario 1: Check the Login Functionality


In order to help you understand the difference Test Scenario and Test Cases, specific test cases
for this Test Scenario would be

1.​ Check system behavior when valid email id and password is entered.
2.​ Check system behavior when invalid email id and valid password is entered.
3.​ Check system behavior when valid email id and invalid password is entered.
4.​ Check system behavior when invalid email id and invalid password is entered.
5.​ Check system behavior when email id and password are left blank and Sign in entered.
6.​ Check Forgot your password is working as expected
7.​ Check system behavior when valid/invalid phone number and password is entered.
8.​ Check system behavior when "Keep me signed" is checked

Test Scenario 2: Check the Search Functionality


Test Scenario 3: Check the Product Description Page

Test Scenario 4: Check the Payments Functionality


Facebook User Timeline Scenarios

1.​ Verify that user can set profile pic uploaded from his or her computer.
2.​ Verify that user can set profile pic uploaded from mobile.
3.​ Verify that uer can set profile pic from photos present on his facbook account’s
photo section.
4.​ Verify that user can set profile from webcam or mobile camera.
5.​ Verify that user can set cover pic uploaded from his or her computer.
6.​ Verify that user can set cover pic uploaded from mobile.
7.​ Verify that user can set cover pic from photos present on his facbook account’s
photo section.
8.​ Verify that user can set cover from webcam or mobile camera.
9.​ Verify that uploading image of unsupported type should lead to error message.
10.​Verify that uploading image of size exceeding maximum allowed size should lead
to error message.
11.​Verify that uploading image of size less than the allowed minimum size should
lead to error message.
12.​Verify that uploading image of larger dimension than permitted should lead to
error message.
13.​Verify that uploading image of smaller dimension than permitted should lead to
error message.
14.​Verify that change in profile pic should get reflected in each post/comment of the
user’s timeline.
15.​Verify that user can add/edit their account information displayed to other users.
16.​Verify that users can post text in their timeline and the same gets displyed to their
friends.
17.​Verify that users can post images in their timeline and the same gets displyed to
their friends.
18.​Verify that users can post links with or without preview in their timeline and the
same gets displayed to their friends.
19.​Verify that user can tag friends in their posts.
20.​Verify that users can see the all the post in their timeline.
21.​Verify that users can see comments, likes and reactions in the posts present in their
timeline.
22.​Verify that users can post comments, like and react to the posts present in their
timeline.
Friends and their Timelines Scenario
1.​ Verify that the user can search for friends in facebook’s ‘Find friends’ search
functionality.
2.​ Verify that users can send a friend requests to any user by visiting their page.
3.​ Verify that the user can navigate through their Friend’s friend and send a friend
requests to them.
4.​ Verify that the user can approve or decline received friend request.
5.​ Verify that the user can unfriend any existing friend.
6.​ Verify that users can see the timeline of their friends.
7.​ Verify that users can post text in their friend’s timeline.
8.​ Verify that users can post images in their timeline and the same gets displayed to
their friends.
9.​ Verify that users can post links with or without preview in their friend’s timeline.
10.​Verify that users can tag friends in their posts on a friend’s timeline.
11.​Verify that users can see all the posts in their friend’s timeline.
12.​Verify that users can see comments, likes, and reactions in the posts present in
their friend’s timeline.
13.​Verify that users can post comments, like and react to the posts present in their
friend’s timeline.

Facebook Notification Test Scenarios

1.​ Verify that users receive different notifications on facebook ‘Notifications’ icon.
2.​ Verify that users receive different notifications on email or cell phone based on the
settings chosen when not logged in to Facebook.
3.​ Verify that users receive a notification when their friend request gets approved.
4.​ Verify that users receive a notification when they get a friend request.
5.​ Verify that users receive a notification when they get tagged by someone on posts
or comments.
6.​ Verify that users receive a notification when they get comments, like or reactions
on their posts.
7.​ Verify that users receive notification when someone posts on their timeline.

Examples: https://artoftesting.com/test-scenario-examples

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. The test case includes specific
variables or conditions, using which a testing engineer can compare expected and actual results
to determine whether a software product is functioning as per the requirements of the customer.

https://www.youtube.com/watch?v=BBmA5Qp6Ghk&feature=emb_title

Test Scenario Vs Test Case


Test scenarios are rather vague and cover a wide range of possibilities. Testing is all about being
very specific.

For a Test Scenario: Check Login Functionality there many possible test cases are:

●​ Test Case 1: Check results on entering valid User Id & Password


●​ Test Case 2: Check results on entering Invalid User ID & Password
●​ Test Case 3: Check response when a User ID is Empty & Login Button is pressed, and
many more

This is nothing but a Test Case.

How to Create a Test Case

Let’s create a Test Case for the scenario: Check Login Functionality

Step 1) A simple test case for the scenario would be

Step 2) In order to execute the test case, you would need Test Data. Adding it below
Step 3) In order to execute a test case, a tester needs to perform a specific set of actions on the
AUT. This is documented as below:

Step 4) The goal of test cases is to check behavior the AUT for an expected result. This needs to
be documented as below

During test execution time, the tester will check expected results against actual results and assign
a pass or fail status

Step 5) That apart your test case -may have a field like, Pre - Condition which specifies things
that must in place before the test can run. For our test case, a pre-condition would be to have a
browser installed to have access to the site under test. A test case may also include Post -
Conditions which specifies anything that applies after the test case completes. For our test case, a
postcondition would be time & date of login is stored in the database
While drafting a test case to include the following information

●​ The description of what requirement is being tested


●​ The explanation of how the system will be tested
●​ The test setup like a version of an application under test, software, data files, operating
system, hardware, security access, physical or logical date, time of day, prerequisites such
as other tests and any other setup information pertinent to the requirements being tested
●​ Inputs and outputs or actions and expected results
●​ Any proofs or attachments
●​ Use active case language
●​ Test Case should not be more than 15 steps
●​ An automated test script is commented with inputs, purpose and expected results
●​ The setup offers an alternative to pre-requisite tests
●​ With other tests, it should be an incorrect business scenario order

Best Practice for writing good Test Case Example.

1. Test Cases need to be simple and transparent:

Create test cases that are as simple as possible. They must be clear and concise as the author of
the test case may not execute them.
Use assertive language like go to the home page, enter data, click on this and so on. This makes
the understanding the test steps easy and tests execution faster.

2. Create Test Case with End User in Mind

The ultimate goal of any software project is to create test cases that meet customer requirements
and is easy to use and operate. A tester must create test cases keeping in mind the end user
perspective

3. Avoid test case repetition.

Do not repeat test cases. If a test case is needed for executing some other test case, call the test
case by its test case id in the pre-condition column

4. Do not Assume

Do not assume functionality and features of your software application while preparing test case.
Stick to the Specification Documents.

5. Ensure 100% Coverage

Make sure you write test cases to check all software requirements mentioned in the specification
document. Use Traceability Matrix to ensure no functions/conditions is left untested.

6. Test Cases must be identifiable.

Name the test case id such that they are identified easily while tracking defects or identifying a
software requirement at a later stage.

7. Implement Testing Techniques

It's not possible to check every possible condition in your software application. Software Testing
techniques help you select a few test cases with the maximum possibility of finding a defect.

●​ Boundary Value Analysis (BVA): As the name suggests it's the technique that defines
the testing of boundaries for a specified range of values.
●​ Equivalence Partition (EP): This technique partitions the range into equal parts/groups
that tend to have the same behavior.
●​ State Transition Technique: This method is used when software behavior changes from
one state to another following particular action.
●​ Error Guessing Technique: This is guessing/anticipating the error that may arise while
doing manual testing. This is not a formal method and takes advantages of a tester's
experience with the application

8. Self-cleaning

The test case you create must return the Test Environment to the pre-test state and should not
render the test environment unusable. This is especially true for configuration testing.

9. Repeatable and self-standing

The test case should generate the same results every time no matter who tests it

10. Peer Review.

After creating test cases, get them reviewed by your colleagues. Your peers can uncover defects
in your test case design, which you may easily miss.

https://drive.google.com/uc?export=download&id=0ByI5-ZLwpo25eXFlcU5ZMTJsT28

https://octopuscourses.testrail.io/

What is Traceability Matrix? (TM)


A Traceability Matrix is a document that co-relates any two-baseline documents that require a
many-to-many relationship to check the completeness of the relationship.

It is used to track the requirements and to check the current project requirements are met.

What is Requirement Traceability Matrix?

Requirement Traceability Matrix (RTM) is a document that maps and traces user requirement
with test cases. It captures all requirements proposed by the client and requirement traceability in
a single document, delivered at the conclusion of the Software devlopement life cycle. The main
purpose of Requirement Traceability Matrix is to validate that all requirements are checked via
test cases such that no functionality is unchecked during Software testing.
Why RTM is Important?

The main agenda of every tester should be to understand the client’s requirement and make sure
that the output product should be defect-free. To achieve this goal, every QA should understand
the requirement thoroughly and create positive and negative test cases.

This would mean that the software requirements provided by the client have to be further split
into different scenarios and further to test cases. Each of this case has to be executed
individually.

A question arises here on how to make sure that the requirement is tested considering all possible
scenarios/cases? How to ensure that any requirement is not left out of the testing cycle?

A simple way is to trace the requirement with its corresponding test scenarios and test cases.
This merely is termed as ‘Requirement Traceability Matrix.'

The traceability matrix is typically a worksheet that contains the requirements with its all
possible test scenarios and cases and their current state, i.e. if they have been passed or failed.
This would help the testing team to understand the level of testing activities done for the specific
product.

Which Parameters to include in Requirement Traceability Matrix?

●​ Requirement ID
●​ Requirement Type and Description
●​ Test Cases with Status
https://docs.google.com/document/d/1FsLnZ4thNQF0MhFIFw2Q1KzOTAX89MB8BCvnpsPu5
Lc/edit

Both sets of requirements contribute to a common goal, although functional requirements are
much more specific and detailed. While business requirements deal with mainly business goals
and stakeholder expectations, functional requirements outline exactly how a project will support
business requirements.
https://www.youtube.com/watch?time_continue=2&v=cm-cSW66Isc&feature=emb_logo

You might also like