How to do integrated testing?

Posted by Enthusiastic Programmer on Programmers See other posts from Programmers or by Enthusiastic Programmer
Published on 2012-04-03T11:08:44Z Indexed on 2012/04/03 11:40 UTC
Read the original article Hit count: 176

Filed under:

So I have been reading up on a lot of books surrounding testing. But all the books I've read have the same flaws. They will all tell you the definitions of testing. But I have not found a single book that will guide you into integration testing (or pretty much anything higher then unit testing). Is integration testing that elusive or am I reading the wrong books?

I'm a hands on person, so I would appreciate it if someone could help me with a simple program:

Let's say you need to make some sort of calculation program that calculates something (doesn't matter what) and exports it to *.txt file. Let's assume we use the Model View Controller design principle. And one class for the actual calculating which you'll use in the model and one for writing the textfile. So:

View => Controller => Model => CalculationClass, FileClass

So for unittesting: You'd test the calculationClass, I'd personally focus most of my unit tests there. And less time on unit testing the view/controller/FileClass. I personally wouldn't see the use of unittesting those unless you want a really robust program.

Integration testing: Now this is where I run into a wall. What would I have to test to call it an integration test? I could stub the view and feed the controller data which it would pass on to the model and so forth. And then check what the view gets back in the end. But ... Couldn't I just run the (in this case small) program then and test it manually? Would this be considered a integration test too, or does it have to be automated? Also, can I check multiple items to see if they are correct?

I cannot seem to find any book that offers a hands on approach to methods of integration testing.

© Programmers or respective owner

Related posts about integration-tests