![Page 1: E MBEDDED S YSTEMS S OFTWARE T RAINING C ENTER T EST D ESIGN T ECHNIQUES C OPYRIGHT © 2012 DSR C ORPORATION](https://reader036.vdocuments.net/reader036/viewer/2022062417/5517e295550346cb568b459a/html5/thumbnails/1.jpg)
EMBEDDED SYSTEMS SOFTWARE TRAINING CENTER
TEST DESIGN TECHNIQUES
COPYRIGHT © 2012 DSR CORPORATION
![Page 2: E MBEDDED S YSTEMS S OFTWARE T RAINING C ENTER T EST D ESIGN T ECHNIQUES C OPYRIGHT © 2012 DSR C ORPORATION](https://reader036.vdocuments.net/reader036/viewer/2022062417/5517e295550346cb568b459a/html5/thumbnails/2.jpg)
Objectives
Understand which test design techniques exist and how to choose the correct ones
COPYRIGHT © 2012 DSR CORPORATION 2
![Page 3: E MBEDDED S YSTEMS S OFTWARE T RAINING C ENTER T EST D ESIGN T ECHNIQUES C OPYRIGHT © 2012 DSR C ORPORATION](https://reader036.vdocuments.net/reader036/viewer/2022062417/5517e295550346cb568b459a/html5/thumbnails/3.jpg)
Class Materials
Software Engineering Introduction diagrams are available here:
http://estc.dsr-company.com
Hands-on Exercises are available here:
COPYRIGHT © 2012 DSR CORPORATION 3
![Page 4: E MBEDDED S YSTEMS S OFTWARE T RAINING C ENTER T EST D ESIGN T ECHNIQUES C OPYRIGHT © 2012 DSR C ORPORATION](https://reader036.vdocuments.net/reader036/viewer/2022062417/5517e295550346cb568b459a/html5/thumbnails/4.jpg)
Agenda
1. Categories of Test Design Techniques
2. Specification-Based Techniques
3. Test Coverage
4. Structure-Based Techniques
5. Experience-Based Techniques
6. Usage of Test Design Techniques
COPYRIGHT © 2012 DSR CORPORATION 4
![Page 5: E MBEDDED S YSTEMS S OFTWARE T RAINING C ENTER T EST D ESIGN T ECHNIQUES C OPYRIGHT © 2012 DSR C ORPORATION](https://reader036.vdocuments.net/reader036/viewer/2022062417/5517e295550346cb568b459a/html5/thumbnails/5.jpg)
EMBEDDED SYSTEMS SOFTWARE TRAINING CENTER
CATEGORIES OF TEST DESIGN TECHNIQUES
COPYRIGHT © 2012 DSR CORPORATIONS
![Page 6: E MBEDDED S YSTEMS S OFTWARE T RAINING C ENTER T EST D ESIGN T ECHNIQUES C OPYRIGHT © 2012 DSR C ORPORATION](https://reader036.vdocuments.net/reader036/viewer/2022062417/5517e295550346cb568b459a/html5/thumbnails/6.jpg)
Test Design Techniques Classification
COPYRIGHT © 2012 DSR CORPORATION
Foundations of Software Testing. ISTQB Certification. Dorothy Graham, Erik Van Veenendaal
6
![Page 7: E MBEDDED S YSTEMS S OFTWARE T RAINING C ENTER T EST D ESIGN T ECHNIQUES C OPYRIGHT © 2012 DSR C ORPORATION](https://reader036.vdocuments.net/reader036/viewer/2022062417/5517e295550346cb568b459a/html5/thumbnails/7.jpg)
Test Cases Designing with Decision Tables
COPYRIGHT © 2012 DSR CORPORATION
Foundations of Software Testing. ISTQB Certification. Dorothy Graham, Erik Van Veenendaal
Loan Calculation Example:
The final step of this technique is to write test cases to exercise each of the four rules in the table.
Test cases may be enhanced with EP and BVA approaches.
7
![Page 8: E MBEDDED S YSTEMS S OFTWARE T RAINING C ENTER T EST D ESIGN T ECHNIQUES C OPYRIGHT © 2012 DSR C ORPORATION](https://reader036.vdocuments.net/reader036/viewer/2022062417/5517e295550346cb568b459a/html5/thumbnails/8.jpg)
State Transition Testing with State Diagram
COPYRIGHT © 2012 DSR CORPORATION
Foundations of Software Testing. ISTQB Certification. Dorothy Graham, Erik Van Veenendaal
TC1. Normal Case: the correct PIN is entered the first time.
TC2. Error case enters an incorrect PIN each time so that the system eats the card.
TC3. PIN was incorrect the first time but OK the second time.
TC4. PIN was correct on the third try.
8
![Page 9: E MBEDDED S YSTEMS S OFTWARE T RAINING C ENTER T EST D ESIGN T ECHNIQUES C OPYRIGHT © 2012 DSR C ORPORATION](https://reader036.vdocuments.net/reader036/viewer/2022062417/5517e295550346cb568b459a/html5/thumbnails/9.jpg)
Testing for Invalid Transitions: State Matrix
COPYRIGHT © 2012 DSR CORPORATION
Foundations of Software Testing. ISTQB Ceritfication. Dorothy Graham, Erik Van Veenendaal
9
![Page 10: E MBEDDED S YSTEMS S OFTWARE T RAINING C ENTER T EST D ESIGN T ECHNIQUES C OPYRIGHT © 2012 DSR C ORPORATION](https://reader036.vdocuments.net/reader036/viewer/2022062417/5517e295550346cb568b459a/html5/thumbnails/10.jpg)
Use Case Example
COPYRIGHT © 2012 DSR CORPORATION
Foundations of Software Testing. ISTQB Certification. Dorothy Graham, Erik Van Veenendaal
10
![Page 11: E MBEDDED S YSTEMS S OFTWARE T RAINING C ENTER T EST D ESIGN T ECHNIQUES C OPYRIGHT © 2012 DSR C ORPORATION](https://reader036.vdocuments.net/reader036/viewer/2022062417/5517e295550346cb568b459a/html5/thumbnails/11.jpg)
Summary
The test design techniques are determined by their primary sources and are used to find different defects, so a composition of them must be used to achieve good product quality.
Specification-based test design techniques are good to use when there is good specification. Equivalence partitioning, boundary analysis, decision tables, and state transition techniques are the most useful.
Code-based test design techniques involve code analysis and various code coverage criteria. It allows finding many anomalies in the code. The decision/condition code coverage criterion is the most useful.
Experience-based techniques are complementary to code-based and specification-based techniques and are applicable for low-risk systems in conditions that lack requirements and are time pressured.
COPYRIGHT © 2012 DSR CORPORATION 11
![Page 12: E MBEDDED S YSTEMS S OFTWARE T RAINING C ENTER T EST D ESIGN T ECHNIQUES C OPYRIGHT © 2012 DSR C ORPORATION](https://reader036.vdocuments.net/reader036/viewer/2022062417/5517e295550346cb568b459a/html5/thumbnails/12.jpg)
Questions
1. Classify the Test Design Techniques. What is the most useful to make testing most effective?
2. What is a key characteristic of specification-based testing techniques?
3. What is a key characteristic of structure-based testing techniques?
4. What code coverage metrics do you know? What are they used for? What are the strong and week sides of every metric?
COPYRIGHT © 2012 DSR CORPORATION 12
![Page 13: E MBEDDED S YSTEMS S OFTWARE T RAINING C ENTER T EST D ESIGN T ECHNIQUES C OPYRIGHT © 2012 DSR C ORPORATION](https://reader036.vdocuments.net/reader036/viewer/2022062417/5517e295550346cb568b459a/html5/thumbnails/13.jpg)
Task 1
COPYRIGHT © 2012 DSR CORPORATION 13
Postal rates for 'light letters' are 25p up to l0g, 35p up to 50g plus an extra l0p for each additional 25g up to l00g.
Suggest the test design techniques for this functionality. Describe the test design in any form.
Foundations of Software Testing. ISTQB Certification. Dorothy Graham, Erik Van Veenendaal
![Page 14: E MBEDDED S YSTEMS S OFTWARE T RAINING C ENTER T EST D ESIGN T ECHNIQUES C OPYRIGHT © 2012 DSR C ORPORATION](https://reader036.vdocuments.net/reader036/viewer/2022062417/5517e295550346cb568b459a/html5/thumbnails/14.jpg)
Task 2
COPYRIGHT © 2012 DSR CORPORATION 14
If you are flying with an economy ticket, there is a possibility that you may get upgraded to business class, especially if you hold a gold card in the airline's frequent flier program. If you don't hold a gold card, there is a possibility that you will get bumped off the flight if it is full and you check in late. This is shown on the activity diagram below.
Suggest a test technique to test the program that implements this functionality. Describe the test design using this technique.
Foundations of Software Testing. ISTQB Certification. Dorothy Graham, Erik Van Veenendaal
![Page 15: E MBEDDED S YSTEMS S OFTWARE T RAINING C ENTER T EST D ESIGN T ECHNIQUES C OPYRIGHT © 2012 DSR C ORPORATION](https://reader036.vdocuments.net/reader036/viewer/2022062417/5517e295550346cb568b459a/html5/thumbnails/15.jpg)
Task 3
COPYRIGHT © 2012 DSR CORPORATION 15
Analyze the diagram below.
Suggest a test technique to test the program that implements this functionality. Describe the test design using this technique. What coverage value have you achieved?
Foundations of Software Testing. ISTQB Certification. Dorothy Graham, Erik Van Veenendaal
![Page 16: E MBEDDED S YSTEMS S OFTWARE T RAINING C ENTER T EST D ESIGN T ECHNIQUES C OPYRIGHT © 2012 DSR C ORPORATION](https://reader036.vdocuments.net/reader036/viewer/2022062417/5517e295550346cb568b459a/html5/thumbnails/16.jpg)
Task 4
COPYRIGHT © 2012 DSR CORPORATION 16
Analyze the part of software code below.
Define the test cases that allow you to achieve 100% coverage for the following criteria:
Statement coverage
Decision coverage
Condition coverage
if ((x>0) && ((y>0)|| (z>0))) statement1; else statement2;
![Page 17: E MBEDDED S YSTEMS S OFTWARE T RAINING C ENTER T EST D ESIGN T ECHNIQUES C OPYRIGHT © 2012 DSR C ORPORATION](https://reader036.vdocuments.net/reader036/viewer/2022062417/5517e295550346cb568b459a/html5/thumbnails/17.jpg)
References
1. Foundations of Software Testing. ISTQB Certification. Dorothy Graham, Erik Van Veenendaal, Isabel Evans, Rex Black
2. SWEBOK. Guide to the Software Engineering. Body of Knowledge. 2004 Version / A project of the IEEE Computer Society Professional Practices Committee
3. IEEE Std 610.12-1990, IEEE Standard Glossary of Software Engineering Terminology
4. Code Coverage Analysis. By Steve Cornett. Copyright © Bullseye Testing Technology 1996-2011 http://www.bullseye.com/coverage.html
5. DO-178B, Software Considerations in Airborne Systems and Equipment Certification, RCTA, December 1992, pp.31, 74.
6. http://www.softwaretestinggenius.com
7. gcov—a Test Coverage Program. http://gcc.gnu.org/onlinedocs/gcc/Gcov.html
8. LCOV - the LTP GCOV extension. http://ltp.sourceforge.net/coverage/lcov.php
COPYRIGHT © 2012 DSR CORPORATION 17