In your GitLab account, you should have access to a new repository t04-student<your-id> where is code of another team. Your task is to write unit tests and CI setup for the public API of that team. Note that this task is done individually (hence you will receive two sets of unit tests for your API).

Unit tests

The purpose of this task is to practise writing unit tests against a public API without knowing the implementation (i.e. blackbox style testing). Your tests should cover all the functionality provided by the library — look again at the API requirements from task 1, check whether the library provides some extra functionality and write the tests.

Use a well-known unit testing framework for your work that nicely integrates with the language . Use the requirements from the first task to define the expected behaviour in the tests. When the behaviour is not clearly defined, check whether the API defines it (either by its usage or by documentation) and write tests according to that. When still in doubt, define the behaviour with the tests. Do not forget to test failures too (e.g. test expects exception will be thrown).

Because there is no implementation, your tests will obviously fail. That might be discouraging but one could argue that is how TDD should work :-).

We intentionally do not provide any metrics on how many tests you should provide. Use common sense to provide a reasonable set of tests that would help your colleagues when writing the implementation.

CI in GitLab

Your second task is to setup simple CI for the project. Simply stated, configure the project so that unit tests are executed automatically on each commit (push) to GitLab.

If you have never configured CI in GitLab, here is a reference manual and here are some examples for unit testing.