Exercise 12 ( Chapter 18 )


Exercise 12 (Chapter 18)

Q1:

Identify the assumptions about the initial system state in the following tests for XTrack story 4:

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

The display test assumes iteration 1 has been defined and iteration 2 has not. The update test also assumes iteration 1 has been defined.

Q2:

Are these tests rerunnable without resetting the system?

A1:

Yes, because executing the tests has no effect on the truth of the assumptions.



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