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

Unit 4 SE 2022,24

Software engineering unit-4 2022 and 24 solution

Uploaded by

pathak639326
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)
20 views

Unit 4 SE 2022,24

Software engineering unit-4 2022 and 24 solution

Uploaded by

pathak639326
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/ 5

• Solutionon2022and23SoftwareEngineering

• UNIT:4

Q.1,2022: WHAT IS REGRESSION TESTING? DISCUSS THE PROCESS OF TEST CASE


PRIORITIZATION IN REGRESSION TESTING ?

ANS:

Regression Testing
Regression Testing is a type of software testing that ensures that previously developed
and tested software still performs correctly after it has been changed or interfaced with
other software.
The purpose of regression testing is to detect bugs introduced into the software after
updates such as enhancements, patches, or configuration changes.

Key Objectives of Regression Testing:


Ensure Stability: Verify that new code changes have not adversely affected existing
functionalities.
Detect Side Effects: Identify unintended side effects in the unchanged parts of the
software.
Maintain Quality: Ensure overall software quality and reliability over time.

Types of Regression Testing:


1.Corrective Regression Testing:
Testing when no changes in the code are made.
2.Progressive Regression Testing: Testing when new test cases are created due to
changes in requirements.
3.Selective Regression Testing:
Testing specific parts of the application that may be affected by the changes.
4.Complete Regression Testing: Testing the entire application when there are
significant changes in the existing code.
5.Partial Regression Testing:
Testing a part of the system after a small change has been made.
Process of Test Case Prioritization in Regression Testing:
Test case prioritization involves arranging the test cases in a specific order based on
some criteria to achieve efficient and effective regression testing.
Prioritizing test cases ensures that critical tests are executed first, which helps in early
detection of significant defects.
Steps in Test Case Prioritization:
1.Identify Test Cases:
Gather all test cases that need to be included in the regression test suite. This includes
new, modified, and existing test cases.
2.Define Prioritization Criteria:
Criteria can be based on factors like: Business Impact: Importance of functionalities to
the business.
Defect Proneness: Parts of the code that have historically had more defects.
Criticality: Critical paths or features in the application.
Frequency of Use: Features that are used most often by end-users.
Code Coverage: Test cases that cover the most lines of code or functionalities.
Risk: Areas that are riskier and more prone to defects.
3.Assign Priority: Assign a priority level to each test case based on the defined criteria.
Common priority levels include High, Medium, and Low.
4.Sort Test Cases: Arrange the test cases in order of their priority levels. High-priority
test cases should be at the top of the list.
5.Review and Validate: Review the prioritized list to ensure it aligns with the objectives
and constraints of the testing process.
Validate the prioritization with stakeholders.
6.Execute Test Cases:
Start executing test cases based on their priority. Begin with the high-priority tests to
quickly identify critical defects.
7.Analyze Results: Analyze the results of the test execution. Focus on high-priority
defects first as they have a higher impact on the overall system.
8.Re-Prioritize if Necessary:
Based on the outcomes and any new information, adjust the priorities of the remaining
test cases if needed.
Example of Test Case
Prioritization:
Consider a web-based e-commerce application with the following functionalities:
User Login
Product Search
Shopping Cart
Checkout Process
Order History

Q2,22: Explain Halstead software metrics in detail and mention what do you
understand by token count

Ans:
Halstead Software Metrics:
Halstead software metrics are a suite of quantitative measures proposed by Maurice
Halstead in 1977 to assess the complexity and quality of software code.
These metrics are based on the idea that the complexity of a program can be quantified
by analyzing the operators and operands used in the code.
Halstead metrics provide a way to estimate various attributes of software, such as
program length, vocabulary, volume, difficulty, and effort.

Token Count
Token Count in the context of Halstead metrics refers to the identification and counting
of operators and operands in a program.

Tokens are the smallest elements of a program that convey semantic meaning.
In the context of Halstead metrics:
Operators: Symbols or keywords that perform operations on operands (e.g., +, -, *, /, =,
if, while).
Operands: Variables or constants that operators act upon (e.g., x, y, 1, 100).
Example of Token Count:
Consider the following simple code snippet:
int sum = 0;
for (int i = 0; i < 10; i++) {
sum += i;
}

Q3.2022 : Discuss the differences between black box and white box testing and
explain how these techniques can be used simultaneously to test a
system.

Ans:
Differences Between Black Box and White Box Testing:
Black Box Testing and White Box Testing are two fundamental approaches to software
testing that differ primarily in their perspective and focus.
Black Box Testing
Definition:
Black Box Testing is a testing technique where the internal structure, design, and
implementation of the item being tested are not known to the tester.
The tester only knows the input and the expected output.
Focus:
Functional testing, validation of software behavior according to requirements.
Approach: Testing is done from the user's perspective.
Test cases are derived from the requirements and specifications.
Techniques:
Equivalence partitioning
Boundary value analysis
Decision table testing
State transition testing
Use case testing
Advantages:
Tests are performed from a user’s point of view, helping ensure that the system meets
user requirements.

No need for knowledge of programming languages or implementation details.

Effective for validating functional requirements and specifications.


Disadvantages:
Limited coverage of internal code and logic.
Cannot guarantee that all code paths are tested.
Often misses logical errors within the code due to lack of insight into the internal
workings.

White Box Testing


Definition:
White Box Testing, also known as clear, glass, or structural testing, is a testing
technique where the internal structure, design, and implementation of the item being
tested are known to the tester.
Focus:
Verification of the internal workings of the code, such as logic, loops, and data flow.
Approach:
Testing is done from the developer’s perspective.
Test cases are derived from the code structure.
Techniques:
Statement coverage
Branch coverage
Path coverage
Loop testing
Condition coverage
Advantages:
Thorough testing of code paths and internal logic.
Helps in optimizing code and removing dead code.
Facilitates identification of hidden errors and vulnerabilities.
Disadvantages:
Requires detailed knowledge of the programming language and implementation.
Can be time-consuming and complex.
Not effective for validating the system from an end-user perspective.

Using Black Box and White Box Testing Simultaneously


To achieve comprehensive testing of a system, both Black Box and White Box testing
techniques can be used in tandem.
This approach ensures that the system is tested from both the user’s and the
developer’s perspectives, covering all aspects of functionality and internal logic.

Steps to Integrate Both Techniques

1.Requirement Analysis:
2. Test Planning:
3. Test Case Design:
4.Text Execution
5. Defect Reporting and Tracking:
6. Regression testing
7. Integration Testing:
8. User Acceptance Testing (UAT):

Q.2023: Explain boundary value analysis and its significance with example.
Ans:

Boundary Value Analysis


(BVA)Boundary Value Analysis (BVA) is a software testing technique used to identify
errors at the boundaries of input domains rather than within the ranges of the input.
The main idea behind BVA is that errors are more likely to occur at the edges of input
ranges.
By focusing on these boundary values, testers can efficiently find defects with fewer
test cases compared to testing every possible value.
Significance of Boundary Value Analysis
Efficient Testing: By targeting boundary values, BVA reduces the number of test cases
needed to effectively cover input domains, making the testing process more efficient.
Error Detection: Since many errors occur at the boundaries of input ranges, BVA helps
in detecting critical defects that might be missed with other testing techniques.
Complements Other Techniques: BVA is often used in conjunction with other testing
techniques like equivalence partitioning to provide comprehensive test coverage.
Focus on Critical Areas: It directs testing efforts towards areas that are more prone to
errors, ensuring critical functionalities are thoroughly tested.

Example of Boundary Value Analysis


Consider a simple example where an application accepts an integer input value
between 1 and 100 inclusive. Using BVA, the critical boundary values to test would be:
Lower Boundary:
*Just below the lower boundary: (0)
*At the lower boundary: (1)
*Just above the lower boundary: (2)
*Upper Boundary:
*Just below the upper boundary: (99)
*At the upper boundary: (100)
*Just above the upper boundary: (101)
So, the test cases derived from BVA would be:
Input value = 0 (just below the lower boundary)
*Input value = 1 (at the lower boundary)
*Input value = 2 (just above the lower boundary)
*Input value = 99 (just below the upper boundary)
*Input value = 100 (at the upper boundary)
*Input value = 101 (just above the upper boundary)

Q2023: Discuss the various types of structural testing techniques with example of
each.

Ans:

You might also like