0% found this document useful (0 votes)
55 views8 pages

Software Testing and Quality Assurance

The document discusses various topics related to software testing and quality assurance. It describes complete testing and why it is impractical to achieve in reality due to infinite inputs, paths, time/resources, and changing requirements. Instead, testing focuses on achieving effective coverage through techniques like requirements-based testing, risk-based testing, code coverage, and use case testing. It also discusses the importance of defect prevention in testing and key aspects of mutation testing and the strengths and weaknesses of automated and manual testing approaches.

Uploaded by

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

Software Testing and Quality Assurance

The document discusses various topics related to software testing and quality assurance. It describes complete testing and why it is impractical to achieve in reality due to infinite inputs, paths, time/resources, and changing requirements. Instead, testing focuses on achieving effective coverage through techniques like requirements-based testing, risk-based testing, code coverage, and use case testing. It also discusses the importance of defect prevention in testing and key aspects of mutation testing and the strengths and weaknesses of automated and manual testing approaches.

Uploaded by

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

wolkite university

SOFTWARE TESTING AND QUALITY ASSURANCE

NOVEMBER 29, 2023


Hayder Abdela
NSR/1112/13
1. What is complete testing?

Complete testing, also known as exhaustive testing, refers to the idea of testing a software application in
such a way that every possible input, combination of inputs, and execution path is covered.

The goal is to ensure that the software is free from defects and that all aspects of its functionality have
been thoroughly tested.

In theory, complete testing would involve testing every possible state and transition of the system,
leaving no room for undiscovered bugs.

However, achieving truly complete testing is practically impossible for several reasons

 Infinite Input Space: For non-trivial software, the number of possible inputs and combinations is
often infinite, making it impractical to test every combination comprehensively.
 Infinite Paths: The number of execution paths through a program can also be infinite, especially
in complex applications. It's not feasible to test every path exhaustively.
 Time and Resources: Complete testing would require an enormous amount of time and
resources. The cost and time required to test every possible scenario could be prohibitive,
especially for large and complex systems.
 Changing Requirements: Software requirements are often subject to change, and new features
may be added. Achieving complete testing becomes a moving target as the software evolves.

While complete testing might be an ideal concept, in practice, testing efforts are usually focused on
achieving effective coverage through a combination of techniques, including:

 Requirements-Based Testing: Ensuring that the software meets the specified requirements.
 Risk-Based Testing: Identifying and prioritizing high-risk areas for testing.
 Code Coverage: Measuring the percentage of code that has been executed by tests.
 Equivalence Partitioning: Testing representative values from different equivalence classes.
 Boundary Value Analysis: Testing values at the boundaries of input ranges.
 Use Case Testing: Testing the software based on typical use cases.
 Random Testing: Using random inputs to explore different scenarios.

2. What is the importance of defect prevention in Testing?

The production of a quality software product by identifying defects, their root causes and taking
corrective and preventive measures to avoid their recurrence can be termed as the goal of defect
prevention process.

1
some key reasons why defect prevention is important in testing:

 Cost Savings: Fixing issues early is cheaper than later in the software process, reducing the need
for extensive rework and debugging.
 Time Efficiency: Catching and preventing defects early avoids backtracking, making
development smoother and faster.
 Enhanced Product Quality: Addressing issues early leads to a higher-quality product, meeting
user expectations and ensuring customer satisfaction.
 Improved Productivity: Developers can focus on creating instead of fixing, boosting
productivity and creating a positive work environment.
 Customer Satisfaction: A high-quality, low-defect product enhances customer satisfaction,
building trust and potential for repeat business.
 Risk Mitigation: Identifying and dealing with risks early reduces overall risks associated with
software development.
3. Clearly discuss about Mutation Testing?

Mutation testing is a software testing technique that assesses the quality of a test suite by introducing
small, intentional changes (mutations) to the source code and checking if the tests can detect these
changes.

The primary goal of mutation testing is to evaluate the effectiveness of a test suite in terms of its ability to
identify faults or bugs in the code.

Process of Mutation Testing:

 Mutation Generation: Make small controlled changes to the source code, mimicking common
programming errors like altering operators, variables, or conditions.
 Test Suite Execution: Run the modified code with mutations through the existing test suite. The
goal is to see if the tests can identify these artificial faults.
 Mutation Analysis: Analyze the test results to find out how many mutations were detected. If a
mutation goes unnoticed by any test case, it's considered a "surviving" mutation.
 Metrics and Reporting: Calculate metrics, like the mutation score, which is the ratio of detected
mutations to the total mutations introduced. A higher mutation score indicates a more effective
test suite.

Key Concepts:

 Mutants: Mutants are altered versions of the source code, each representing a potential bug

2
 Killing Mutants: If a test case finds and fails for a mutant, it's "killed." Killing mutants is the
main goal of mutation testing.
 Surviving Mutants: Mutants not caught by any test are "surviving mutants." They reveal
potential gaps in the test suite, highlighting areas where your tests might need improvement.

Advantages of Mutation Testing:

 Effectiveness Evaluation: Mutation testing gauges test suite strength. A high score is good; a
low one signals areas for improvement.
 Identifying Gaps in Testing: Surviving mutants show where tests fall short, guiding
improvements in test coverage.
 Improving Test Quality: Feedback from mutation testing enhances test cases, making them
more reliable in catching potential defects.

Challenges of Mutation Testing:

 Computational Cost: Mutation testing can be computationally expensive, especially for large
codebases, as it runs multiple versions of the code.
 False Positives: Surviving mutants may not always indicate real defects; some might be due to
method limitations or lack practical significance.
 Complexity: Interpreting mutation test results and choosing the right mutation operators can be
complex, requiring careful consideration.

Tools for Mutation Testing:

 PIT
 Stryker
4. What are the strength and weaknesses of automated and manual testing?

Automated testing is the process in which testers utilize tools and scripts to automate testing efforts.

Strengths Automated Testing

 Repeatability and Consistency: Executed repeatedly for consistent results.


 Efficiency: Quick execution covers numerous test cases efficiently.
 Parallel Execution: Allows simultaneous execution for quicker feedback.
 Performance Testing: Often used for performance, load, and stress testing with virtual users.

Weakness Automated Testing

3
 Initial setup cost: Developing scripts and infrastructure can be time-consuming and expensive
initially.
 Not suitable for exploratory testing: Less effective than manual testing for exploring
applications and identifying new issues.
 UI Changes: Can be brittle with frequent UI changes, requiring frequent script updates.

Manual testing is the process in which QA analysts execute tests one-by-one in an individual manner.
The purpose of manual testing is to catch bugs and feature issues before a software application goes live.

Strengths Manual Testing

 Exploratory Testing: Excellent for exploratory testing, leveraging human intuition and
creativity.
 Usability and User Experience: Well-suited for assessing UI, usability, and overall user
experience.
 Adaptability: Adaptable to changing requirements or interfaces.

Weakness Manual Testing

 Initial setup cost: Developing scripts and infrastructure can be time-consuming and expensive
initially.
 UI Changes: Can be brittle with frequent UI changes, requiring frequent script updates.
 Complex scenarios: Challenging for subjective evaluations or scenarios involving user
experience.
5. The use of debugging in software testing by considering its three approaches (Backtracking, Brute
force and Cause elimination); write clearly about these three approaches

Debugging is a crucial aspect of software testing that involves identifying, isolating, and fixing defects or
bugs in a program.

There are various approaches to debugging, and three common strategies are backtracking, brute force,
and cause elimination.

1. Backtracking:

Backtracking is an approach in debugging where the programmer starts from the point of failure and
traces backward through the code to identify the root cause of the issue. The process involves
systematically undoing recent changes or operations to determine where the error originated.

Pros

4
 Effective for identifying the specific change that caused the failure.
 Can quickly pinpoint the root cause when the defect is related to recent modifications.

Cons:

 Time-consuming, especially in complex codebases.


 May not be suitable for issues that stem from interactions across different parts of the code.
2. Brute Force:

Brute force debugging involves systematically trying different inputs, conditions, or scenarios to identify
the conditions under which the failure occurs. It is a more exploratory approach that aims to discover the
specific circumstances leading to the defect.

Pros:

 Can uncover defects caused by specific input conditions or scenarios.


 Useful for discovering unexpected edge cases.

Cons:

 Time-consuming, especially if there are numerous possible combinations to explore.


 May not be effective for complex defects that are not easily reproduced.
3. Cause Elimination:

Cause elimination involves systematically ruling out potential causes of a defect by isolating different
parts of the code or components. The goal is to narrow down the possible sources of the issue.

Pros:

 Helps in narrowing down the possible sources of the defect.


 Can be effective for defects that involve the interaction of multiple components.

Cons:

 Requires a good understanding of the codebase to identify relevant sections for elimination.
 May be time-consuming, especially if the defect is in a complex interaction of components.

Each debugging approach has its strengths and weaknesses, and the choice of method often depends on
the nature of the defect, the complexity of the codebase, and the available information about the failure.
Skilled programmers often use a combination of these approaches to efficiently identify and resolve
defects during the software testing and debugging process.

5
6. By using software metrics techniques write the formula used to calculate the Portability, Reliability
and Availability of software product and give an example for these three quality factors by
measuring them

1. Portability: Portability measures how easily software can be transferred from one platform to
another. A lower percentage indicates lower portability.

 Formula:

Number of platform−specific modules


Portability= ×100
Total number of modules

 Example:

 If a software system has 20 platform-specific modules out of a total of 100 modules,


20
the portability would be ×100 = 20%
100

2. Reliability: Reliability assesses the ability of the software to perform without failure. A higher
percentage indicates higher reliability.

 Formula:

Number of successfully completed transaction


Reliability= × 100
Total number of attempted transaction

 Example:

 If a software system successfully completes 800 transactions out of 1000 attempted


800
transactions, the reliability would be ×100 = 80%
1000

3. Availability: Availability measures the percentage of time a system is operational. A higher


percentage indicates better availability.

 Formula:

Total time systemis available


Availability= × 100
Total time

 Example:

6
 f a software system is available for 900 hours out of a total of 1000 hours, the
900
availability would be ×100 = 90%
1000

You might also like