Unit V
Unit V
Software Testability
Software testability is measured with respect to the efficiency and effectiveness of testing.
Efficient software architecture is very important for software testability. Software testing is
a time-consuming, necessary activity in the software development lifecycle, and making
this activity easier is one of the important tasks for software companies as it helps to reduce
costs and increase the probability of finding bugs. There are certain metrics that could be
used to measure testability in most of its aspects. Sometimes, testability is used to mean
how adequately a particular set of tests will cover the product.
Testability helps to determine the efforts required to execute test activities.
Less the testability larger will be efforts required for testing and vice versa.
Software testability evaluates how easy it is to test the software and how likely software
testing will find the defects in the application. Software testability assessment can be
accomplished through software metrics assessment:
Depth of Inheritance Tree.
Fan Out (FOUT).
Lack Of Cohesion Of Methods (LCOM).
Lines Of Code per Class (LOCC).
Response For Class (RFC).
Weighted Methods per Class (WMC).
During software launch, it is crucial to determine which components may be more
challenging to test. Software testability assessment is crucial during the start of the testing
phase as it affects the efficiency of the planning process.
The attributes suggested by Bach can be used by a software engineer to develop a software
configuration (i.e., programs, data, and documents) that is amenable to testing. Below are
some of the capabilities that are associated with software testability requirements:
Module capabilities: Software is developed in modules and each module will be tested
separately. Test cases will be designed for each module and then the interaction
between the modules will be tested.
Testing support capabilities: The entry point to test drivers and root must be saved for
each person, test interface as during the increment level testing, the trouble and
accuracy level of testing root and driver should be given high priority and importance.
Defects disclosure capabilities: The system errors should be less so that they do not
block the software testing. The requirement document should also pass the following
parameters to be testable:
o The requirement must be accurate, correct, concise, and complete.
o The requirement should be unambiguous i.e it should have one meaning for
all staff members.
o A requirement should not contradict other requirements.
o Priority-based ranking of requirements should be implemented.
o A requirement must be domain-based so that the changing requirements
won't be a challenge to implement.
Observation capabilities: Observing the software to monitor the inputs, their outcomes,
and the factors influencing them.
Below are some of the parameters that can be implemented in practice to improve software
testability:
Appropriate test environment: If the test environment corresponds to the production
environment then testing will be more accurate and easier.
Adding tools for testers: Building special instruments for manual testing helps to make
the process easier and simpler.
Consistent element naming: If the developers can ensure that they are naming the
elements correctly, consistently, logically, and uniquely then it makes testing more
convenient. Although this approach is difficult in larger projects with multiple
developers and engineers.
Improve observability: Improving observability provides unique outputs for unique
inputs for the Software Under Test.
Adding assertions: Adding assertions to the units in the software code helps to make the
software more testable and find more defects.
Manipulating coupling: Manipulating coupling to make it Domain dependent relative to
the increased testability of code.
Internal logging: If software accurately logs the internal state then manual testing can
be streamlined and it enables to check of what is happening during any test.
Consistent UI design: Consistent UI design also helps to improve software testability as
the testers can easily comprehend how the user interface principles work.
Minimizes testers' efforts: Testability calculates and minimizes the testers' efforts to
perform testing as improved software testability facilitates estimating the difficulty in
finding the software flaws.
Determines the volume of automated testing: Software testability determines the
volume of automated testing based on the software product's controllability.
Early detection of bugs: Software testability helps in the early and effortless detection
of bugs and thus saves time, cost, and effort required in the software development
process.
Components of test cases:
Software testing is known as a process for validating and verifying the working of a
software/application. It re-check that the software functions are meets the
requirements without errors, bugs, or any other issues and provides the expected output to
the user.
The software testing process is not limited to finding faults in the present software but also
includes measures to improve the software in various aspects such as efficiency, usability,
and accuracy. To test software, software testing provides a particular format called a Test
Case.
A test case is a set of steps or actions performed on a system to check if
it meets the software requirements and works as expected. It helps verify whether the
system functions correctly under different conditions and meets to the expectations. Test
cases are essential for identifying issues and ensuring the software performs as intended
Parameters of a Test Case
Here are the important parameters of testcase which is helping to the development process
of software:
Module Name: Subject or title that defines the functionality of the test.
Test Case Id: A unique identifier assigned to every single condition in a test case.
Tester Name: The name of the person who would be carrying out the test.
Test scenario: The test scenario provides a brief description to the tester, as in providing
a small overview to know about what needs to be performed and the small features, and
components of the test.
Test Case Description: The condition required to be checked for a given software. for
eg. Check if only numbers validation is working or not for an age input box.
Test Steps: Steps to be performed for the checking of the condition.
Prerequisite: The conditions required to be fulfilled before the start of the test process.
Test Priority: As the name suggests gives priority to the test cases that had to be
performed first, or are more important and that could be performed later.
Test Data: The inputs to be taken while checking for the conditions.
Test Expected Result: The output which should be expected at the end of the test.
Test parameters: Parameters assigned to a particular test case.
Actual Result: The output that is displayed at the end.
Environment Information: The environment in which the test is being performed, such
as the operating system, security information, the software name, software version, etc.
Status: The status of tests such as pass, fail, NA, etc.
Comments: Remarks on the test regarding the test for the betterment of the software.
Test Cases?
Test cases are written in different situations:
Before development: Test cases could be written before the actual coding as that would
help to identify the requirement of the product/software and carry out the test later when
the product/software gets developed.
After development: Test cases are also written directly after coming up with a
product/software or after developing the feature but before the launching of a
product/software as needed to test the working of that particular feature.
During development: Test cases are sometimes written during the development time,
parallelly. so whenever a part of the module/software gets developed it gets tested as
well.
So, test cases are written in such cases, as test cases help in further development and make
sure that we are meeting all the needed requirements.
Why Write Test Cases?
Test cases are one of the most important aspects of software engineering, as they define
how the testing would be carried out. Test cases are carried out for a very simple reason, to
check if the software works or not. There are many advantages of writing test cases:
To check whether the software meets customer expectations: Test cases help to
check if a particular module/software is meeting the specified requirement or not.
To check software consistency with conditions: Test cases determine if a particular
module/software works with a given set of conditions.
Narrow down software updates: Test cases help to narrow down the software needs
and required updates.
Better test coverage: Test cases help to make sure that all possible scenarios are
covered and documented.
For consistency in test execution: Test cases help to maintain consistency in test
execution. A well-documented test case helps the tester to just have a look at the test
case and start testing the application.
Helpful during maintenance: Test cases are detailed which makes them helpful during
the maintenance phase.
Test Case Template
A Test Case Template is a simple, organized format used in software testing to create test
cases. It helps ensure that all tests are written clearly and consistently.
Let’s look at a basic test case template for the login functionality.
The Test case template contains the header section which has a set of parameters that
provide information about the test case such as the tester’s name, test case description,
Prerequisite, etc.
The body section contains the actual test case content, such as test ID, test steps, test
input, expected result, etc.
Best Practice for Writing Test Case
There are certain practices that one could follow while writing the test cases that would be
considered beneficial.
Simple and clear: Test cases need to be very concise, clear, and transparent. They
should be easy and simple to understand not only for oneself but for others as well.
Maintaining the client/customer/end-user requirements must be unique : While writing
the test cases, it’s necessary to make sure that they aren’t being written over and over
again and that each case is different from the others.
Zero Assumptions: Test cases should not contain assumed data, and don’t come up with
features/modules that don’t exist.
Traceability: Test cases should be traceable for future reference, so while writing it’s
important to keep that in mind,
Different input data: While writing test cases, all types of data must be taken into
consideration.
Strong module name: The module name should be self-explanatory while writing the
test case.
Minimal Description: The description of a test case should be small, one or two lines
are normally considered good practice, but it should give the basic overview properly.
Maximum conditions: All kinds of conditions should be taken into consideration while
writing a test, increasing the effectiveness.
Meeting requirements: While writing the test case the client/customer/end-user
requirements must be met.
Repetitive Results: The test case must be written in such a way that it should provide
the same result.
Different Techniques: Sometimes testing all conditions might not be possible but
using different testing with different test cases could help to check every aspect of a
software.
Create test cases with the end user’s perspective: Create test cases by keeping end-
user in mind and the test cases must meet customer requirements.
Use unique Test Case ID: It is considered a good practice to use a unique Test Case ID
for the test cases following a naming convention for better understanding.
Add proper preconditions and postconditions: Preconditions and postconditions for
the test cases must be mentioned properly and clearly.
Test cases should be reusable: There are times when the developer updates the code,
then the testers need to update the test cases to meet the changing requirements.
Specify the exact expected outcome: Include the exact expected result, which tells us
what will be result of a particular test step.
Test Case Management Tools
Test case management tools are important in managing test cases efficiently, making the
testing process faster and less time-consuming compared to traditional methods. These
tools provide features such as advanced dashboards, bug tracking, progress
tracking, custom templates, and integration with other testing tools. Test case
management tools help testers organize, manage, and execute their tests more effectively.
Here are some of the most popular test case management tools:
1. TestLink: TestLink is a widely used test management tool that offers easy integration
with bug tracking systems and provides a user-friendly interface to manage test cases,
test plans, and test runs.
2. X-ray: X-ray is a test management tool for Jira, designed to manage both manual and
automated tests. It integrates seamlessly with Jira, providing robust reporting,
traceability, and tracking for test cases.
3. TestRail: TestRail helps manage test cases, test plans, and test runs. It offers real-time
insights into testing progress and enables better collaboration between QA teams,
helping them streamline their test case management processes.
4. PractiTest Ltd.: PractiTest is a test case management tool that focuses on organizing test
cases, creating test plans, and offering detailed reports. It allows for seamless
integration with popular bug tracking systems and other testing tools.
5. TestCollab: TestCollab is a tool for managing test cases, test plans, and testing progress.
It provides strong reporting and analytics features to give teams insights into their
testing efforts.
6. Kualitee: Kualitee is a comprehensive test case management platform that supports
manual and automated testing. It provides features for test case creation, execution, and
tracking, along with strong integration with bug tracking tools.
7. Qase: Qase is an easy-to-use test management tool that supports manual test execution
and test case management. It integrates with various CI/CD tools and offers powerful
reporting and analytics features.
8. Testiny: Testiny is a lightweight test management tool that provides an intuitive
interface for managing test cases. It allows easy tracking of test executions and
facilitates collaboration within teams.
9. TestMonitor: TestMonitor is a test case management platform designed to enhance
collaboration among teams. It offers comprehensive features like test case management,
test plan creation, bug tracking, and detailed reporting.
10. SpiraTest: SpiraTest is a test management tool that allows users to manage test cases,
bugs, and requirements in one integrated platform. It provides full traceability and
powerful reporting for effective test case management.
Formal and Informal Test Case:
Formal Test Cases: Formal test cases are test cases that follow the basic test case
format. It contains the test case parameters such as conditions, ID, Module name, etc.
Formal Test cases have set input data and expected results, they are performed as per
the given order of steps.
Informal Test Cases: Informal test cases are test cases that don’t follow the basic test
case format. In these, as the tests are performed the test cases are written in real-time
then pre-writing them, and the input and expected results are not predefined as well.
Types of Test Cases
Here are some of the Types of Test Cases:
Functionality Test Case: The functionality test case is to determine if the interface of
the software works smoothly with the rest of the system and its users or not. Black box
testing is used while checking for this test case, as we check everything externally and
not internally for this test case.
Unit Test Case: In unit test case is where the individual part or a single unit of the
software is tested. Here each unit/ individual part is tested, and we create a different test
case for each unit.
User Interface Test Case: The UI test or user interface test is when every component of
the UI that the user would come in contact with is tested. It is to test if the UI
components requirement made by the user are fulfilled or not.
Integration Test Case: Integration testing is when all the units of the software are
combined and then they are tested. It is to check that each component and its units work
together without any issues.
Performance Test Case: The performance test case helps to determine response time
as well as the overall effectiveness of the system/software. It’s to see if the application
will handle real-world expectations.
Database Test Case: Also known as back-end testing or data testing checks that
everything works fine concerning the database. Testing cases for tables, schema,
triggers, etc. are done.
Security Test Case: The security test case helps to determine that the application
restricts actions as well as permissions wherever necessary. Encryption and
authentication are considered as main objectives of the security test case. The security
test case is done to protect and safeguard the data of the software.
Usability Test Case: Also known as a user experience test case, it checks how user-
friendly or easy to approach a software would be. Usability test cases are designed by
the User experience team and performed by the testing team.