changeset 1055 754e0a7bdd44
child 1056 f9449f7beddc
equal deleted inserted replaced
1054:0de5837d0fc5 1055:754e0a7bdd44
     1 #summary How the engine is tested automatically
     3 = Engine tests cases =
     4 Hedgewars developers have made some automated tests to test certain
     5 features of the engine automatically to ensure a certain level of
     6 quality and to prevent old fixed bug from popping up again.
     8 Currently, all automated Lua tests are done with Lua scripting.
    10 == Running test cases ==
    11 There are two ways to run a test: Automated and manual.
    13 === Automated testing ===
    14 This requires you to have CMAke.
    16 Run `ctest` in the root directory of the repository to run all tests.
    17 Run `ctest -R <test name>` to run only the test with the given name.
    19 Note that automated tests will run much faster than in real game time.
    20 You won't see any actual game action, however.
    22 === Manual testing ===
    23 Each test can also be run manually in which you run the tests in
    24 real time and you can see what's going on.
    26 Copy the corresponding Lua file from `tests/lua` to `Data/Missions/Training`
    27 and open Hedgewars and start the test from the training menu.
    29 == Creating test cases ==
    30 You can find the test cases in the repository under `tests/lua`.
    32 These scripts are treated like ordinary scripts in Hedgewars (like
    33 misions or multiplayer scripts) but there's one important difference:
    34 You must call `EndLuaTest` when the test result (success or failure)
    35 has be determined (see [[LuaAPI]]).