0% found this document useful (0 votes)
30 views31 pages

Unit3 SSVVT

Ssvt

Uploaded by

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

Unit3 SSVVT

Ssvt

Uploaded by

marvel.neelam700
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 31
11:51 AM | 0.2KB/s © Bl Bat! Ged Test Case Prioritization in Software Testing As the name suggests, test case prioritization refers to prioritizing test cases in test suite on basis of different factors. Factors could be code coverage, risk/critical modules, functionality, features, etc. Why should test cases be prioritized? As the size of software increases, test suite also grows bigger and also requires more efforts to maintain test suite. In order to detect bugs in software as early as possible, it is important to prioritize test cases so that important test cases can be executed first. Types of Test Case Prioritization : ¢ General Prioritization : In this type of prioritization, test cases that will be useful for the subsequent modified versions of product are prioritized. It does not require any information regarding modifications made in the product. ¢ Version - Specific Prioritization : Test cases can also be prioritized such that they 11:51 AM | 2.0KB/s © Bal) Beat) Ged e Version — Specific Prioritization : Test cases can also be prioritized such that they are useful on specific version of product. This type of prioritization requires knowledge about changes that have been introduced in product. Prioritization Techniques : 1. Coverage — based Test Case Prioritization : This type of prioritization is based on code coverage i.e. test cases are prioritized on basis of their code coverage. ¢ Total Statement Coverage Prioritization — In this technique, total number of statements covered by test case is used as factor to prioritize test cases. For example, test case covering 10 statements will be given higher priority than test case covering 5 statements. ¢ Additional Statement Coverage Prioritization — This technique involves iteratively selecting test case with maximum statement coverage, then selecting test case which covers statements that were left uncovered by previous test case. This process is repeated till all statements have been covered. ¢ Total Branch Coverage Prioritization — Using total branch coverage as factor for Open In App a © < 11:51 AM | 11.0KB/s © Boal) Beat! Ge ¢ Total Branch Coverage Prioritization — Using total branch coverage as factor for ordering test cases, prioritization can be achieved. Here, branch coverage refers to coverage of each possible outcome of condition. Additional Branch Coverage Prioritization — Similar to additional statement coverage technique, it first selects text case with maximum branch coverage and then iteratively selects test case which covers branch outcomes that were left uncovered by previous test case. Total Fault-Exposing-Potential Prioritization - Fault-exposing-potential (FEP) refers to ability of test case to expose fault. Statement and Branch Coverage Techniques do not take into account fact that some bugs can be more easily detected than others and also that some test cases have more potential to detect bugs than others. FEP depends on: 1. Whether test cases cover faulty statements or not. 2. Probability that faulty statement will cause test case to fail. 2. Risk — based Prioritization : Open In App a © < 11:51 AM | 9.3KB/s © Boal! Brat) GE 2. Risk — based Prioritization : This technique uses risk analysis to identify potential problem areas which if failed, could lead to bad consequences. Therefore, test cases are prioritized keeping in mind potential problem areas. In risk analysis, following steps are performed : e List potential problems. e Assigning probability of occurrence for each problem. ¢ Calculating severity of impact for each problem. After performing above steps, risk analysis table is formed to present results. The table consists of columns like Problem ID, Potential problem identified, Severity of Impact, Risk exposure, etc. 3. Prioritization using Relevant Slice : In this type of prioritization, slicing technique is used — when program is modified, all existing regression test cases are executed in order to make sure that program yields same result as before, except where it has been modified. For this purpose, we try to find part of program which has been affected by modification, and then prioritization of test cases is performed for this affected part. There are 3 parts to slicing Open In App 11:51 AM | 5.5KB/s © Bl) Beat Ge 3. Prioritization using Relevant Slice : In this type of prioritization, slicing technique is used — when program is modified, all existing regression test cases are executed in order to make sure that program yields same result as before, except where it has been modified. For this purpose, we try to find part of program which has been affected by modification, and then prioritization of test cases is performed for this affected part. There are 3 parts to slicing technique : « Execution slice — The statements executed under test case form execution slice. e Dynamic slice - Statements executed under test case that might impact program output. « Relevant Slice - Statements that are executed under test case and don't have any impact on the program output but may impact output of test case. 4. Requirements — based Prioritization : Some requirements are more important than others or are more critical in nature, hence test cases for such requirements should be prioritized first. The following factors can be considered Open In App 11:51 AM | 4.3KB/s © Bou! Brat! Ged 4. Requirements - based Prioritization : Some requirements are more important than others or are more critical in nature, hence test cases for such requirements should be prioritized first. The following factors can be considered while prioritizing test cases based on requirements : e Customer assigned priority — The customer assigns weight to requirements according to his need or understanding of requirements of product. Developer perceived implementation complexity - Priority is assigned by developer on basis of efforts or time that would be required to implement that requirement. Requirement volatility - This factor determines frequency of change of requirement. Fault proneness of requirements - Priority is assigned based on how error-prone requirement has been in previous versions of software. Metric for measuring Effectiveness of Prioritized Test Suite : _ . ‘. tte 11:52 AM | 41.2KB/s © Ball Bt! Ged OQ 2% geeksforgeeks.org/so + : Regression Testing — Software Engineering Regression Testing is the process of testing the modified parts of the code and the parts that might get affected due to the modifications to ensure that no new errors have been introduced in the software after the modifications have been made. Regression means the return of something and in the software field, it refers to the return of a bug. When to do regression testing? e When a new functionality is added to the system and the code has been modified to absorb and integrate that functionality with the existing code. e When some defect has been identified in the software and the code is debugged to fix it. e When the code is modified to optimize its working. Process of Regression testing: 11:52 AM | 17.6KB/s ©) Bll Bt! Ged Process of Regression testing: Firstly, whenever we make some changes to the source code for any reason like adding new functionality, optimization, etc. then our program when executed fails in the previously designed test suite for obvious reasons. After the failure, the source code is debugged in order to identify the bugs in the program. After identification of the bugs in the source code, appropriate modifications are made. Then appropriate test cases are selected from the already existing test suite which covers all the modified and affected parts of the source code. We can add new test cases if required. In the end, regression testing is performed using the selected test cases. Open In App a © < 11:52 AM | 7.3KB/s © Ball Bt! Ged Techniques for the selection of Test cases for Regression Testing: ¢ Select all test cases: In this technique, all the test cases are selected from the already existing test suite. It is the simplest and safest technique but not much efficient. Select test cases randomly: In this technique, test cases are selected randomly from the existing test-suite, but it is only useful if all the test cases are equally good in their fault detection capability which is very rare. Hence, it is not used in most of the cases. Select modification traversing test cases: In this technique, only those test cases are selected which covers and tests the modified portions of the source code the parts which are affected by these modifications. Select higher priority test cases: In this technique, priority codes are assigned to each test case of the test suite based upon their bug detection capability, customer requirements, etc. After assigning the priority codes, test cases with the highest priorities are selected for the process of regression testing. The test case with the highest priority has the highest rank. For 11:52 AM | 4.3KB/s © Bl Bt! Ged ¢ Tools for regression testing: In regression testing, we generally select the test cases from the existing test suite itself and hence, we heed not compute their expected output, and it can be easily automated due to this reason. Automating the process of regression testing will be very much effective and time saving. Most commonly used tools for regression testing are: ¢ Selenium e WATIR (Web Application Testing In Ruby) © QTP (Quick Test Professional) e RFT (Rational Functional Tester) e Winrunner Silktest Advantages of Regression Testing: e It ensures that no new bugs has been introduced after adding new functionalities to the system. e As most of the test cases used in Regression Testing are selected from the existing test suite, and we already know their expected outputs. Hence, it can be easily automated by the automated tools. e It helps to maintain the quality of the source code. Open In App a © < 11:52 AM | 8.7KB/s © Bl Bt! Ged OQ 2% geeksforgeeks.org/so + e WATIR (Web Application Testing In Ruby) ¢ QTP (Quick Test Professional) e RFT (Rational Functional Tester) e Winrunner Silktest Advantages of Regression Testing: e It ensures that no new bugs has been introduced after adding new functionalities to the system. « As most of the test cases used in Regression Testing are selected from the existing test suite, and we already know their expected outputs. Hence, it can be easily automated by the automated tools. e It helps to maintain the quality of the source code. Disadvantages of Regression Testing: e It can be time and resource consuming if automated tools are not used. e It is required even after very small changes in the code. Get 90% Refund On el ariel Pecan avert Open In App 11:52 AM | 108KB/s © Bul Bat! GS OQ 2% geeksforgeeks.org/so + Debugging - Software Engineering Debugging is the process of identifying and resolving errors, or bugs, in a software system. It is an important aspect of software engineering because bugs can cause a software system to malfunction, and can lead to poor performance or incorrect results. Debugging can be a time- consuming and complex task, but it is essential for ensuring that a software system is functioning correctly. There are several common methods and techniques used in debugging, including: = . Code Inspection: This involves manually reviewing the source code of a software system to identify potential bugs or errors. 2. Debugging Tools: There are various tools available for debugging such as debuggers, trace tools, and profilers that can be used to identify and resolve bugs. 3. Unit Testing: This involves testing individual units or components of a software system to identify bugs or errors. Open In App a © < 11:52 AM | 96.3KB/s ©) Bul Bat! GD There are several common methods and techniques used in debugging, including: = . Code Inspection: This involves manually reviewing the source code of a software system to identify potential bugs or errors. 2. Debugging Tools: There are various tools available for debugging such as debuggers, trace tools, and profilers that can be used to identify and resolve bugs. 3. Unit Testing: This involves testing individual units or components of a software system to identify bugs or errors. 4. Integration Testing: This involves testing the interactions between different components of a software system to identify bugs or errors. 5. System Testing: This involves testing the entire software system to identify bugs or errors. 6. Monitoring: This involves monitoring a software system for unusual behavior or performance issues that can indicate the presence of bugs or errors. 7. Logging: This involves recording events and messages related to the software system, which can be used to identify bugs or errors. It is important to note that debugging is an 11:52 AM | 99.7KB/s © Bul Bat! GS ucvuyycis. Debugging Process: The steps involved in debugging are: e Problem identification and report preparation. e Assigning the report to the software engineer defect to verify that it is genuine. ¢ Defect Analysis using modeling, documentation, finding and testing candidate flaws, etc. e Defect Resolution by making required changes to the system. e Validation of corrections. The debugging process will always have one of two outcomes: 1. The cause will be found and corrected. 2. The cause will not be found. Later, the person performing debugging may suspect a cause, design a test case to help validate that suspicion, and work toward error correction in an iterative fashion. During debugging, we encounter errors that range from mildly annoying to catastrophic. As the consequences of an error increase, the amount of pressure to find the cause also increases. Often, 11:53 AM | 35.1KB/s ©) Bul Bat! GD Debugging Approaches/Strategies: 1. Brute Force: Study the system for a longer duration to understand the system. It helps the debugger to construct different representations of systems to be debugged depending on the need. A study of the system is also done actively to find recent changes made to the software. 2. Backtracking: Backward analysis of the problem which involves tracing the program backward from the location of the failure message to identify the region of faulty code. A detailed study of the region is conducted to find the cause of defects. 3. Forward analysis of the program involves tracing the program forwards using breakpoints or print statements at different points in the program and studying the results. The region where the wrong outputs are obtained is the region that needs to be focused on to find the defect. 4. Using A debuggingexperience with the software debug the software with similar problems in nature. The success of this approach depends on the expertise of the debugger. 5. Cause elimination: it introduces the concept of binary partitioning. Data related to the error Open In App a © < (} 2% geeksforgeeks.org/so + 6. Static analysis: Analyzing the code without executing it to identify potential bugs or errors. This approach involves analyzing code syntax, data flow, and control flow. 7. Dynamic analysis: Executing the code and analyzing its behavior at runtime to identify errors or bugs. This approach involves techniques like runtime debugging and profiling. 8. Collaborative debugging: Involves multiple developers working together to debug a system. This approach is helpful in situations where multiple modules or components are involved, and the root cause of the error is not clear. 9. Logging and Tracing: Using logging and tracing tools to identify the sequence of events leading up to the error. This approach involves collecting and analyzing logs and traces generated by the system during its execution. 10. Automated Debugging: The use of automated tools and techniques to assist in the debugging process. These tools can include static and dynamic analysis tools, as well as tools that use machine learning and artificial intelligence to identify errors and suggest fixes. 11:53 AM | 21.2KB/s © Bl Beat! GD serps Difference Between Debugging and Testing: Debugging is different from testing. Testing focuses on finding bugs, errors, etc whereas debugging starts after a bug has been identified in the software. Testing is used to ensure that the program is correct and it was supposed to do with a certain minimum success rate. Testing can be manual or automated. There are several different types of testing unit testing, integration testing, alpha, and beta testing, etc. Debugging requires a lot of knowledge, skills, and expertise. It can be supported by some automated tools available but is more of a manual process as every bug is different and requires a different technique, unlike a pre-defined testing mechanism. Advantages of Debugging: Several advantages of debugging in software engineering: 1. Improved system quality: By identifying and resolving bugs, a software system can be made more reliable and efficient, resulting in improved overall quality. 2. Reduced system downtime: By identifying and Open In App 11:53 AM | 21.2KB/s © OB cll Beat) GSD: Advantages of Debugging: Several advantages of debugging in software engineering: 1. Improved system quality: By identifying and resolving bugs, a software system can be made more reliable and efficient, resulting in improved overall quality. 2. Reduced system downtime: By identifying and resolving bugs, a software system can be made more stable and less likely to experience downtime, which can result in improved availability for users. 3. Increased user satisfaction: By identifying and resolving bugs, a software system can be made more user-friendly and better able to meet the needs of users, which can result in increased satisfaction. 4. Reduced development costs: Identifying and resolving bugs early in the development process, can save time and resources that would otherwise be spent on fixing bugs later in the development process or after the system has been deployed. 5. Increased security: By identifying and resolving bugs that could be exploited by attackers, a Po 11:53 AM | 12.5KB/s © Bull Bat) GE Disadvantages of Debugging: While debugging is an important aspect of software engineering, there are also some disadvantages to consider: 1. Time-consuming: Debugging can be a time- consuming process, especially if the bug is difficult to find or reproduce. This can cause delays in the development process and add to the overall cost of the project. . Requires specialized skills: Debugging can bea complex task that requires specialized skills and knowledge. This can be a challenge for developers who are not familiar with the tools and techniques used in debugging. . Can be difficult to reproduce: Some bugs may be difficult to reproduce, which can make it challenging to identify and resolve them. . Can be difficult to diagnose: Some bugs may be caused by interactions between different components of a software system, which can make it challenging to identify the root cause of the problem. . Can be difficult to fix: Some bugs may be caused by fundamental design flaws or architecture issues, which can be difficult or I IE EN EO Every software development process follows a Software Development Life Cycle(SDLC) to develop a quality software product. Software testing is one of the important phases as it only ensures the quality of the product. So, for that different types of software testing are performed to check different parameters or test cases. Domain Testing : It is a software testing technique where minimum numbers of inputs are used to access appropriate output of a system, to ensure the system does not accept invalid input values. The system is expected to give required outputs blocking the invalid inputs. Structure of Domain Testing : The process is quite similar everywhere when it comes to building the strategy, where the following step-by-structure is used that suits most of the scenarios: ¢ Think what can go wrong. ¢ Find a solution to handle each case. Open In App 11:53 AM | 15.6KB/s ©) Bll Bat! Go Structure of Domain Testing : The process is quite similar everywhere when it comes to building the strategy, where the following step-by-structure is used that suits most of the scenarios: e Think what can go wrong. ¢ Find a solution to handle each case. e Pick several points to test each error. ¢ Take one test point to examine adjacent domains e Then start running the test e Check if the boundaries are faulty e Inspect boundaries of all domains Domain Knowledge : Domain knowledge is a good understanding of a particular sphere i.e. a person is acquainted with a particular term of discipline. It helps to minimize the delivery cycle, improve customer service reduce development time. Is domain knowledge required for Domain testing? It is difficult for someone to perform effectively in a field where the person is not familiar. So a domain tester should have basic domain Open In App a © < 11:53 AM | 11.4KB/s © Ball at GD iS Gomain Knowleage required ror vomain testing? It is difficult for someone to perform effectively in a field where the person is not familiar. Soa domain tester should have basic domain knowledge. It is important because: ¢ Online banking - A tester must have to be an expert in online banking activities like login, bill payment, and transfers. ¢ Retail domains - To successfully run a domain test, the tester has to recognize how things work flow at different levels. Some examples of retail domains are warehouse management, in-store solutions, etc. ¢ Healthcare - A tester with a proper understanding of domain knowledge should handle a healthcare system. It is a huge risk to someone's life when someone with zero knowledge handles the system. Domain Testing Strategy : We know that every domain has a boundary from which it is been defined and points near the boundaries are checked during tests. A testing process every time begins with a question. The domain testing strategy is an experiment by a QA Open In App 11:53 AM | 8.3KB/s © Bul Bat! GD Domain Testing Strategy : We know that every domain has a boundary from which it is been defined and points near the boundaries are checked during tests. A testing process every time begins with a question. The domain testing strategy is an experiment by a QA specialist to find the solutions to these answers: e What domain should be tested? e How to group values into classes? e What value should | test? e How am | going to get the results? A real-lifeon example of Domain testing : Let there be a group of students on a study tour. For entertainment purposes, they have been given a ticket to perform a specific activity based on gender and age inputs. Here the entertainment facility acts as the test, age groups will be boundary values with numerous possible scenarios. Students perform activities in the following manner: ¢ Children less than 5 years old are to tell a poem e Boys 5>=10 are to draw ¢ Girls 5>=10 are to sing a song e Boys >10 are to compete in a sport Open In App 11:54 AM | 13.4KB/s © Ball Beat) GS e Children less than 5 years old are to tell a poem e Boys 5>=10 are to draw e Girls 5>=10 are to sing a song ¢ Boys >10 are to compete in a sport e Girls >10 are to participate in the quiz e The remaining children >15 are to participate in an essay competition Based on the given algorithm, the specialist groups the values into classes i.e. age groups, and then boundary values are picked i.e. highest and lowest age values in a group. Then different scenarios are built with expected results for each. Skills required for Domain testing : To be a good domain tester, one must have the following skills: Open In App a © < 11:54 AM | 10.2KB/s © Bul Bat! GD Skills required for Domain testing : To be a good domain tester, one must have the following skills: ¢ Quick learner ¢ Domain knowledge e Can work under pressure e Technical and Programming skills ¢ Automation skill e Bug hunting skill e¢ Communication skill Domain testing requires knowledge of providing correct input to get the necessary output. It is also equivalent to boundary analysis testing, where input variables are examined and taken as boundary values and equivalence class values to get the desired result. Advantages of Domain Testing : e Identifies edge cases that can cause issues ina software system. e Efficient use of testing resources. e Increases test coverage by testing a wide range of values within a domain. e Improves software quality by identifying and fixing issues in edge cases. Open In App a © < 11:54 AM | 11.2KB/s © Bul Bia! G Advantages of Domain Testing : e Identifies edge cases that can cause issues ina software system. e Efficient use of testing resources. e Increases test coverage by testing a wide range of values within a domain. ¢ Improves software quality by identifying and fixing issues in edge cases. ¢ Cost-effective testing technique that requires fewer resources compared to other testing techniques. Disadvantages of Domain Testing : ¢ Limited scope, only focuses on a specific range or domain. e A false sense of security, may not identify all issues outside the domain. ¢ Difficult to determine domain boundaries. e May not catch complex issues that require testing of multiple variables or interactions between different parts of the system. ¢ May not be suitable for all types of systems, particularly those that have complex input and output parameters or that require more advanced testing techniques. 11:54 AM | 314KB/s © Bl Bat! Go OQ 2% geeksforgeeks.org/so + What is Slicing? Slicing or program slicing is a technique used in software testing that takes a slice or a group of program statements in the program for testing particular test conditions or cases that may affect a value at a particular point of interest. 1. It can also be used to debug to find the bugs more easily and quickly. 2. Slicing techniques were originally defined by Mark Weiser and they were only static at that time. 3. Afterward, Bogdan Korel and Janusz Laski introduced dynamic slicing, which can work for a particular execution of the program. Below is the C++ program to implement Slicing: C++ // C++ program to implement slicing #include using namespace std; int main() Open In App a © < 11:54 AM | 467KB/s © Bul Boat! Go introduced dynamic slicing, which can work for a particular execution of the program. Below is the C++ program to implement Slicing: C++ // C++ program to implement slicing #include using namespace std; int main() { int n = 12; int sum = 0; if (n > 10) sum = sum + n; else sum = sum - n; cout << "Hey"; Output Hey There are 2 types of Slicing: Open In App a © 4 11:54 AM | 235KB/s © Bl Bat! GSD There are 2 types of Slicing: Slicing Static Slicing Dynamic Slicing Types of Slicing Static Slicing 1. A static slice of a program contains all statements that may impact the value of a variable at any point for any arbitrary execution of the program. 2. Static slices are generally larger. 3. It considers every possible execution of the program. Below is the C++ program to implement static slicing: C++ Open In App a © < 11:54 AM | 2.0KB/s © Bul Bat! Go Below is the C++ program to implement static slicing: C++ // C++ program to implement static // slicing #include using namespace std; // Driver code int main() { int n = 12; int sum ty °o if (n > 10) sum = sum + n; else sum = sum - n; cout << sum; Output 12 Dynamic Slicing Open In App a © < 11:54 AM | 0.4KB/s © Bul Ba! Ge Dynamic Slicing 1. A dynamic slice of a program contains all the statements that actually impact the value of a variable at any point for a particular execution of the program. 2. Dynamic slices are mostly smaller. 3. Considers only a particular execution of the program. Below is the C++ program to implement dynamic slicing for the variable sum when n = 22: C++ // C++ program to implement dynamic // slicing #include using namespace std; // Driver code int main() { int n = 22; int sum = 0; if (n > 10) sum = sum + n; cout << sum; Open In App a © <

You might also like