01.02.2013 Views

Software Development Cross Solution - Index of - Free

Software Development Cross Solution - Index of - Free

Software Development Cross Solution - Index of - Free

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

white box testing<br />

was Below is a user story from BeatBox Pro. Your job was to write up three ideas for black or grey<br />

box tests, and descriptions <strong>of</strong> what you’d do to implement those tests.<br />

This is a black-box test. Also<br />

notice that we needed some<br />

JPEG resources to support<br />

the test. That’s OK; using<br />

sample input is fine. You should<br />

version-control those resources,<br />

though, for later reuse.<br />

These tests are a little<br />

more on the grey side. You<br />

need to know how BeatBox<br />

Pro should handle these<br />

conditions, and where<br />

exceptions would be sent if<br />

an error occurred.<br />

242 Chapter 7<br />

* Here are the three tests we came<br />

up with. It’s okay if you have three<br />

different ones... you’ll just have more<br />

ideas for actual tests.<br />

1. Test for... sending a small JPEG to another user.<br />

Get two instances <strong>of</strong> BeatBox Pro running. On the first instance,<br />

click the Send Picture button. When the image selection dialog pops<br />

up, select SmallImage.jpg and click OK.<br />

Then check and make sure that the second BeatBox displays a<br />

Receive Image dialog box. Click OK to accept the image. Check that<br />

the image displays correctly.<br />

2. Test for... sending an invalid JPEG to another user.<br />

Get two instances <strong>of</strong> BeatBox Pro running. On the first instance,<br />

click the Send Picture button. When the image selection dialog pops<br />

up, select InvalidImage.jpg and click OK.<br />

Check that BeatBox shows a dialog telling you that the image is<br />

invalid and can’t be sent. Confirm that the second BeatBox did<br />

not display a Receive Image dialog. Also make sure no exceptions<br />

were thrown from either instance.<br />

3. Test for... losing connectivity while transferring an image.<br />

Start two instances <strong>of</strong> BeatBox Pro. On the first instance, click the<br />

Send Picture button. When the image selection dialog pops up, select<br />

GiantImage.jpg and click OK.<br />

Check that the second BeatBox shows a Receive Image dialog box and<br />

click OK. While this image is transferring (make the image several MB<br />

so it will take a while), kill the second BeatBox instance. Check that<br />

the first BeatBox displays a dialog saying the transfer failed and<br />

that no exceptions were thrown.<br />

Download at WoweBook.Com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!