Teaching slides Chapter 9. Chapter 9 Software Testing (Verification & Validation) Introduction Software testing & software engineering methodologies Introduction.

  • Published on
    18-Jan-2018

  • View
    216

  • Download
    0

Embed Size (px)

DESCRIPTION

Chapter 9 Software Testing (Verification & Validation) Software testing is the process of finding defects in a software product so that they can be fixed. Software testing originally involved testing the finished software product to uncover software defects. Later many people realized that even software requirement specifications and software design also contain defects and if these defects can be removed at the point of occurrence then they will not propagate to down the line processes. This will result in producing better quality software products. At the same time, effort required in fixing software defect will come down since fewer software defects will need to be fixed. The entire process of finding and fixing defects in all artifacts (requirement specifications, software design, source code etc.) during software development lifecycle is known as verification and validation.

Transcript

Teaching slides Chapter 9 Chapter 9 Software Testing (Verification & Validation) Introduction Software testing & software engineering methodologies Introduction to different types of software testing Introduction to verification & validation Introduction to levels of software testing (validation) Verification Unit testing Integration testing System testing User acceptance testing Other important tests Test case design Test preparation Test lifecycle Chapter 9 Software Testing (Verification & Validation) Software testing is the process of finding defects in a software product so that they can be fixed. Software testing originally involved testing the finished software product to uncover software defects. Later many people realized that even software requirement specifications and software design also contain defects and if these defects can be removed at the point of occurrence then they will not propagate to down the line processes. This will result in producing better quality software products. At the same time, effort required in fixing software defect will come down since fewer software defects will need to be fixed. The entire process of finding and fixing defects in all artifacts (requirement specifications, software design, source code etc.) during software development lifecycle is known as verification and validation. Chapter 9 Software Testing (Verification & Validation) Verification & validation & levels of software testing Chapter 9 Software Testing (Verification & Validation) There are many types of software testing (verification & validation) are done during the entire software development lifecycle. The above figure depicts most of the types of testing done on software projects. Verification tests are also known as static tests as no execution of artifact is required to run it during these tests. Verification tests include requirement specification reviews, design reviews, source code reviews etc. Validation tests are also known as dynamic tests as execution of artifact under test is required to run it during these tests. Validation tests are further divided into white box and black box tests. White box tests are named so as the source code is used during software testing. White box tests are also known as structural tests as they test small parts (structures) of the software product. Unit tests and integration tests fall under these tests. Black box tests are named so as the source code is not used during software testing. Instead the executable binary machine code is used. Black box tests are further divided into functional and non functional tests. Non functional tests are further divided into performance, security, usability etc. tests. Black box tests are done both at system level as well as at deployment (user acceptance) level. Regression tests are done for both white box as well as black box tests. Chapter 9 Software Testing (Verification & Validation) Verification & validation and associated software testing types Chapter 9 Software Testing (Verification & Validation) Verification is that part of software testing where the testing is done on any software project artifact which has no executable part available. Software requirement specifications, software designs, source code (testing to view only the source code and not running it) are project artifacts which are tested using verification techniques. Requirement specifications are tested using requirement specification reviews, software designs are tested using design reviews and source code (construction) is tested using source code reviews. Validation is that part of software testing where the testing is done on software product by executing its source code. Business logic at class (component) level is tested using unit testing, integration of component is tested using integration testing, the software product is tested using system testing and finally the deployment of the software product is tested by end users using user acceptance testing. Chapter 9 Software Testing (Verification & Validation) Levels of software testing (validation) Chapter 9 Software Testing (Verification & Validation) Software testing (validation) is done at many levels. These levels include unit, integration, system and deployment. All of these levels come under validation. Software components are tested for business logic correctness at unit tests level. These components are then tested for integration with source code build using integration testing. The completely built software product after integration of all components is again tested at system level. At this level functional tests are done to test if software product features are working as per software requirement specifications. When the software product is ready then it is deployed at client site. The end users do user acceptance testing to ensure that the software product is working as per requirement specifications. Chapter 9 Software Testing (Verification & Validation) Barry Boehms V Model for software testing Chapter 9 Software Testing (Verification & Validation) Barry Boehms V Model is all about linking artifacts developed during software development lifecycle with levels of testing. Software requirement specifications are used to perform user acceptance testing. Software design specifications are used to perform system testing. Software unit construction (software component) is used to perform unit testing. Software module or sub system is used to perform integration testing. Chapter 9 Software Testing (Verification & Validation) Software verification Verification tests include requirement specification reviews, software design reviews, source code reviews etc. Requirement specification reviews are done after these artifacts get completed. Software testers or business analysts review the requirement specifications for completeness, ambiguity and errors. If any errors or incompleteness is found then it is rectified. Software design reviews are done to check if the software design is correct as per requirement specifications. Software design reviews also include reviewing software component structure. If large classes were with many methods are designed then it will lead to difficult to understand source code. Similar structural problems can be found during design reviews. The identified design problems will need to be rectified. Source code reviews are done to check for dead code, wrong implementation of business logic etc. If any of these defects are found then they are rectified. Code walkthroughs are also used for source code checking. Here the developer presents his/her source code in front of other project team members. Team members review the source code and find any defects are there in the code. Software developer later rectifies those defects. Chapter 9 Software Testing (Verification & Validation) Unit testing Unit testing is done after a class or component is constructed. Each class implements some business logic. The source code in the class is checked to verify if the business logic is implemented properly. Unit testing is also done for extended testing when database access is also involved. In such cases business logic as well as database access aspect also need to be considered. Testing database connection and testing if database operation actually happens are also done on these tests. Chapter 9 Software Testing (Verification & Validation) class addition { public boolean adding (integer one, integer two){ if one >= 1 and one = 1 and two

Recommended

View more >