Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Software Testing and Quality Assurance Lecture 26 (a) – Testing Interactions (Chapter 6)

Similar presentations


Presentation on theme: "1 Software Testing and Quality Assurance Lecture 26 (a) – Testing Interactions (Chapter 6)"— Presentation transcript:

1 1 Software Testing and Quality Assurance Lecture 26 (a) – Testing Interactions (Chapter 6)

2 2 Lecture Outline Testing Off-the-Shelf Components Protocol Testing Testing Patterns Testing Exceptions

3 3 Testing off-the-shelf components Functionality can be added to an application by purchasing “Components”. Quality of components varies from vendor to another. Acceptance testing for the component in the context in which it will be used is necessary.

4 4 Testing off-the-shelf components Stress tests: extreme, may be correct or incorrect values e.g., moving mouse a lot to generate a large number of mouse move events, making multiple menu selections, etc.

5 5 Protocol testing Protocol testing investigates whether the implementation of a class satisfies its specification Protocol: sequence of method invocations by combining A method whose postconditions enable the precondition of another method

6 6 Protocol testing Each protocol corresponds to a sequence of states beginning with Initial states of the two objects, A sequence of states for each object, and Ending with terminal states (denoted in the state diagram) A test case takes the two objects through one complete sequence of methods

7 7 Protocol testing: Example A protocol can be found by tracing through the state diagram. This provides a life-cycle test case. This provides an effective test of the object in the ways that it will interact with its client objects.

8 8 Test patterns Test patterns are design patterns for test software. A design pattern: captures and reuses design knowledge that has gained widespread application in the OO software development community, e.g., Grid component is based on the Listener design pattern

9 9 Test patterns A pattern is a specific configuration of interactions among a set of objects that form some cluster in the overall design. For a design pattern there can be a test pattern

10 10 Testing exceptions An exception: provides an alternative route for returning from a method that does not necessary move to the next statement after the method is invoked. Exceptions are powerful: The exceptional return value is an object and can be arbitrary complex. The points at which an exception is thrown varies based on the depth of the aggregation hierarchy.

11 11 Testing exceptions Testing exceptions provide two different perspectives At the class testing level, the focus is on wether each of the method is that class does in fact throw the exception. Integration testing will determine whether these exceptions that are being thrown at the correct time are being caught at the correct place.

12 12 Testing Integration at System Level Components become so complex that it is easier to test them in the context of the application itself. For example, user interface provided by most applications programs is not a single instance of some class.

13 13 Key points Stress tests: extreme, may be correct or incorrect values Protocol: sequence of method invocations by combining a method whose post-conditions enable the precondition of another method A design pattern: captures and reuses design knowledge that has gained widespread application in the OO software development community An exception: provides an alternative route for returning from a method that does not necessary move to the next statement after the method is invoked.


Download ppt "1 Software Testing and Quality Assurance Lecture 26 (a) – Testing Interactions (Chapter 6)"

Similar presentations


Ads by Google