Software Testing Unit 3

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

Unit-3

3.1Levels of Testing

Testing levels are the procedure for finding the missing areas and avoiding
overlapping and repetition between the development life cycle stages. We have
already seen the various phases such as Requirement collection, designing, coding
testing, deployment, and maintenance of SDLC (Software Development Life
Cycle)

In order to test any application, we need to go through all the above phases of SDLC.
Like SDLC, we have multiple levels of testing, which help us maintain the quality of
the software.

Different Levels of Testing

The levels of software testing involve the different methodologies, which can be used
while we are performing the software testing.

In software testing, we have four different levels of testing, which are as discussed
below:

1. Unit Testing
2. Integration Testing
3. System Testing
4. Acceptance Testing
Level1: Unit Testing

Unit testing is the first level of software testing, which is used to test if software
modules are satisfying the given requirement or not.

The first level of testing involves analyzing each unit or an individual


component of the software application.

Unit testing is also the first level of functional testing. The primary purpose of
executing unit testing is to validate unit components with their performance.

A unit component is an individual function or regulation of the application, or we can


say that it is the smallest testable part of the software. The reason of performing the
unit testing is to test the correctness of inaccessible code.

Unit testing will help the test engineer and developers in order to understand the base
of code that makes them able to change defect causing code quickly. The developers
implement the unit.

Level2: Integration Testing

The second level of software testing is the integration testing. The integration testing
process comes after unit testing.

It is mainly used to test the data flow from one module or component to other
modules.

In integration testing, the test engineer tests the units or separate components or
modules of the software in a group.

The primary purpose of executing the integration testing is to identify the defects at
the interaction between integrated components or units.

When each component or module works separately, we need to check the data flow
between the dependent modules, and this process is known as integration testing.

We only go for the integration testing when the functional testing has been completed
successfully on each application module.

In simple words, we can say that integration testing aims to evaluate the accuracy of
communication among all the modules.

Level3: System Testing

The third level of software testing is system testing, which is used to test the
software's functional and non-functional requirements.

It is end-to-end testing where the testing environment is parallel to the production


environment. In the third level of software testing, we will test the application as a
whole system.
To check the end-to-end flow of an application or the software as a user is known
as System testing.

In system testing, we will go through all the necessary modules of an application and
test if the end features or the end business works fine, and test the product as a
complete system.

In simple words, we can say that System testing is a sequence of different types of
tests to implement and examine the entire working of an integrated software computer
system against requirements.

Level4: Acceptance Testing

The last and fourth level of software testing is acceptance testing, which is used to
evaluate whether a specification or the requirements are met as per its delivery.

The software has passed through three testing levels (Unit Testing, Integration
Testing, System Testing). Some minor errors can still be identified when the end-
user uses the system in the actual scenario.

In simple words, we can say that Acceptance testing is the squeezing of all the
testing processes that are previously done.

3.2Unit Testing
Unit Testing is a fundamental aspect of software testing where individual
components or functions of a software application are tested in isolation. This
method ensures that each unit of the software performs as expected. By focusing on
small, manageable parts of the application, unit testing helps identify and fix bugs
early in the development process, significantly improving code quality and
reliability.
Unit tests are typically automated and written by developers using various
frameworks such as JUnit, NUnit, or pytest. These tests validate the correctness of
code by checking that each function or method returns the expected results given
specific inputs.

The main goal of unit testing is to ensure that each unit of the software performs as
intended and meets requirements. Unit tests help make sure that software is working
as expected before it is released.

The main steps for carrying out unit tests are:

1. Planning and setting up the environment


2. Writing the test cases and scripts
3. Executing test cases using a testing framework
4. Analyzing the results
3.3 Integration testing
Integration testing is the second level of the software testing process comes after unit
testing. In this testing, units or individual components of the software are tested in a
group. The focus of the integration testing level is to expose defects at the time of
interaction between integrated components or units.

Unit testing uses modules for testing purpose, and these modules are combined and
tested in integration testing. The Software is developed with a number of software
modules that are coded by different coders or programmers. The goal of integration
testing is to check the correctness of communication among all the modules.

Once all the components or modules are working independently, then we need to
check the data flow between the dependent modules is known as integration testing.
Let us see one sample example of a banking application, as we can see in the below
image of amount transfer.
o First, we will login as a user P to amount transfer and send Rs200 amount, the
confirmation message should be displayed on the screen as amount transfer
successfully. Now logout as P and login as user Q and go to amount balance
page and check for a balance in that account = Present balance + Received
Balance. Therefore, the integration test is successful.
o Also, we check if the amount of balance has reduced by Rs200 in P user
account.
o Click on the transaction, in P and Q, the message should be displayed
regarding the data and time of the amount transfer.

3.4 Scenario Testing


Scenario Testing is a Software Testing Technique that uses scenarios i.e. speculative
stories to help the tester work through a complicated problem or test system. The
ideal scenario test is a reliable, complicated, convincing or motivating story the
outcome of which is easy to assess. It is performed to ensure that the end to end
functioning of software and all the process flow of the software are working
properly.
In scenario testing:
1. The testers assume themselves to be the end users and find the real world
scenarios or use cases which can be carried out on the software by the end user.
2. The testers take help from clients, stakeholders and developers to create test
scenarios. A test scenario is a story which describes the usage of the software by
an end user.
Scenario testing, also known as workflow testing or end-to-end testing, is a software
testing technique that focuses on validating the behavior of a system under various
realistic scenarios or use cases. Unlike unit testing, which tests individual units of
code in isolation, scenario testing evaluates the entire application or a significant
portion of it by simulating real-world scenarios that users might encounter.

Here's how scenario testing typically works:

Identify Scenarios: Testers work with stakeholders to identify a set of typical


scenarios or user workflows that the system should support. These scenarios
represent common user interactions with the application.

Define Test Cases: For each scenario, testers define test cases that describe
the sequence of steps required to perform the scenario. Test cases include
inputs, expected outputs, and any specific conditions or data required for the
scenario.

Execute Tests: Testers execute the test cases against the application,
following the defined scenarios. This may involve interacting with the use5 r
interface, APIs, databases, or any other components of the system.

Verify Results: After executing each test case, testers verify that the
application behaves as expected and produces the correct outcomes. They
compare the actual results with the expected results specified in the test cases.

Report Defects: If any discrepancies are found between the actual and
expected results, testers report them as defects or issues. Developers then
investigate and fix the defects, and the tests are rerun to verify that the issues
have been resolved.

3.5 System Testing


System Testing is a type of software testing that is performed on a completely
integrated system to evaluate the compliance of the system with the corresponding
requirements. In system testing, integration testing passed components are taken as
input.
 The goal of integration testing is to detect any irregularity between the units that
are integrated. System testing detects defects within both the integrated units and
the whole system. The result of system testing is the observed behavior of a
component or a system when it is tested.
 System Testing is carried out on the whole system in the context of either
system requirement specifications or functional requirement specifications or the
context of both. System testing tests the design and behavior of the system and
also the expectations of the customer.
 It has both functional and non-functional testing. System Testing is a black-box
testing. System Testing is performed after the integration testing and before the
acceptance testing.

System Testing
System Testing Process
System Testing is performed in the following steps:
 Test Environment Setup: Create testing environment for the better quality
testing.
 Create Test Case: Generate test case for the testing process.
 Create Test Data: Generate the data that is to be tested.
 Execute Test Case: After the generation of the test case and the test data, test
cases are executed.
 Defect Reporting: Defects in the system are detected.
 Regression Testing: It is carried out to test the side effects of the testing
process.
 Log Defects: Defects are fixed in this step.
 Retest: If the test is not successful then again test is performed.
System Testing Process
Real-life example of System testing
1. Suppose a car-making company has already made systems like the ignition
system, braking system, engine, fuel system, accelerator, GPS, air conditioner,
etc., which were tested individually(Unit testing). The collaboration of these
systems is tested(integration testing) for example the fuel system is checked in
collaboration with the car engine. But when all systems are ready, the company
will check all the systems working by actually driving the car to check if all the
systems are working fine with each other. That will be system testing.
2. Suppose an e-commerce website has different modules like a registration page,
Login page, card, dashboard, payment page, etc. These modules are tested by the
developer first, which will be unit testing. The two or more modules will be
tested in collaboration with each other. That will be integration testing. But after
the completion of all the modules, when the overall website functioning is tested,
then that is called system testing.

3.6Types of System Testing


 Performance Testing: Performance Testing is a type of software testing that is
carried out to test the speed, scalability, stability and reliability of the software
product or application.
 Load Testing: Load Testing is a type of software Testing which is carried out to
determine the behavior of a system or software product under extreme load.
 Stress Testing: Stress Testing is a type of software testing performed to check
the robustness of the system under the varying loads.
 Scalability Testing: Scalability Testing is a type of software testing which is
carried out to check the performance of a software application or system in
terms of its capability to scale up or scale down the number of user request load.

3.7 What is Usability testing?

It is a testing method where the functionality of an application or website is tested by


real users. The objective of this testing method is to uncover issues pertaining to user
experience and usability by obtaining feedback from users.
Following are a few key points that are taken into consideration for performing
the testing activity:

 The main actions pertaining to a site’s functionality are worked and analyzed
upon in order to not get confused
 Usability issues and bugs are identified and fixed
 The functional aspects of a website or application should be efficient enough
 Other usability problems should also be identified and fixed.

The above-mentioned points need to be carefully scrutinized by the testing and


designing team in order to make a user-friendly software product. It is also known as
User Experience (UX) testing. The software product or application’s flexibility and
ease of use are also given due consideration in this testing method.

Differences between usability testing and accessibility testing:


Usability testing Accessibility testing
This testing method ensures that a website is easy Accessibility testing focuses on making a website acc
and intuitive to use disabled people
The user-friendliness of the software application or The extent of accessibility that a website can provide
product is verified using this testing method using this testing method
Accessibility testing is performed in accordance with
Usability issues are identified and fixed in order to
Content Accessibility Guidelines) and thus accessibili
deliver a seamless user experience
website or application is strategically analyzed
The four elements that are focused upon are
The four principles that are focused upon are robustne
flexibility, learnability, functionality, and industrial
understandable, operable and perceivable
design
Optimizely, Crazy Egg, Userlytics, Qualaroo, Google Lighthouse, Wave, Dynomapper, Accessibilit
Usabilla, and UserFeel are some of the key tools Axe Chrome plugin are some of the key tools that are
that are used in this testing method testing method
Real users are involved to test the product and
The website code is reviewed and then matched with
evaluate as to what extent the software product or
guidelines. Knowledge of CSS, HTML and JavaScrip
application is user-friendly

You might also like