UNCC-EmbeddedSystems-Software_Testing

00 3 4 1 2 8 9

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

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 under test – Stub: simulate an as-of-yetunwritten function • May need stub functions to simulate hardware ! " %& ./ ) *+,- . / 00 3 " 4 1+ 2 . / # (( (( ./ 8 (( ! "9 ",-: 8 '' ! "9 ",-: ; +,- . / ; +2./ 5 8 $ $ # Conditional compilation Automation 8 8 8 # 8 5 8 $ &5 # %& 3 ./ 1+ 2 . / 6 + 2 . / 7 *+,- . / 6 +,- . / 7 ! Embedded Systems 18 Passing Input Data to Functions " 3 %& $ >9? $ ? 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 & $ <F=<= C CEAB" 4J9/CBC C C " BKA B GHI22 BCBC 4J9/CJC;5 4L L GC GH K"C CC C+C C4 ML L GC GH E"C C GHE""D.C CCC F MC F MCN5 OC4 ;;L L GC GHE""D C CCK GH.P.QPCCCCC C-C CD L L GC GH.P+"PC55 C GH.P./PC F MC-C F MCL L GC GG! ! Embedded Systems C.CK ""9BI C5 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: Hardware/software dependencies Test environments Description of test phases and functionality tested each phase List of test cases to be executed Test success/failure criteria of the test phase Personnel 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 HyperTerminal window. 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 parity. 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.

Ask a homework question - tutors are online