I have an initialization code to use my API. Initialization may fail, and I would like to test it in the NUnit test.
After initialization, an API can be used. I am also testing the API, but all my testing methods will use the same generic initialization code.
Ideally, I would like this behavior:
- An initialization check is in progress.
- Other tests are performed if [1] succeeds.
In all cases when [1] will not work, all other tests will be performed. But valuable information is that [1] fails. This is where I will most likely find the problem. Would it be nice if other tests could be noted? or something that indicates that they were not running, because the functionality on which they depend did not pass the tests.
I know that tests should not be fragile. But I can not get around the fact that the initialization code is necessary for the correct execution of other functions.
This is a more general problem when some functions depend on other functions. In cases where "other functions" are too widely used to provide any real value, if you do not perform all the tests depending on it. It would be better if the "other functions" were tested separately.