csci 387 quiz 4 Flashcards
program 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
program testing goals
to demonstrate to the developer and the customer that the software meets its requirements (validation); to discover situations in which the behavior of the software is incorrect, undesirable, or does not conform to its specification (defect)
for custom software, there must be at least ? test(s) for every requirement in the requirements document
one
for generic software products, there must be tests for ?
all of the system features, plus combinations of these features, that will be incorporated in the product release
defect testing is concerned with
rooting out undesirable system behavior such as crashes, unwanted interactions with other systems, incorrect computations, and data corruption
verification
are we building the product right (the software should conform to its specification)
validation
are we building the right product (the software should do what the user really requires)
aim of verification and validation is to
establish confidence that the system is ‘fit for purpose’
verification and validation confidence depends on
system’s purpose, user expectations, and marketing environment
static verification
software inspections concerned with analysis of the static system representation to discover problems (may be supplemented by tool-based document and code analysis)
dynamic verification
software testing concerned with exercising and observing product behavior (the system is executed with test data and its operational behavior is observed)
software inspections involve
people examining the source representation to discover anomalies/defects
inspections do not require ?, so they may be used ? implementation
execution of a system; before
during testing, ? can mask/hide other errors
errors
incomplete versions of a system can be inspected (with/without) additional costs
without
an inspection can also consider broader quality attributes of a program, such as ?
compliance with standards, portability, maintainability
inspections and testing are ? verification techniques
complementary and not opposing
both ? and ? should be used during the V&V process
inspections and testing
inspections can check conformance with ? but not with ?
a specification; a customer’s real requirements
inspections cannot check ? characteristics such as ?
non-functional; performance, usability, etc.
stages of testing
development, release, user
development testing
the system is tested during development to discover bugs and defects
release testing
a separate testing team tests a complete version of the system before it is released to users
user testing
users or potential users of a system test the system in their own environment
development testing includes
unit testing, component testing, and system testing
unit testing
individual program units or object classes are testing
unit testing should focus on testing
the functionality of objects or methods
component testing
several individual units are integrated to create composite components
component testing should focus on
testing component interfaces
system testing
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
unit testing is a ? testing process
defect
units in unit testing may be
individual functions or methods within an object, object classes with several attributes and methods, composite components with defined interfaces used to access their functionality
object class testing: complete test coverage of a class involves
testing all operation associated with an object; setting and interrogating all object attributes; exercising the object in all possible states
? makes it more difficult to design object class tests as the information to be tested is not localized
inheritance
using a state model, identify ? to be tested and the ? to cause these transitions
sequences of state transitions; event sequences
whenever possible, unit testing should be ? so that tests are run and checked without manual intervention
automated
in automated unit testing, you make use of a ? to write and run your program tests
test automation framework (such as JUnit)
unit testing frameworks provide generic test classes that you ? to create specific test cases. they can then run all of the tests that you have implemented and report on ?
extend; the success of the tests
automated test components
setup, call, assertion parts
setup part
where you initialize the system with the test case, namely the inputs and expected outputs
call part
where you call the object or method to be tested
assertion part
where you compare the result of the call with the expected results (true = successful)
two types of unit test cases
- reflect normal operation of a program/show that the component works as expected
- use abnormal inputs to check that these are properly processed and do not crash the component