integration testing - Tests dependent on commonly used functionality with NUnit -


I have some initialization code to use my API initialization can fail and I can test it in a NUnit test Want to do

The API can be used after the initialization. I am also testing the API, but all my testing methods will use the same, normal, initial code.

What is this behavior:

  1. The initial test is run.
  2. [1] succeeded if other tests are conducted.

In all cases where [1] will fail, so all other tests. But the valuable information is that [1] fails. This is the place where I will most likely get the problem. Would it be good if other tests can be marked with? Or some, this indicates that they did not execute as functionality, on which they depend, do not pass the tests.

I know that the test should not be brittle. But I can not go around the fact that the initialization code is essential for the proper execution of other functionality.

This is a more common problem where some functionality relies on other functionality where "other methodology" is used to provide any real value by failing all the tests, it It would be better if "other functionality" would be tested separately.

OK how I will go here ...

All tests Keeping the usual initialization in the setup method since it is necessary if you throw an initial error, you will see that

  • All tests in a suite are failing (which gives me a hint Has been trained on time to recognize that perhaps Setup / TeDown has made an exception).
  • Staxtrace for unsuccessful tests with the setup method.

If it is very unaffected for you, you (although I would not recommend it) empty test with a good name in the same room if this examination appeared green in color , You can ensure that setup / normal init code is successful. Update: Like you think you have a very niche requirement. I do not know of any mechanism in NUIT for specifying this conditional execution of test - e.g. If Test 1 passes, then run Test 2 for only 10.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -