Chapter 5


1:

True or False: You can perform dynamic black-box testing without a product specification or requirements document.

A1:

True. The technique is called exploratory testing, and you essentially use the software as though it's the product spec. It's not an ideal process, but can work okay in a pinch. The largest risk is that you won't know if a feature is missing.

2:

If you're testing a program's ability to print to a printer, what generic test-to-fail test cases might be appropriate?

A2:

You could attempt to print with no paper and with jammed paper. You could take the printer offline. You could unplug its power. You could disconnect its cable. You could try printing with low ink or toner, maybe even with a missing cartridge. To identify all the possibilities, you could look in the printer's operator's manual and see what errors it supports and attempt to create all of them.

3:

Start up Windows WordPad and select Print from the File menu. You'll get the dialog shown in Figure 5.12. What boundary conditions exist for the Print Range feature shown in the lower-left corner?

Figure 5.12. The Windows Print dialog box showing the Print Range feature.


A3:

If you select the Pages option, the From and To fields are enabled. The obvious boundary conditions would be 0 and 99999, the smallest and largest values that the fields will hold. It would be wise to also test internal boundary conditions such as 254, 255, 256 and 1023, 1024, and 1025. There's also another internal boundary condition. Try asking it to print pages 1 though 8 of a 6-page document. Notice that in this case, the software has to stop printing at page 6 because it's out of data, not because it was told to stop at this page. It's a different, internal boundary. See if you can think of more.

4:

Assume that you have a 10-character-wide ZIP code text box, such as the one shown in Figure 5.13. What equivalence partitions would you create for this text box?

Figure 5.13. A sample ZIP code text box that holds up to 10 characters.


A4:

You should have at least these four equivalence partitions, although you may think of more:

  • Valid 5-digit ZIP codes. Valid means that they're numeric digits, not that they are existing, in-use ZIP codesalthough that could be another partition.

  • Valid 9-digit (9 digits with a dash) ZIP codes.

  • Short 5-digit. Have only 4 numbers, for example.

  • Short 9-digit. Have only 8 numbers, for example.

  • Long 5-digit. Have 8 digits without a dash, for example. Hmm, is this the same as a short 9-digit partition?

  • Long 9-digit. It may not be possible to type in more than 9 digits and a dash, but you should try.

  • 10 digits, no dash. This is a little different than a long 9-digit partition.

  • The dash in the wrong place.

  • More than one dash.

  • Non-digit and non-dash entries.

5:

True or False: Visiting all the states that a program has assures that you've also traversed all the transitions among them.

A5:

False. Think of visiting 50 different cities spread out across the entire United States You could plan a trip that would take you to each city, but it would be impossible for you to travel all the roads that connect to all the citiesthat would be all the roads in the entire country.

6:

There are many different ways to draw state transition diagrams, but there are three things that they all show. What are they?

A6:
  • Each unique state that the software can be in.

  • The input or conditions that make it move from one state to the next.

  • Conditions, variables, or output that's produced when a state is entered or exited.

7:

What are some of the initial state variables for the Windows Calculator?

A7:

The initial displayed value and the internal partial result are set to 0. The memory register (MC, MR, MS, and M+ buttons) is set to 0. The Clipboard contents (where data goes when you cut, copy, and paste) is left unchanged.

Another initial state variable is where the Calculator appears onscreen when it's started. Open up several copies of the Calculator and notice that the location isn't always the same (at least on Windows 95/98). As an exercise in exploratory testing, see if you can figure out what the rules are for where the Calculator opens.

8:

What actions do you perform on software when attempting to expose race condition bugs?

A8:

You try doing multiple things at the same time. They could be related, like printing to two printers at the same time from the same application. Or, they could be unrelated, like pressing keys while a computation is taking place. What you want to do is force a situation where the software is competing (racing) with itself to perform some function.

9:

True or False: It's an unfair test to perform stress testing at the same time you perform load testing.

A9:

False. No test is ever unfair. Your job is to find bugs. But, the realities of software testing may apply and any bugs you find in this situation may not be fixed.



    Software Testing
    Lessons Learned in Software Testing
    ISBN: 0471081124
    EAN: 2147483647
    Year: 2005
    Pages: 233

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