Title | Tutorial 9 - Software Testing |
---|---|
Author | Sudip Rai |
Course | Software Testing |
Institution | Federation University Australia |
Pages | 3 |
File Size | 89.6 KB |
File Type | |
Total Downloads | 42 |
Total Views | 168 |
Download Tutorial 9 - Software Testing PDF
Tutorial 9 (Software Testing) 1. Broadly speaking, what are some of the benefits of an object-oriented approach when developing a system? The benefits of an object oriented approach are:
Less redundancy
Higher quality systems
Better understanding and modelling of user needs
Simpler programming of events
Ease in supporting exception (Better Error Handling)
Standards and consistency within and across development efforts
Reusable objects
Benefits from highly cohesive and a loosely coupled system
Better communication between user and analyst
Complete depiction of information system
2. Broadly speaking, how is testing in an object-oriented approach different to testing in a traditional software development? Traditional programs and systems tended to be very hierarchical. Conventional test case design is driven by an input-process-output view of software. As a result testing order was relatively straight forward which consisted unit testing, integration testing, system and regression testing, acceptance testing sequentially. On the other hand, Object Oriented Testing focuses on designing appropriate sequences of methods to exercise the states of a class. There are lots of circular dependencies and designs have few cycles but they creep in during implementation. Moreover, it is necessary to test an object-oriented system at a variety of different levels including intra- and inter-methods & intra- and inter-classes. 3. In an object-oriented development, why is it necessary to use drivers and stubs in testing?
It is necessary because drivers and stubs can help overcome encapsulation difficulties. Drivers can be used •
To test operations at the lowest level and for testing whole groups of classes
•
To replace the user interface so that tests of system functionality can be conducted prior to implementation of the actual interface
Stubs can be used
•
Tutorial 9 (Software Testing) In situations in which collaboration between classes is required but one or more of the collaborating classes has not yet been fully implemented.
4. When testing classes what difficulties does inheritance cause? Inheritance can cause issues for testing because: •
Each new context of use (subclass) requires re-testing because a method may be implemented differently (polymorphism).
•
Other unaltered methods within the subclass may use the redefined method and need to be tested
5. What type of object-oriented models are useful for a guiding a tester?
Following are the type of object oriented models useful for guiding a tester:
Class Diagrams
Use Case Diagrams
State Diagrams
Sequence Diagrams
6. What is thread-based testing in object-oriented systems? Testing set of actions associated with particular class functions is called thread based testing. Thread-based testing integrates the set of classes required to respond to one input or event for the system where each thread is integrated and tested individually. Finally, regression testing is applied to ensure that no side effects occur.
7. Why is exception handling an issue for testers in object-oriented developments? It is an issue because it is impractical to treat exceptions like normal flow and there are too many flows. Exceptions create implicit control flows and may be handled by different handlers. Each path needs to be tested.
8. What are the steps Berard (1993) advocates for object-oriented testing?
a. Each test case should be uniquely identified and should be explicitly associated with the class to be tested,
Tutorial 9 (Software Testing) b. A list of testing steps should be developed for each test and should contain a list of specified states for the object that is to be tested
•
a list of messages and operations that will be exercised as a consequence of the test
•
a list of exceptions that may occur as the object is tested
•
a list of external conditions (i.e., changes in the environment external to the software that must exist in order to properly conduct the test)...