Exercise 11 ( Chapter 17 )


Exercise 11 (Chapter 17)

Q1:

Write an executable test for this story, and include the class and method declarations as illustrated in this chapter. Include at least one test case in each method, but don't worry about completeness. The point is the organization, not the details.

A1:

The class name is IterationStoryTest, and it has two methods: testDisplay() and testUpdate():

 public class IterationStoryTest {     public void testDisplay() {      login("bob","bobspassword")      assertTrue( displayIteration( "1") );      assertFalse( displayIteration( "-1") );    }    public void testUpdate() {      login("bob","bobspassword");      assertTrue( UpdateIteration( "10",                                   "20041201",                                   "20041215") );      assertFalse( UpdateIteration( "non-numeric",                                    "bad date",                                    "bad date" ) );      } } 
Q2:

Pretend your customer can't stand the executable format. Create or mock up a spreadsheet for him that corresponds to the executable test in question 1.

A1:

The spreadsheet would be IterationTestStory.xls, and it would have two workbooks:

testDisplay

Outcome

Iteration

success

1

fail

-1

testUpdate

Outcome

Estimated Velocity

Start Date

End Date

success

10

20021201

20021215

fail

non-numeric

bad date

bad date



Testing Extreme Programming
Testing Extreme Programming
ISBN: 0321113551
EAN: 2147483647
Year: 2005
Pages: 238

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net