Section 8.5. Ranges of Values


8.5. Ranges of Values

There are a few small differences in the Fit fixtures in FitNesse. For example, ColumnFixture tables in FitNesse can check number ranges.

Sometimes, we want to check that a number is less than some specified value rather than that it is a specific value. For example, Figure 8.5 tests that stress tests involving various numbers of clients react within a specified maximum time.

Figure 8.5. Checking Within Maximum

StressTest

clients

max reaction time

within time()

1

10

true

10

10

true

100

30

true

500

60

true


ColumnFixture provides a way to write this more directly, as shown in Figure 8.6. Instead of a number in the calculated column, we have a check that the result from the system under test with one client is less than 10 (<10).

Figure 8.6. Checking Within Maximum with <

StressTest

clients

reaction time()

1

<10

10

<10

100

<30

500

<60


We can also compare <=10, >10 and >=10 and check that a calculated number is within a given range. For example, 3 < - < 10 expects that the result in that cell, designated as -, is greater than 3 and less than 10.



    Fit for Developing Software. Framework for Integrated Tests
    Fit for Developing Software: Framework for Integrated Tests
    ISBN: 0321269349
    EAN: 2147483647
    Year: 2005
    Pages: 331

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