Sen:te


OCUnit Testing from ProjectBuilder



Testing from ProjectBuilder on Mac OS X

The SenTestingKit has not yet achieved with ProjectBuilder on Mac OS X the level of integration it has before on OPENSTEP and WebObjects. However, you can still run tests from ProjectBuilder in two different ways detailed below: after each build or when running your application.

After each build:

You can do this by following the next step:

When building the active target using the build style with this new environment variable, tests run after the build, and results are logged in the build console.

When running your application:

You can do this by configuring the Executables tab of your target:

For executable targets such as applications, add a -SenTest launch argument (-SenTest All will run all your executable tests, including those of linked frameworks, -SenTest Self will run only your executable's tests, -SenTest None will not run any test).

If your project has no executable (for instance a framework), use otest as the executable, and specify the path of the unit to be tested. For instance: -SenTest Self ~/Developer/Builds/SenRandomTest.framework.

Tests results will appear in the Run or Debug console.

Which method should I use?

Both methods can be used in alternance, as the first is useful to code, build and test in short cycle, while the second can be useful when debugging a failed test.

More information

http://www.sente.ch/software/ocunit/
feedback@sente.ch

©Copyright 1994-2001, Sen:te (Sente, SA). All rights reserved.