Browsed by
Tag: nunit

Testing the same behaviour every time

Testing the same behaviour every time

Tests give us an assurance which application works fine. We usually want to execute them on some Continuous Integration servers. It is very convenient because we can configure them to run after each repository commit or once a day.

Continuous integration flow usually works as follows. The application is built on CI server and then it executes all tests. Because all tests run on the same database, it is hard to make all them all independent. However, test independence is a very important principle. The result of one test may affect the correctness of another test. It is especially problematic if we want to run tests in parallel. We can’t be sure what will be the order of execution. It is not only the problem of the database. The browser can also store a state of the application.

NUnit – generic classes tests

NUnit – generic classes tests

Some times ago I faced a task to write tests for generic classes. In the simplest approach it is quite easy task. If we want to test this class using for example NUnit library we can simply write a few test cases.

%d bloggers like this: