...
- After logging in to ALM, select the Test Plan module. The Test Plan module allows you to set up your automated test and custom scripts.
- In the Test Plan Tree, select Subject and click the New Folder toolbar button.
- In the New Folder dialog box, enter a folder name (for example, "SOAtest") in the Test Folder Name field.
- Select the newly created folder, then click the New Test icon from the above toolbar.
- In the Create New Test dialog box, select VAPI-XP-TEST in the Test Type menu, enter a test name (for example, "SOAtest Demo") in the Test Name field, then click OK.
- In the VAPI-XP Wizard select JavaScript as the Script Language, enter "SOAtest" for Script Name, then click Finish.
- Open the Test Script tab. Notice that a template has been created from the VAPI-XP wizard.
- Open the customized SOAtest script VAPI-XP-SOAtest.js.
Note: the script assumes the default install location isc:/Progra~1/Parasoft/SOAtest/[SOAtest version number]/.
The script is configured to run a test suite calledHPQuality-Center example.tst
inside a project calledHPQualityCenter
in the workspacetheTestAssets
project. - Copy the VAPI-XP-SOAtest.js script and replace it in the template.
- Modify the script as needed (see the following section for details).
- Save the script.
...
The VAPI-XP-SOAtest.js integration script is used in your test's Test Script tab in order to tell SOAtest to run your project file and report the test results back to ALM / QC.
Script Assumptions
The script assumes the following:
...
""
(runs all tests)
...
""
(uses all data source rows)
...
""
(uses all data source rows)
...
""
(uses the default active environment)
...
""
(Uses the current active data source in each data group)
...
""
(Uses the current environment variables in each test)
...
Modify testSuite
and workspaceLocation
as needed.
Variable Descriptions
The following table describes the variables that can be used to configure the script's behavior:
Variable | Description | Example |
---|---|---|
testConfiguration | The name of the Test Configuration (same as the -config CLI argument). | var testConfiguration = "userbuiltin://Example ConfigurationRun Automated Server Tests"; |
testSuite | The relative path to your SOAtest project file from the workspace. | var testSuite = "HPQualityCenterTestAssets/HPQualityCenterexample.tst"; Assumes that the test suite is inside a project called HPQualityCenter in the workspaceBy default, the script is configured to run a test suite called "example.tst" inside the TestAssets project. |
testName | The name of the test in the test suite to run. (same as the -testName CLI argument). | var testName = ""; |
dataSourceRow dataSourceName | Runs tests with a single data source row (same as the -dataSourceRow and - data-SourceName dataSourceName CLI arguments). | var dataSourceRow = ""; |
environment | The name of the environment to enable during testing (same as the -environment CLI argument). | var environment = ""; |
dataGroupConfig | The full path to the XML file that specifies the active data source for each data group within each .tst file contained in the test run. Equivalent to the | var dataGroupConfig = "C:/configFiles/dataGroupConfig.xml"; |
environmentConfig | The full path to the XML file that specifies the environment variables to use for each .tst file contained in the test run. Equivalent to the | var environmentConfig = "C:/configFiles/environmentConfig.xml";xmlReport |
reportDir | The | |
location of the | ||
report directory. | var | |
reportDir = " | ||
%TEMP%/ | ||
parasoft/ | ||
soatest/reports"; | ||
htmlReport | The full path to the directory for optional HTML report file. It CANNOT be the same name as the xml file. This reporting can be disabled by leaving it as an empty string "" | var htmlReport = "c:/Progra~1/Parasoft/SOAtest/<version>/examples/reports/HPQualityCenter2.html"; |
clearReportDir | If true, removes all files from the report directory before running SOAtest. | var clearReportDir = true; |
detailedReporting | Controls the level of reporting. If true, test results will show detailed information about each test run. If false, only information about test failures will be reported. | var detailedReporting = true; |
SOAtestExe | The full path to st soatestcli.exe in your SOAtest installation location. | var SOAtestExe = "C:/Progra~1/Parasoft/SOAtest/<version>/soatestcli.exe"; This variable is deprecated and only applicable when useWebService is false. |
workspaceLocation | The full path to the workspace var workspaceLocation = "C:/Users/name/soatest/workspace"; | var workspaceLocation = "C:/Docume~1/soatest-workspace/" This variable is deprecated and only applicable when useWebService is false. ; |
additionalArgs | Passes additional command line arguments to SOAtest. For example, set this to "-test-Name testName Custom" to only run the test named Custom. To run the entire test suite, leave this as empty string "" | var additionalArgs = ""-testName Custom" This variable is deprecated and only applicable when useWebService is false. ; |
Running a Test in the Test Lab Module
...
- Test Information: Includes test name, start time, stop time, test duration, and status.
- Traffic: Only available for traffic-generating tests. Will show response time, the request message, and response message.
- Error Source, Error Summary, Error Detail: These fields will only appear if the test failed. The Error Source will include the name of the tool that reported the error and the corresponding data source column, if applicable. The Error Summary and Error Detail sections show the brief and detailed messages corresponding to the error.
...
Error Message | Resolution |
---|---|
You do not have the required permissions to execute this action | This error is thrown from within ALM when the QC user running a test from test lab module does not have one or more permissions turned on. The QC script that is shipped with SOAtest requires specific permissions to be turned on in order for the script to successfully perform certain tasks. If you see this error, you might not have the following permission set for the group that the logged in QC user belongs to: Status [RUN] (Modify Run > Status [RUN]). To view/change permissions for a group that a QC user belongs to in Quality Center, do the following:
To check that permission Status [RUN] is enabled:
|
SOAtest XML test results not found! | Verify the xmlReport xmlReportLocation variable is correct. SOAtest must also have write permissions on the folder where the XML file is to be written. |