What About Other Types of Testing?

Some UML diagrams can also help you with non-functional testing. We previously discussed the annotation of activity and sequence diagrams when performance requirements need to be tested (e.g., response time, processing time, delays). As you levy performance requirements on a system, you can make explicit the “budgeting” (i.e., allocation) of those requirements to the various lower-level components directly on the appropriate UML diagram. (Also, in UML 2.0, numerous additions have been made related to time—the new timing diagrams, enhancements to sequence diagrams and state machine diagrams, and so forth.)

Performance and Regression Testing

UML can also help you understand performance issues early in development, before it is too late. Examine your sequence diagrams. If you notice in your model (not just in one diagram) that a particular element has many, many messages flowing to it, this might indicate that this element might have a performance problem. For example, if the element is a system log that many elements in the system are writing to and reading from it at the same time, this could be a problem. Design changes should be considered in such cases. Notwithstanding, if we are doing testing and the sequence diagrams show such a situation, they are clearly pointing out that this element should be load tested.

Your UML models can also guide regression testing. A regression test is a test (or set of tests) that you run after someone makes a change to your system in order to ensure that the system still operates correctly. When someone changes something in your system, you can use the models to determine which regression tests you need to perform or even which new tests you need to run to test the changes. For example, referring back to Figure 7-12, if someone makes a change to the BatchController, you don't just test that controller in isolation. You should execute a regression test to ensure that it still collaborates correctly with all the other elements it is involved with, which you can identify in the UML class diagram. To be thorough, the entire Transmit MDS use case should be the regression test. However, in some cases, the related use case can be very complex. If you need to limit the scope of the regression testing, you could find the sequences (and alternate flows) in the use case's sequence diagrams that involve BatchController and retest only those flows.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.12.161.77