This preview shows page 1. Sign up to view the full content.
Unformatted text preview: sible paths through program makes it
impossible to test every path
– Easiest to do during development Black box, behavioral testing
– We know what output the box should provide based on given
inputs, so we test for these outputs
– Performed later in test process Embedded Systems 17 Test Harness
Components – Driver: provide data to function
– Stub: simulate an as-of-yetunwritten function
• May need stub functions to
simulate hardware !
%& ./ )
*+,- . / 00
4 1+ 2 . / #
(( ./ 8 (( ! "9 ",-:
8 '' ! "9 ",-: ;
+,- . / ;
+2./ 5 8 $ $ # Conditional compilation
8 # 8
5 8 $
1+ 2 . / 6 + 2 . / 7
*+,- . / 6 +,- . / 7 ! Embedded Systems 18 Passing Input Data to Functions "
? Code gets data from…
– Arguments – easy to handle
Global variables (including global data
structures) – require some “glue” code to
configure/preload Example: Testing decoding of recorded NMEA
sentences from sonar
– -+9 " DE 3 < =< =
3 @ A- B B2 >C
-+9 3 !
! Don’t have sonar connected to board
Instead load U0RxQ with NMEA sentences &
C CEAB" 4J9/CBC
C C " BKA B GHI22 BCBC
4L L GC
C4 ML L GC
CCC F MC F MCN5 OC4 ;;L L GC GHE""D C
L L GC
GH.P./PC F MC-C F MCL L GC
Embedded Systems C.CK ""9BI
NL L GC
;4L L GC
;ML L GC 19 Test Plans
A test plan is a general document describing the general test
philosophy and procedure of testing. It will include:
Description of test phases and functionality tested each
List of test cases to be executed
Test success/failure criteria of the test phase
Regression activities Embedded Systems 20 Test Cases
A test case is a specific procedure of testing a particular
requirement. It will include:
Identification of specific requirement tested
Test case success/failure criteria
Specific steps to execute test Embedded Systems 21 Test Case Example
Test Case L04-007:
Objective: Tested Lab 4 requirement 007.
Passing Criteria: All characters typed are displayed on LCD and
Materials needed: Standard Lab 4 setup (see test plan).
1. Attach RS-232c cable between the SKP board and a PC.
2. Start HyperTerminal on PC at 300 baud, 8 data bits, 2 stop bits, even
3. Type “a” key on PC. Ensure it is displayed on SKP board LCD, and
in the PC HyperTerminal window.
4. Test the following characters: CR, A, a, Z, z, !, \, 0, 9 Embedded Systems 22 A Good Test…
Has a high probability of f...
View Full Document
This note was uploaded on 01/19/2014 for the course ECE 5101 taught by Professor Sass during the Spring '14 term at UNC Charlotte.
- Spring '14
- Software engineering