Running the zeoslib test suite.
Posted: 04.09.2010, 21:34
This post is a followup on thread http://zeos.firmos.at/viewtopic.php?t=2604, where guidoaerts asks some more information on how he can run the zeoslib test suite. He wants to document this proces in a knowledge base article, but must be able to do it himself first.
There is some old documentation available on running tests in Delphi, but this documentation is a little dated and assumes you're using the Ant build automation software.
Basically this is the manual proces:
0. Download a full zeoslib source (eg. a bigger snapshot file from http://zeosdownloads.firmos.at or from svn) Official releases and compact snapshots do not contain the test suite.
1. Build and install zeoslib
2. Build the testsuite executables. They must be in the build dir within the package directory for your compiler. (or have the config file from step 3 in the same relative path)
3. Configure the <zeos_path>/databases/test.properties file (on this subject the old docs are still usefull)
4. Run the test suite executable(s)
Steps 2 and 4 depend on your compiler.
Delphi step 2:
1. Install the ztestframework package
2. Compile all ZTest* projects
3. Attention on changing zeoslib sources : you'll have to repeat all steps over and over.(zeoslib+testframework installations and then test builds)
Delphi step 4:
Run all test programs one by one from the build directory. It's possible to use a test suite GUI, but then you must set a zeos.inc directive before compiling.
Lazarus step 2:
Build the ZTestAll Project. There's only one exe containing all tests. (Although not all tests are compiled in yet) Reïnstalling zeoslib + framework shouldn't be ncessary on changing the zeoslib source. The test project uses the sources directly instead of using installed framework binaries. I did it like that as it facilitates fixing bugs enormously.
Lazrus step 4:
Run the test suite. Without parameters this should open the GUI interface (no switches needed in zeos.inc). Possible parameters are :
-b or --batch -> runs the test in command line mode.
-v or --verbose
--suite=<suitename> -> runs only a limited part of the test suite
also some other standard fpcunit options are available when using --batch, I think.
eg 'ztestall --batch -p --format=plain --suite=dbc' is used in fully automated build script.
Mark
There is some old documentation available on running tests in Delphi, but this documentation is a little dated and assumes you're using the Ant build automation software.
Basically this is the manual proces:
0. Download a full zeoslib source (eg. a bigger snapshot file from http://zeosdownloads.firmos.at or from svn) Official releases and compact snapshots do not contain the test suite.
1. Build and install zeoslib
2. Build the testsuite executables. They must be in the build dir within the package directory for your compiler. (or have the config file from step 3 in the same relative path)
3. Configure the <zeos_path>/databases/test.properties file (on this subject the old docs are still usefull)
4. Run the test suite executable(s)
Steps 2 and 4 depend on your compiler.
Delphi step 2:
1. Install the ztestframework package
2. Compile all ZTest* projects
3. Attention on changing zeoslib sources : you'll have to repeat all steps over and over.(zeoslib+testframework installations and then test builds)
Delphi step 4:
Run all test programs one by one from the build directory. It's possible to use a test suite GUI, but then you must set a zeos.inc directive before compiling.
Lazarus step 2:
Build the ZTestAll Project. There's only one exe containing all tests. (Although not all tests are compiled in yet) Reïnstalling zeoslib + framework shouldn't be ncessary on changing the zeoslib source. The test project uses the sources directly instead of using installed framework binaries. I did it like that as it facilitates fixing bugs enormously.
Lazrus step 4:
Run the test suite. Without parameters this should open the GUI interface (no switches needed in zeos.inc). Possible parameters are :
-b or --batch -> runs the test in command line mode.
-v or --verbose
--suite=<suitename> -> runs only a limited part of the test suite
also some other standard fpcunit options are available when using --batch, I think.
eg 'ztestall --batch -p --format=plain --suite=dbc' is used in fully automated build script.
Mark