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

Lab 1

Uploaded by

zannatulmaoameem
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Lab 1

Uploaded by

zannatulmaoameem
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

BANGLADESH UNIVERSITY OF PROFESSIONALS (BUP)

Department of Information and Communication Technology


ICT 4102 (Software Testing and Maintainance Lab)
LAB NO.-1

Title: Write the test cases for any known application.


Introduction to test automation

Test automation is a crucial aspect of modern software development, offering numerous benefits while also
presenting certain challenges. It involves using software tools and scripts to automatically execute and validate
tests, which enhances the efficiency and accuracy of the testing process.

Tools for Test Automation


Several tools are available for test automation, each with unique features and capabilities. Popular tools include:
• Selenium: Widely used for web application testing, supporting multiple programming languages.
• Appium: An open-source framework for mobile app testing on various platforms.
• JMeter: Used for performance and load testing.

Seven Testing principles:

The seven principles of software testing are foundational guidelines that help ensure the
effectiveness and efficiency of the testing process. These principles are widely recognized in the
software industry and provide a framework for testing strategies. Here is an overview of each
principle:
1. Testing Shows the Presence of Defects: The primary goal of testing is to identify defects
in the software. It can demonstrate that defects are present but cannot prove that there are

1|Page
no defects. Even with extensive testing, it is impossible to confirm that the software is
completely error-free.
2. Exhaustive Testing is Impossible: It is impractical to test all possible combinations of
inputs and scenarios due to time and resource constraints. Instead, testers should focus on
risk-based testing to cover the most critical areas of the application.
3. Early Testing: Testing should begin as early as possible in the software development
lifecycle. Detecting defects early can significantly reduce the cost and effort required to fix
them later in the development process.
4. Defect Clustering: A small number of modules often contain the majority of defects. This
principle suggests that testing efforts should be concentrated on these areas to efficiently
identify and address issues.
5. Pesticide Paradox: Repeatedly executing the same set of test cases will eventually fail to
uncover new defects. To overcome this, test cases need to be regularly reviewed and
updated to ensure they remain effective.
6. Testing is Context-Dependent: Testing approaches and strategies should be tailored to
the specific context of the software being tested. Different types of applications require
different testing methods and techniques.
7. Absence of Errors Fallacy: Even if no defects are found, it does not guarantee that the
software meets user needs and requirements. A software product can be free of defects but
still fail to deliver the desired functionality.

What is Test Cases:


A set of preconditions, inputs, actions (where applicable), expected results and postconditions,
developed based on test conditions.

What is a QA test case?


Test cases are instructions for testers to follow to ensure programs are functioning properly.
They describe how the software should work in normal, abnormal, or error operating conditions.
Test case writing converts user requirements into a set of test conditions and descriptions that
indicate how a system is functioning. In an automated test script, more than one test case can
combine to form a test suite.

Test case vs. Test scenario


2|Page
When writing a test case, you typically think about every detail of "how" something should
behave. For example, if you’re developing a login system, a test case might be that an error is
displayed if you enter an incorrect email address. Then you may have tests for:
• Not entering any email address
• Adding a space at the end of an email address
• Use all caps for the email address
• Capitalizing the first letter of the email address

Test scenarios, also called test conditions or test possibilities, represent typical tasks users might
want to accomplish with the software. A simple test scenario may require multiple test cases to
cover the different outcomes. In our login system, some scenarios could be "I can successfully log
in" or "I can't log in without entering my email address correctly."

Types of Test cases


Test cases can be categorized based on the purpose they serve in testing. As a quality assurance
professional, knowing the difference between them helps focus your efforts and choose the right
test format.
• Functionality test cases: These are the most basic and obvious test cases to write. They
ensure that each feature of your system works correctly.
• Performance test case: This test ensures that the system runs fast enough. It makes sure
that all system requirements work as expected regarding speed, scalability, or stability.
• Unit test cases: Software developers usually write unit tests for their code to check
individual units, for example, modules, procedures, or functions, to determine if they work
as expected.
• User interface (UI) test cases: It’s important to remember that the user interface is part of
the overall system and not just a shell where functionality appears. UI test cases check that
each UI element works correctly, displays, and is easy to use.
• Security test cases: Security test cases help ensure that a product or system functions
properly under all conditions, including when malicious users attempt to gain unauthorized
access or damage the system. These test cases safeguard the security, privacy, and
confidentiality of data.
• Integration test cases: These ensure that the application components work together as
expected. These test cases check whether modules or components integrate seamlessly to
form a complete product.
• Database test cases: These test cases ensure that the database meets its functional and non-
functional requirements. They make sure database management systems (DBMS) support
all business requirements.
• Usability test cases: Usability test cases help check if users can use the application
successfully. These determine whether users can easily use the system without difficulty
or confusion. They also verify if users can navigate the system using common procedures
and functions.
• User acceptance test cases: User acceptance test cases verify that an application satisfies
its business requirements before users accept it. These determine whether users accept or
reject the output produced by a particular system before release to the live environment.
• Regression testing: Regression test cases verify that changes made during development
don’t cause any existing functionality to stop working. Regression testing happens after
changes have been made to existing code to test that all existing or legacy functionality
continues to work as expected after making the changes.

3|Page
Consider creating a reusable test case template.
A test case template provides a flexible but basic structure that you can customize on an as-needed
basis. It can also serve as a checklist to ensure all essential elements have been included. Many
testers use spreadsheets with one test per row and the test elements in columns.

Standard Test Case Format:


1. Test Case ID
2. Test Scenario
3. Test Steps
4. Prerequisites
5. Test Data
6. Expected/Intended Results
7. Actual Results
8. Test Status – Pass/Fail

4|Page
Now we will show the test case writing for the following website:
1. Website Name: https://www.website.com/sign-in/?source=SC

Test Item:
Login

# Item Sub Item / Description Comments


Invalid Login
Failure of login by using different kinds of invalid credentials
Valid Login
Successful login by valid credentials
Log out
Functionality of Logout after successful login

Test Cases : 1

Testing site: https://www.website.com/sign-in/?source=SC

Test Area: Login


Test Case ID: Login001
Summary/Purpose: To verify the failure of login when Username and Password are invalid/wrong
Precondition: User must Signup/Registration
Sl. No. Test steps Test Data Expected Result Actual Result Pass/Fail?
Login will fail and a notification
Leave Username and message will be displayed – As same as
Password blank -> Click LOG “Username is required” , Expected
1 IN button “Password is required” Result Pass

5|Page
Insert valid Username and
leave Password blank -> Click Login will fail and a notification
2 LOG IN button message will be displayed
Leave Username blank and
insert valid Password -> Click Login will fail and a notification
3 LOG IN button message will be displayed
Insert invalid value both for
Username and Password -> Login will fail and a notification
4 Click LOG IN button message will be displayed
Insert invalid Username and
leave Password blank -> Click Login will fail and a notification
5 LOG IN button message will be displayed
Leave Username blank and
insert invalid Password -> Click Login will fail and a notification
6 LOG IN button message will be displayed
Insert valid Username and
invalid Password -> Click LOG Login will fail and a notification
7 IN button message will be displayed
Insert invalid Username and
valid Password -> Click LOG IN Login will fail and a notification
8 button message will be displayed

6|Page
Test Cases : 2
Test Area: Login
Test Case ID: Login002
Summary/Purpose: To verify the successful login with valid credentials
Precondition: User must Signup/Registration

Sl. No. Test steps Test Data Expected Result Actual Result Pass/Fail?
Valid Username and
Password will be
Enter valid Username and inserted in particular
1 Password text box
Login will be succeeded
and it will transit to
2 Click LOG IN button Home page

Test Cases : 3

Test Area: Logout


Test Case ID: Login003
Summary/Purpose: To verify the successful logout from the system
Precondition: User must Login to system

Test
Sl. No. Test steps Expected Result Actual Result
Data Pass/Fail?

It will be logged in and a button named


1 Log in successfully Logout will be displayed in home page
Click LOG OUT
2 button and observe It will logout and back to Login page

7|Page
Test Case Writing Using Trello : https://trello.com/

1. Sign Up using your email or create a temporary email from this link :
https://moakt.com/en
2. After Sign in you will get following page :

3. From there create a new board and give a board Name .

4. Give a list name : Sign-up scenarios

8|Page
5. Password Hints:

Username Test steps

Password Test Steps

9|Page
Email test steps

Phone Number Test steps

6. Now after doing the test steps you need to check if these test steps are doing fine
or not.

10 | P a g e
Practice The following:
Write the test steps for the below login form :

1. Can only use english letters


2. User can request Otp 2 times
3. After requesting OTP for 2nd time it will valid for 10 minitues

11 | P a g e

You might also like