Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Opened 16 years ago

Last modified 10 years ago

#311 closed task

Setting up CTest environment — at Version 2

Reported by: bknecht Owned by: nobody
Priority: major Milestone: Version 0.3 Codename: Castor
Component: Cmake Version:
Keywords: CMake, CTest, unit test Cc:
Referenced By: References:

Description (last modified by bknecht)

CTest

Since we use CMake as building system it is maybe a good idea to use CTest for unit testing. All large project have got unit tests to assure a code change has not broken any functionality in the existing code. While compiling with CMake CTest will test if all unit tests succeeded and report any broken functionality immediately. This is vital to have bug free code and no mess.

As the Orxonox code gets clearer and we introduce less hacks, testing proper functionality should be the next step.

Unfortunately writing unit test will take a lot of time and every developer will have to do this. Since it is used anyway by all larger projects, this seems to be worth doing despite the loss of time.

Task

This task is to set up the CTest environment (which includes the Dashboard of course) and to test it with some unit tests. Documentation on how to write unit tests and maybe even a small presentation for the developers about unit testing as this is a great-to-know thing (if not a must know) for a developer in the industry.

Start with the CTest documentation here.

Change History (2)

comment:1 Changed 16 years ago by bknecht

Some of you may remember, that Bensch once introduced unit testing and even wrote such a test. Unit testing hasn't been looked upon since, so I brought it up here with a ticket.

Note that this has nothing to do with the game, but rather if the maintainability of the code. Breaking a test is a very good warning, before a change might break the game.

comment:2 Changed 16 years ago by bknecht

  • Description modified (diff)
Note: See TracTickets for help on using tickets.