|
|
FHTW Berlin
Fachbereich 4
Internationaler Studiengang
Internationale Medieninformatik (Bachelor)
SE: Software Engineering
Summer Term 2008
|
Exercise 7 : Testing
The semester is almost over, this is the last regular exercise! We will be looking at software testing methods today. As we discussed in the lecture, there are different kinds of test that can be made, black-box, white-box and grey-box testing.
- Getting started: Give the equivalence classes for testing a method that determines the absolute value of an integer using the black-box methodology. Don't peek at the code yet! Now check out this code and give the equivalence classes for a white-box test. Develop one test case for each equivalence class.
- Black-box test: Look at the grading scale for this course. Give the equivalence classes for a program that loops until a -1 is entered, asking for the number of points on this scale, prints the appropriate letter grade, and then prints the average number of points when -1 has been entered. Develop one test case for each equivalence class. Test your test cases with this class. No fair decompiling the class! Report on the results. Did you find any errors?
- White-box test / path coverage : Examine the code for TaxTime. Draw a code graph of the main class! How many independant paths are there? What are the conditions that cause each of the paths to be taken? Draw up a table giving you an overview of the conditions. Give test cases that exercise each path. Are there any errors in the program (besides the size of the tax bite)?
- Extra points: The bored can read all about JUnit and set up a framework for testing TaxTime with JUnit. Report on what you did. Multiple points will be given for excellent reporting.
Copyright 2006, 2007, 2008.
Prof. Dr. Debora Weber-Wulff All rights reserved.
Questions or comments:
<weberwu@fhtw-berlin.de>