Building the test and running it in the emulator

As the final step for setting up the test project, build the test and run it in the emulator:

  1. Open the command prompt and change the directory to C:\temp\MapEx\test.

  2. Create build files with the command bldmake bldfiles.

  3. Create makefiles with the command abld makefile.

    This is an essential part of the process because it executes ExtraTestBuildTasks.bldmake, which generates framework code for the tests.

  4. Compile tests for the emulator with the command abld build winscw udeb.

  5. Start the emulator.

    The SymbianOSUnit application, which is used to run the tests, appears in the menu.

  6. Select Run All Suites from the menu and find out how the tests are executed (see the figure below).

Figure 14: Running unit tests with SymbianOSUnit

In the example above, all tests were run without errors. This was expected, because the test cases were empty implementations.