Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. We introduced the Unit Testing, Integration Testing and System Testing, pleas

ID: 3718043 • Letter: 1

Question

1. We introduced the Unit Testing, Integration Testing and System Testing, please do a detail description for each testing stage, what is the main purpose of each testing, what kinds of strategies can be used to each testing, and also explain the relationship among the three testing. (20 points)

2. The Following is the source code that will need to do the mutation testing, how many mutants can be given to this source code, and list each mutants and explain why you did this kinds of mutants?  (10 points)

Public Function isLeap(year) As Boolean
            Dim year As Integer
            Dim c1, c2, c3 As Boolean
1.       c1 = (year % 4 == 0)        
2.       c2 = (year % 100 == 0)      
3.       c3 = (year % 400= = 0)      
4.       isLeap = False
5.       If ( (c1 AND NOT(c2)) OR (c3)) Then
6.                   IsLeap = True
7.       EndIf
8.       End Function           

3. Why do we do the software testing?The following picture is about the software testing cost at each stages for three different kinds of defects, please explain this graph. (10 points)

4. We have introduced the error, fault, and failure, please explain the relationship among this three terminology, and write a source code to mark where is the error happened, how the fault appear, and what is the failure caused , and also explain it. (10 points)

5. When do we stop to do testing? What is the stop reasons? (10 points)

Explanation / Answer

1)Answer:

Unit Testing:

UNIT TESTING is a level of software testing where individual units/ components of a software are tested. The purpose is to validate that each unit of the software performs as designed. A unit is the smallest testable part of any software. It usually has one or a few inputs and usually a single output. In procedural programming, a unit may be an individual program, function, procedure, etc. In object-oriented programming, the smallest unit is a method, which may belong to a base/ super class, abstract class or derived/ child class. (Some treat a module of an application as a unit. This is to be discouraged as there will probably be many individual units within that module.) Unit testing frameworks, drivers, stubs, and mock/ fake objects are used to assist in unit testing.

->Unit Testing is the first level of software testing and is performed prior to Integration Testing.

->It is normally performed by software developers themselves or their peers. In rare cases, it may also be performed by independent software testers.

Unit Testing Benefits

Unit Testing Tips

Integration Testing:

Integration testing is a software testing methodology used to test individual software components or units of code to verify interaction between various software components and detect interface defects. Components are tested as a single group or organized in an iterative manner. After the integration testing has been performed on the components, they are readily available for system testing.

Integration is a key software development life cycle (SDLC) strategy. Generally, small software systems are integrated and tested in a single phase, whereas larger systems involve several integration phases to build a complete system, such as integrating modules into low-level subsystems for integration with larger subsystems. Integration testing encompasses all aspects of a software system's performance, functionality and reliability.

Most unit-tested software systems are comprised of integrated components that are tested for error isolation due to grouping. Module details are presumed accurate, but prior to integration testing, each module is separately tested via partial component implementation, also known as a stub.

The three main integration testing strategies are as follows:

Upon completion of unit testing, the units or modules are to be integrated which gives raise to integration testing. The purpose of integration testing is to verify the functional, performance, and reliability between the modules that are integrated.

Integration Strategies:

Big-Bang Integration

Top Down Integration

Bottom Up Integration

Hybrid Integration

System Testing:

Falling under the scope of black box testing, system testing is a phase in the software testing cycle where a total and integrated application /system is tested.

The focus of the system testing is to evaluate the compliance of the entire system with respect to the specified requirements. System testing helps in approving and checking the business, functional, technical, and any non-functional requirements of the application concerning the architecture as a whole.

The scope of system testing is not only limited to the design of the system but also to the behavior and believed expectations of the business. In accordance with the software test cycle, system testing is performed before acceptance testing and after integration testing. Independent users or testers are given the tasks to perform in the system testing phase.

Importance aspects of system testing: