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.

lack box testing<br />

There are three ways to look at your system...<br />

Good testing is essential on any s<strong>of</strong>tware project. If your s<strong>of</strong>tware doesn’t work,<br />

it won’t get used—and there’s a good chance you won’t get paid. So before<br />

getting into the nitty-gritty <strong>of</strong> s<strong>of</strong>tware testing, it’s important to step back<br />

and remember that different people look at your system from totally different<br />

perspectives, or views.<br />

238 Chapter 7<br />

Your users see the system from the outside<br />

Your users don’t see your code, they don’t look at the database<br />

tables, they don’t evaluate your algorithms...and generally they<br />

don’t want to. Your system is a black box to them; it either<br />

does what they asked it to do, or it doesn’t. Your users are all<br />

about functionality.<br />

Testers peek under the covers a little<br />

Testers are a different breed. They’re looking for<br />

functionality, but they’re usually poking underneath to<br />

make sure things are really happening the way you said<br />

they would. Your system is more <strong>of</strong> a grey box to them.<br />

Testers are probably looking at the data in your database to<br />

make sure things are being cleaned up correctly; they might<br />

be checking that ports are closed, network connections<br />

dropped, and that memory usage is staying steady.<br />

Developers let it all hang out<br />

Developers are in the weeds. They see good (and sometimes<br />

bad) class design, patterns, duplicated code, inconsistencies<br />

in how things are represented. The system is wide open to<br />

them. If users see a system as a closed black box, developers<br />

see it as an open white box. But sometimes because<br />

developers see so much detail, it’s possible for them to miss<br />

broken functionality or make an assumption that a tester or<br />

end user might not.<br />

...and you need to consider each <strong>of</strong> these views<br />

Each view <strong>of</strong> your system is valid, and you have to test from<br />

each <strong>of</strong> those three perspectives.<br />

Download at WoweBook.Com<br />

For more on these<br />

different types <strong>of</strong> testing,<br />

see Appendix i.<br />

TestGoodDBAccessor<br />

+ getGC(gcId : int) :GiftCard<br />

+ saveGC(card : GiftCard) :void<br />

Order<br />

<br />

DBAccessor<br />

+ getGC(gcId : int) :GiftCard<br />

+ saveGC(card : GiftCard) :void<br />

TestInsufficientDBAccessor<br />

+ getGC(gcId : int) :GiftCard<br />

+ saveGC(card : GiftCard) :void<br />

DB<br />

TestInvalidDBAccessor<br />

+ getGC(gcId : int) :GiftCard<br />

+ saveGC(card : GiftCard) :void<br />

check balances, etc.<br />

saveOrder(...) insert into ...<br />

saveGC(...)<br />

update amnt ...<br />

MySqlDBAccessor<br />

+ getGC(gcId : int) :GiftCard<br />

+ saveGC(card : GiftCard) :void

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

Saved successfully!

Ooh no, something went wrong!