Please enable JavaScript.
Coggle requires JavaScript to display documents.
ch8 Software engineering, Program testing, Object class testing,…
-
Program testing
Program testing goals
-
To discover situations in which the behavior of the software is incorrect, undesirable or does not conform to its specification.
Defect testing is concerned with rooting out undesirable system behavior such as system crashes, unwanted interactions with other systems, incorrect computations and data corruption.
Testing is intended to show that a program does what it is intended to do and to discover program defects before it is put into use.
When you test software, you execute a program using
artificial data.
You check the results of the test run for errors, anomalies or information about the program’s non-functional attributes.
-
Testing is part of a more general verification and validation process, which also includes static validation techniques.
Object class testing
-
-
-
Inheritance makes it more difficult to design object class tests as the information to be tested is not localised.
-
Inspections and testing
-
-
Inspections can check conformance with a specification but not conformance with the customer’s real requirements.
Inspections cannot check non-functional characteristics such as performance, usability, etc.
Automated testing
-
Whenever possible, unit testing should be automated so that tests are run and checked without manual intervention.
In automated unit testing, you make use of a test automation framework (such as JUnit) to write and run your program tests.
Unit testing frameworks provide generic test classes that you extend to create specific test cases. They can then run all of the tests that you have implemented and report, often through some GUI, on the success of otherwise of the tests.
-
Inspections and testing
Software inspections Concerned with analysis of the static system representation to discover problems (static verification)
-
-
Software inspections
These involve people examining the source representation with the aim of discovering anomalies and defects.
-
They may be applied to any representation of the system (requirements, design,configuration data, test data, etc.).
-
-
Stages of testing
Development testing
-
Development testing includes all testing activities that are carried out by the team developing the system.
Unit testing
where individual program units or object classes are tested. Unit testing should focus on testing the functionality of objects or methods.
-
-
-
Component testing
where several individual units are integrated to create composite components. Component testing should focus on testing component interfaces.
-
-
Testing composite components should therefore focus on showing that the component interface behaves according to its specification.
You can assume that unit tests on the individual objects within the component have been completed (you don't need to re test it).
Interface testing
-
-
Interface errors
Interface misuse
A calling component calls another component and makes an error in its use of its interface e.g. parameters in the wrong order.
-
Timing errors
The called and the calling component operate at different speeds and out-of-date information is accessed.
-
-
System testing
where some or all of the components in a system are integrated and the system is tested as a whole. System testing should focus on testing component interactions.
System testing during development involves integrating components to create a version of the system and then testing the integrated system.(integrate components then test)
-
System testing checks that components are compatible, interact correctly and transfer the right data at the right time across their interfaces.
-
-
Release testing, where a separate testing team test a complete version of the system before it is released to users.
User testing, where users or potential users of a system test the system in their own environment.
Use-case testing
-
Each use case usually involves several system components so testing the use case forces these interactions to occur.
The sequence diagrams associated with the use case documents the components and interactions that are being tested.
-
testing process goals
-
Defect testing
To discover faults or defects in the software where its behaviour
is incorrect or not in conformance with its specification
A successful test is a test that makes the system perform incorrectly and so exposes a defect in the system.
Testing strategies
-
Partition testing
Partition testing, where you identify groups of inputs that have common characteristics and should be processed in the same way.
Input data and output results often fall into different classes where all members of a class are related.(partition them in classes)
Each of these classes is an equivalence partition or domain where the program behaves in an equivalent way for each class member.(each calss behave in a similar way)
-
-
Testing policies
-
Exhaustive system testing is impossible so testing policies which define the required system test coverage may be developed.(testing policies should tell what should be tested in the system)