Introduction

The SmartUnit Progress Developer Studio Plugin makes it possible to run SmartUnit tests from the Progress Developer Studio. It adds two categories for run configurations (test classes and scenario tests) as well as shortcuts in the “Run as” context menu for .cls and .scenario files.

Installation

Usage

A sample xml-file can be found at:

It has two targets to run tests.

Target

Description

execute-unit-test

Used to run SmartUnit test classes (.cls files).

execute-scenario-test

Used to run SmartUnit test scenarios (.scenario files).

The sample also requires two additional ANT arguments to run.

Those can be set in the preferences or the SmartUnit run configurations.

ANT arguments

The plugin passes arguments based on either the selected file or settings (preferences or run configuration).

Argument

Description

Set by

Notes

-Dsmartunit.testclass

Path to the class file to run

Either selected by running the test from its context menu or set in the run configuration.

Only passed when running test classes

-Dsmartunit.testmethod

Test-method in the test class

Can be set in the run configuration.

Execution of individual test-methods is not yet supported by SmartUnit

-Dsmartunit.testscenario

Path to the scenario file to run

Either selected by running the test from its context menu or set in the run configuration.

Only passed when running test scenarios

-Dsmartunit.output

Path to an XML file for the test results

Can be set in either the preferences or the SmartUnit run configurations.

Required

-Dsmartunit.services

List of service definition files that should be loaded prior to the test run

Can be set in either the preferences or the SmartUnit run configurations.

Optional

-Dsmartunit.profiler

Whether the PCTRun profiler should be enabled

Can be set in either the preferences or the SmartUnit run configurations.

Defaults to false

Any other arguments required to run custom build files can be added to “Additional ANT Arguments” in either the preferences or a specific SmartUnit run configuration.

Preferences

The prefrences can be found at Window → Preferences → SmartUnit. They are used as default values to run SmartUnit tests from the context menu and to initialize run configurations.

Preference

Description

ANT Executable

The ANT executable to run the build-file with.

Build File

The ANT build file that runs the tests (see sample “unittest-runner.xml” above).

Output File

The xml file for the test results.

Test Class ANT Target

The target in the Build File that should be executed for .cls files.

Scenario ANT Target

The target in the Build File that should be executed for .scenario files.

Services

The value for the “Services” parameter passed to SmartUnit.

Additional ANT Arguments

Additional arguments required by the specified Build File.

Output in console

Whether the Build Files output should be displayed in a console. The SmartUnit View is opened regardless.

Enable Profiler

Whether PCTRun should be executed with an enabled profiler.

The SmartUnit preferences also contain a link back to this page.

Run Configurations

The run configurations can be found at Run As… → Run Configurations… . Fields in the SmartUnit Run Configurations mostly match the preferences (differences are explained below). Initial values in new Run Configurations are set based on the preferences.

The run configurations can be launched from here as well.

SmartUnit Test Class

The “ANT Target” is the same as “Test Class ANT Target” in the preferences. Test File specifies the .cls file to run, Test method will allow running an indiviual method in the class.

Execution of individual test-methods is not yet supported.

SmartUnit Scenario Test

The “ANT Target” is the same as “Scenario ANT Target” in the preferences. Test file specifies the .scenario file to run.

Running Tests from the context menu

SmartUnit tests can be run from the Run As… context menu by right clicking the test-file (.cls or .scenario) in either the Project Explorer or inside an opened text editor (e.g. OpenEdge ABL Editor).

Running tests from the context menu uses the settings from the preferences page.