4

OK, so I have been trying to look at information on testing, different testing libraries what not and so forth.

It seems to me that people always clearly define the difference of these test as one being high level and one being low level. And that a properly tested out application would contain both style tests as well as integration test, etc. etc.

But it seems like every article about the test types ends with something like "in practice it could be hard to see what the difference actually is". I find it weird that people seem so preachy that you must have both test to even reach any sort of full code coverage and at the same time not have any good info/examples on what each might look like.

I am asking because I am starting a new project, that promises to be much bigger and more involved than anything i have done in the past. I would like to keep a good workflow with my test and make sure I am not creating gaps in my testing as I go (in the past projects have been small, and any gaps I might have had don't seem to cause any major issues in production that weren't simple t0 correct)

I know that it seems a good Acceptance Test, naturally leads you to your unit test and once you get it, it is this magical thing that happens and your development life because just that much more blissful.

Anyway, does anyone know of any good discussions on getting started on a good testing workflow, one that talks about moving between your acceptance/integration tests to you unit test and what not.

example for .net would be great, but since most testing frameworks cucumber(gherkin)/rspec etc. are all meant to be fairly readable any example should be good.

Jeff
  • 41
  • 1
  • 2

2 Answers2

3

"in practice it could be hard to see what the difference actually is":

I can only give general testing advice. Big software projects normally involve some kind of hierarchy.

  • In the developing phase developers do normally white box tests for small units (unit tests). Knowledge of internals can be used here to reduce the number of test cases (if two functions are orthogonal, you don't need to test all possible combinations). This is the lower end in the testing hierarchy.
  • In integration software components are put together and different persons (testers) test only the behaviour at the interfaces (black box testing). These persons don't have knowledge of internals, just the specs of the interfaces.
  • System integration combines even bigger systems.
  • and so on.

In order for testing to be effective, each level relies on fully pretested components tested in a lower level. Otherwise a higher testing level would have to include basic functionality of its components, but can only use black box testing (which has to assume the worst case, that is dependencies between features to test). So the number of test cases is increasing exponentially, making testing with full coverage impossible.

The hierarchical approach optimizes test efforts here.

hexcoder
  • 1,218
  • 8
  • 13
  • I think I might really be over thinking it. "in practice it could be hard to see what the difference actually is". They are saying this because it isn't really what the test itself looks like. It is really what is "under the test" a whole feature. Or a part that makes that feature happen. I was just getting to wrapped up with he people that were saying things like cucumber is great for acceptance tests, ans rspec for unit test. And cucumber is really just a layer on top rspec. – Jeff Jul 14 '11 at 17:22
  • So i got wrapped up why is a test that looks like this more of an acceptance test over what you would just do in rspec. I was just being stupid about it. – Jeff Jul 14 '11 at 17:23
3

Refer to the video on different types of testing. Different types of test techniques are compared with a table.

Sandeep
  • 648
  • 5
  • 12