Presentation is loading. Please wait.

Presentation is loading. Please wait.

Integration and configuration testing Presented by: Žygimantas Mockus.

Similar presentations


Presentation on theme: "Integration and configuration testing Presented by: Žygimantas Mockus."— Presentation transcript:

1 Integration and configuration testing Presented by: Žygimantas Mockus

2 What is unit testing? Unit testing is a software development process in which the smallest testable parts of an application, called units, are individually and independently scrutinized for proper operation. Unit testing is often automated but it can also be done manually. This testing mode is a component of Extreme Programming (XP), a pragmatic method of software development that takes a meticulous approach to building a product by means of continual testing and revision. This encourages developers to modify the source code without immediate concerns about how such changes might affect the functioning of other units or the program as a whole. Once all of the units in a program have been found to be working in the most efficient and error-free manner possible, larger components of the program can be evaluated by means of integration testing.

3 Example of unit testing

4

5 What is integration testing? Integration testing ("I&T") is the phase in software testing in which individual software modules are combined and tested as a group. It occurs after unit testing and before system testing. Integration testing takes as its input modules that have been unit tested, groups them in larger aggregates, applies tests defined in an integration test plan to those aggregates, and delivers as its output the integrated system ready for system testing.

6 Integration testing scheme

7 Why do we need integration testing? Integration tests are necessary to ensure that a single component, which is created when a number of units is combined, satisfy the criteria: Functional Requirements Performance Reliability

8 Why can‘t we rely only on unit- tests when working with databases?

9 Integration testing approaches Big Bang: Involves integrating the modules to build a complete software system. This is considered a high-risk approach because it requires proper documentation to prevent failure. Bottom-Up: Involves low-level component testing, followed by high-level components. Testing continues until all hierarchical components are tested. Bottom-up testing facilitates efficient error detection. Top-Down: Involves testing the top integrated modules first. Subsystems are tested individually. Top-down testing facilitates detection of lost module branch links.

10 Big Bang testing approach In Big Bang integration testing all components or modules are integrated simultaneously, after which everything is tested as a whole. In this approach, the program is integrated without any formal integration testing, and then run to ensures that all the components are working properly. Big Bang testing has the advantage that everything is finished before integration testing starts. The major disadvantage is that in general it is time consuming and difficult to trace the cause of failures because of this late integration.

11 Why Big Bang approach shouldn‘t be used Defects present at the interfaces of components are identified at very late stage. It is very difficult to isolate the defects found, as it is very difficult to tell whether defect is in component or interface. There is high probability of missing some critical defects which might surfaced in production. It is very difficult to make sure that all the cases for integration testing are covered.

12 If Big Bang approach is wrong, how should integration testing be conducted?

13 Incremental integration

14 Bottom-up testing approach In bottom up integration testing, module at the lowest level are developed first and other modules which go towards the 'main' program are integrated and tested one at a time. In this approach, lower level modules are tested extensively thus make sure that highest used module is tested properly.

15 Top-down testing approach Top down integration testing is an incremental integration testing technique which begins by testing the top level module and and progressively adds in lower level module one by one. Lower level modules are normally simulated by dummy modules (stubs) which mimic functionality of lower level modules. As you add lower level code, you will replace stubs with the actual components.

16 Top-down and Bottom-up testing approach

17 Sandwich testing approach Combines top-down strategy with bottom-up strategy The system is view as having three layers ◦ A target layer in the middle ◦ A layer above the target ◦ A layer below the target ◦ Testing converges at the target layer How do you select the target layer if there are more than 3 layers? ◦ Heuristic: Try to minimize the number of them to 3.

18 Sandwich testing approach: advantages and disadvantages Advantage: Top and Bottom Layer Tests can be done in parallel. Disadvantage: Does not test the individual subsystems thoroughly before integration.

19 There are three main types of speed-related testing: performance testing, load testing and stress testing.

20 Performance testing What it does: The goal of performance testing is not to find bugs, but to eliminate bottlenecks and establish a baseline for future regression testing. What it doesn‘t do: May not detect some functional defects that only appear under load.

21 Load testing Load testing is usually defined as the process of exercising the system under test by feeding it the largest tasks it can operate with. What it does: Determines the throughput required to support the anticipated peak production load. Determines the adequacy of a hardware environment. Detects concurrency issues. Detects functionality errors under load. Helps to determine how many users the application can handle before performance is compromised. Helps to determine how much load the hardware can handle before resource utilization limits are exceeded.

22 Examples of Load testing Testing a word processor by editing a very large document Testing a printer by sending it a very large job Testing a mail server with thousands of users mailboxes A specific case of load testing is zero-load testing, where the system is fed empty tasks

23 Stress testing Testing conducted to evaluate a system or component at or beyond the limits of its specified requirements to determine the load under which it fails and how. What it does: Determines if data can be corrupted by overstressing the system. Provides an estimate of how far beyond the target load an application can go before causing failures and errors in addition to slowness. Allows you to establish application-monitoring triggers to warn of impending failures. Ensures that security vulnerabilities are not opened up by stressful conditions. Determines the side effects of common hardware or supporting application failures. Helps to determine what kinds of failures are most valuable to plan for.

24 Example scenario: developing an app for Android platform

25 How to test it efficiently?

26

27 Configuration testing Configuration testing is the process of testing a system under development on machines which have various combinations of hardware and software. Because the number of possible configurations to test is typically too large to effectively test, it is crucial that the planning effort for a software testing effort clearly identify which platforms will be supported. Hardware configuration testing is often performed in test labs which simply consist of a large number of machines with different types of hardware.

28 How to perform integration testing correctly? Perform unit-testing of the classes of the component Define test-cases that exercise all the use cases of the component Write integration tests according those test-cases Execute them. Perform speed-related testing.

29 Questions?


Download ppt "Integration and configuration testing Presented by: Žygimantas Mockus."

Similar presentations


Ads by Google