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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Hanging your tests on a framework<br />

But aren’t there testing frameworks<br />

out there to do this for us? Why are<br />

we writing all this code ourselves?<br />

testing and continuous integration<br />

Coming up with tests is YOUR job.<br />

There are lots <strong>of</strong> good frameworks out there, but they run your tests; they<br />

don’t write them for you.* A testing frameworks is really just a collection<br />

<strong>of</strong> tools that help you express your tests. Even though that makes them<br />

really useful, there are a few things you still need to keep in mind:<br />

First, you still need to figure out what you have to test. Figuring<br />

out what to test and how you express that test are usually two different<br />

things. Regardless <strong>of</strong> your framework, you need to think about functional<br />

testing, performance testing, boundary or edge cases, race conditions,<br />

security risks, valid data, invalid data, etc.<br />

Next, your choice <strong>of</strong> testing frameworks is almost certainly<br />

going to impact how you test. That’s not always a bad thing, but don’t<br />

forget about it. This might mean you need more than one way to test your<br />

s<strong>of</strong>tware. For example, if you decide to use a code-level testing framework<br />

for your desktop application, you’re still leaving yourself open for bugs in<br />

your GUI, so you’ll probably want something to test that, too. Another<br />

great example: say you’re writing a 3-D game. Testing the backend code<br />

isn’t too hard, but making sure that the game renders correctly and people<br />

can’t walk through walls or fall through small cracks in your world...well,<br />

that’s a mess, and no framework can generate those tests for you.<br />

* Actually, some frameworks can generate tests for you, but they<br />

have very specific goals in mind. Security frameworks are a common<br />

example: the framework can throw tons <strong>of</strong> common security errors<br />

at your s<strong>of</strong>tware and see what happens. But this doesn’t replace real<br />

application testing to make sure the system does what you think it<br />

does (and what the customer actually wants it to do).<br />

We’re talking about frameworks, but what does that really mean? The obvious way to<br />

test is to have someone use your application. But, if we can automate our tests we<br />

can get paid while the computer tests our stuff be more effective and know that our<br />

tests are run exactly the same way each time. That’s important, because consistency in<br />

how a test is run isn’t something humans are very good at.<br />

Download at WoweBook.Com<br />

you are here 4 247

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

Saved successfully!

Ooh no, something went wrong!