Advanced Topics
Auto-loading Test Cases
It's possible to start ProUnit from Progress Editor having
some test cases already loaded. This is very useful on development
time when you want to run a specific test. The auto-load is made
through a global variable called cInitTestCases,
as in the example bellow.
/*****
** Defines the global variable to set the test cases that should be loaded.
*/
DEFINE NEW GLOBAL SHARED VARIABLE cInitTestCases AS CHARACTER NO-UNDO.
ASSIGN
cInitTestCases = "sample.p,tst_BaseConverter.p".
/** Run ProUnitGUI.w **/
RUN ProUnitGUI.w.
|
Command Line Execution
It's possible to run ProUnit on Linux of for nightly builds
using the command line version. This interface only enables you
to run the tests, that is, the suite "modeling" must still be
done on a Windows station but can be run on virtually any
Progress-compatible operational system.
To run ProUnit Command Line Executor you shall use the
batchExecutor program:
<DLC>/bin/_progres -b -param "<ProUnit Parameters>" [other Progress parameters]
|
|
Where:
- DLC - Progress installation path.
- ProUnit Parameters - ProUnit execution parameters, see details bellow
- Other Progress startup parameters - Any other Progress startup parameters (-db, -dmy, -H, -S, -pf, etc).
|
You may configure ProUnit execution using the following parameters:
| Parameter |
Description |
Mandatory |
| -projectFile |
Path to the XML file saved using ProUnit GUI version. |
YES |
| -resultFile |
Path to the resulting execution file (XML). |
NO |
| -resultTemplate |
Template used to format the result file. |
NO |
| -verbose |
Configures execution to be silent or to show execution progress and results. |
NO |
| -runningAnt |
Configures ProUnit to run through a PCTRun task (see Automated Nightly Builds topic). |
NO |
Here you have some examples:
_progres -p batchRunner.p -b -param "projectFile=/usr/projects/full.xml"
|
|
Runs the projectFile silent and no result file is generated.
|
_progres -p batchRunner.p -b -param "projectFile=/usr/projects/full.xml -verbose=true"
|
|
Runs the projectFile showing execution progress and results. No result file is generated.
|
_progres -p batchRunner.p -b -param "projectFile=/projects/full.xml -resultFile=/projects/result.xml"
|
|
Runs the projectFile silent and save a plain XML file with execution results.
|
progres -p batchRunner.p -b -param "projectFile=/projects/full.xml -resultFile=/projects/result.xml -resultFile=default"
|
|
Runs the projectFile silent and save a formatted XML file using the default template.
|
Automated Nightly Builds
You may use ProUnit and PCT
(http://www.sourceforge.net/projects/pct)
to automate the building and testing of your project. Once you have
installed PCT you may run the tests using ProUnit task, like the
example bellow:
<ProUnit project="test.xml" result="result.xml" dlcHome="${env.DLC}" template="default">
<propath>
<path location="${env.PROUNIT_HOME}" />
</propath>
</ProUnit>
|