This topic explains how SOAtest test cases can be mapped to specific requirements in HP ALM / Quality Center. Once a test case is mapped to a requirement, the testing of the requirement becomes as simple as clicking a button inside HP ALM. Parasoft test cases can then be run from inside HP ALM and the results will be reported back to HP ALM.
Sections include:
Preparing SOAtest for Use with HP ALM
HP ALM can run SOAtest test suites using the SOAtest web service interface or the SOAtest command line interface (soatestcli). The web service interface enables clients to run tests using a shared instance of SOAtest running on a remote machine. The command line interface can be used to run tests using soatestcli on the client's local machine. Test runs will initialize and terminate much faster when using the web service interface.
The SOAtest web service is enabled by starting SOAtest in web service mode. The machine running SOAtest in web service mode must have access to a workspace containing the SOAtest test suites (.tst files) that you wish to run using HP ALM. Web service mode is available for the Automation Edition of SOAtest. For details about running SOAtest in web service mode, see Testing from the Web Service Interface.
Choosing a SOAtest-ALM Integration Option
There are two options for integrating SOAtest with HP ALM.
- Use the Parasoft SOAtest test type (for HP ALM 10, 11, and 12 only): This test type provides a graphical user interface for configuring test execution. No scripting is required. The test type must be installed into the HP ALM server. This is a one-time installation procedure that is performed by the ALM administrator. After it is completed, users can work with the Parasoft GUI (rather than a script).
- Use the VAPI-XP test type (for any version): This test type is included with HP ALM. SOAtest includes a script that can be executed by a VAPI-XP test. The test execution is configured by modifying variables in the script. It does not involve any ALM server modification.
Both of these options allow HP ALM to run tests using the SOAtest web service interface or the SOAtest command line interface (soatestcli).
Parasoft SOAtest Test Type Configuration and Test Creation
Parasoft SOAtest test type integration requires:
- Server configuration: Installation of the Parasoft SOAtest test type. This procedure is different for HP ALM 11 and 12 and HP QC 10.
- Client configuration: Installation of Microsoft Visual C++ 2008 SP1 Redistributable Package (x86) and the Microsoft SOAP Toolkit 3.0 SDK. This procedure is the same across versions 12, 11 and 10; it is covered in Configuring the Client Machine - for HP ALM 12, ALM 11 and QC 10.
Configuring the HP ALM / QC Server Machine
HP ALM 11 and 12
Instructions for installing custom test types can be found in the HP ALM ALM Installation Guide (on Windows 7, it can be found at C:\Program Files\HP\ALM\application\20qcbin.war\Help\doc_library\pdfs).
The following instructions are for installing the Parasoft SOAtest test type into HP ALM 11 or 12:
Extract the contents of the ZIP file that is shipped
<SOAtest Installation>/integration/HP to the folder <HP Deployment ocation>\application\20qcbin.war
. Refer to the HP ALM Installation Guide for the HP Deployment Location (on Windows Server 2003, it isC:\Documents and Settings\All Users\Application Data\HP\ALM
).- Run the HP Server Deployment Wizard. This redeploys HP ALM with the necessary test type updates.
- Using IE with Administrator privileges, log in to HP ALM as Site Administration, then select Tools> Update Test Types. This will make the custom test type available for use in the active projects.
- Log out of HP ALM.
HP QC 10
Instructions for installing custom test types can be found in the "HP Quality Center Custom Test Type Guide". This document can be found in Quality Center by choosing Help> Documentation Library.
The following instructions are for installing the Parasoft SOAtest test type into Quality Center 10:
- Create a temporary scratch directory on the Quality Center server machine. You can create the scratch directory in the Quality Center
application
directory (for example,C:\Program Files\HP\Quality Center\application\my_scratch_files
). - Go to Quality Center’s
jboss\server\default\deploy
directory and copy the20qcbin.war
file to your scratch directory. - Go to your SOAtest installation’s
integration\HP
directory (for example,C:\Program Files\Parasoft\SOAtest\{ver}\integration\HP
) and copy thesoatest_test_type.zip
file to your scratch directory on the Quality Center server. - Unzip
soatest_test_type.zip
into your scratch directory. This should create two folders:CustomTestTypes
andExtensions
. Update
20wcbin.war
withCustomTestTypes
andExtensions
. You can do this using thejar
command from the Java JDK. For example, you might usejar uvf 20qcbin.war CustomTestTypes Extensions
Since war files use the zip file format, a zip application could also be used to update20qcbin.war
.- Make a backup copy of the original
20qcbin.war
file in thejboss\server\default\deploy
directory—for instance, you could copy the original file, then rename it to20qcbin.war.bak
. - Copy the new
20qcbin.war
file from your scratch directory to thejboss\server\default\deploy
directory. - Restart Quality Center. Typically you would do this from the Windows Services console (e.g., by choosing Start> Administrative Tools> Services).
- Add Parasoft SOAtest to the list of test type options.
- Open a browser and enter the URL
http://<server:port>/qcbin/start_a.htm
- Click the HP Quality Center link.
- Log on to Quality Center
- Click Tools> Customize.
- Click Project Entities.
- Expand Test then expand System Fields.
- Select Type then click the Goto List button.
- Click the New Item button, enter
Parasoft SOAtest
for the item name, then click OK. - Close the Project Lists box then click Save.
- Log out of Quality Center. The changes will then take effect.
- Open a browser and enter the URL
Configuring the Client Machine - for HP ALM 12, ALM 11 and QC 10
The following must be installed on any client machines that you want to use the Parasoft SOAtest test type:
- Microsoft Visual C++ 2008 SP1 Redistributable Package (x86). The Parasoft SOAtest test type will not function without the Visual C++ libraries from Microsoft. You can download the installer from the Microsoft Download Center at http://www.microsoft.com/en-us/download/details.aspx?id=5582.
- Microsoft SOAP Toolkit 3.0 SDK. HP ALM / QC needs this so that tests can invoke web services. The test type and VAPI-XP script will not be able to use the SOAtest web service interface if this is not installed. The installer (SoapToolkit30.exe) can be downloaded from the Microsoft Download Center at http://download.microsoft.com/download/2/e/0/2e068a11-9ef7-45f5-820f-89573d7c4939/soapsdk.exe.
In addition, each client machine should be configured to permit Parasoft software to execute. To do this:
- Re-register each client that uses ALM / QC as follows:
- Run IE with Administrator privileges.
- Navigate to http://<HP ALM server>:<HP ALM port>/qcbin/start_a.jsp?common=true .
When prompted, install Parasoft-branded addins.
- When prompted, close the browser after client registration is complete.
- Open Internet Explorer again and enter the URL http://<server:port>/qcbin/start_a.htm.
- Click the HP ALM / QC link. Internet Explorer will open several Security Warning dialogs.
- Respond to the dialogs as described in the above box.
Note that simply clicking Run (without enabling the Always run software from Parasoft Corporation option) is sufficient to enable the integration—but Internet Explorer will continue to open these security warning dialogs every time that you log in to ALM / QC.
Creating a Test in the Test Plan Module
- After you log in to HP 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 (e.g.,
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 Parasoft SOAtest in the Test Type drop-down box, enter a test name (e.g.,
SOAtest Demo
) in the Test Name field, then click OK.
- Select the new test, then open the Test Script tab.
- Modify the test using the available controls (detailed below).
Control | Required | Description |
---|---|---|
Execution mode | X | Specifies whether to use the web service interface (server) or the command line interface (command line). |
Protocol | X | Specifies whether the SOAtest server connection uses HTTP or HTTPS. HTTPS Note By default, HP ALM / QC does not accept the self-signed SSL certificate that ships with SOAtest and is returned by the SOAtest server when using HTTPS (you will see an error message stating "...Security certificate required to access this resource is invalid..."). If you are connecting over HTTPS, be sure to:
By default, the SOAtest server port is 9443 for HTTPS and 9080 for HTTP. |
Host | X | Host name of the SOAtest server. |
Port | X | Port number of the SOAtest server. |
Username | * | Username for connecting to CTP Required if the SOAtest server is connected to CTP |
Password | * | Password for connecting to CTP Required if the SOAtest server is connected to CTP |
Executable | Full path to the SOAtest executable. | |
Workspace | Full path to the workspace directory. If empty, the default workspace will be used. Equivalent to the "-data" command line argument. | |
Resource | X | Relative path to the SOAtest .tst file from the workspace. Equivalent to -resource command line argument. |
XML Report | Full path to the XML report file which will store the test results. | |
HTML Report | Full path to the HTML report file. | |
Environment | Name of the environment to enable during testing. Equivalent to the -environment command line argument. | |
Test name | Run tests that match the specified name. Equivalent to the -testname command line argument. | |
Data source row | Run tests with a single data source row. Equivalent to the -dataSourceRow command line argument. | |
Data source name | Run tests with a single data source. Equivalent to the | |
Data group config | 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 -dataGroupConfig command line argument. | |
Environment config | 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 -environmentConfig command line argument. | |
Extra command line arguments | Pass additional command line arguments to soatestcli. For advanced users. | |
Custom request XML | Pass a custom XML request to the SOAtest server. For advanced users. | |
Custom script path | Full path to a SOAtest VAPI-XP script. Enables execution of a custom VAPI-XP script. For advanced users |
VAPI-XP Test Type Configuration and Test Creation
Client Configuration
The following must be installed on any client machines in order to use the SOAtest script with VAPI-XP test execution:
- Microsoft SOAP Toolkit 3.0 SDK. HP ALM / QC needs this so that tests can invoke web services. The test type and VAPI-XP script will not be able to use the SOAtest web service interface if this is not installed. The installer (SoapToolkit30.exe) can be downloaded from the Microsoft Download Center at http://download.microsoft.com/download/2/e/0/2e068a11-9ef7-45f5-820f-89573d7c4939/soapsdk.exe.
Creating a Test in the Test Plan Module
- 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 (e.g.,
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 drop-down box, enter a test name (e.g.,
SOAtest Demo
) in the Test Name field, then click OK.
- In the HP 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 HP VAPI-XP wizard.
- Open the customized SOAtest script
HPQualityCenter.txt
located inintegration/HP
within the SOAtest install directory.
Note that 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.tst
within theexamples/tests
directory. - Copy the
HPQualityCenter.txt
script and replace it in the template. - Modify the script as needed (see the following section for details).
- Save the script.
Modifying the Script
The HPQualityCenter.txt
integration script (located in integration/HP
within the SOAtest installation directory) 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 HP ALM / QC.
SOAtestServerHost and testSuite should be modified as needed. SOAtestServerHost should be set to the hostname or IP address of the machine running SOAtest in web service mode. testSuite is the relative path to your SOAtest project file from the workspace that the SOAtest web service is using.
Script Assumptions
The script assumes the following:
Variable | Assumption |
---|---|
useWebService | true |
SOAtestServerProtocol | http |
SOAtestServerHost | localhost |
SOAtestServerPort | 9080 |
SOAtestServerUsername | "" |
SOAtestServerPassword | "" |
testSuite | "HPQualityCenter/HPQualityCenter.tst" inside a project called HPQualityCenter in the workspace |
testName | "" |
dataSourceRow | "" |
dataSourceName | "" |
testConfiguration | "user://Example Configuration" |
environment | "" |
dataGroupConfig | "" |
environmentConfig | "" |
xmlReport | "C:/Progra~1/Parasoft/SOAtest/9.x/examples/reports/HPQualityCenter.xml" |
htmlReport | "" |
detailedReporting | true |
Variable Descriptions
The following table describes the variables that can be used to configure the script's behavior:
Variable | Description | Example |
---|---|---|
useWebService | Determines if tests will be run using SOAtest's web service interface. If false, tests will be run using the SOAtest command line interface. | var useWebService = true; |
SOAtestServerProtocol | Specifies whether the SOAtest server connection uses HTTP or HTTPS. | var SOAtestServerProtocol = "https"; |
SOAtestServerHost SOAtestServerPort | The host name or IP address of the machine running SOAtest in server mode. The port number of the machine running SOAtest in server mode. | var SOAtestServerHost = "localhost"; var SOAtestServerPort = 9080; |
SOAtestServerUsername SOAtestServerPassword | The username for connecting to CTP The password for connecting to CTP *Required if the SOAtest server is connected to CTP | var SOAtestServerUsername = “user1”; var SOAtestServerPassword = “password”; |
testConfiguration | The name of the Test Configuration (same as the -config CLI argument). | var testConfiguration = "user://Example Configuration"; |
testSuite | The relative path to your SOAtest project file from the workspace. | var testSuite = "HPQualityCenter/HPQualityCenter.tst"; Assumes that the test suite is inside a project called HPQualityCenter in the workspace. |
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 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 -dataGroupConfig command line argument. | 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 -environmentConfig command line argument. | var environmentConfig = "C:/configFiles/environmentConfig.xml" |
xmlReport | The full path to the XML report file that will store the test results. This file is created after each test run. | var xmlReport = "C:/Progra~1/Parasoft/SOAtest/9.x/examples/reports/HPQualityCenter.xml"; |
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/9.x/examples/reports/HPQualityCenter2.html"; |
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.exe in your SOAtest installation location. | var SOAtestExe = "C:/Progra~1/Parasoft/SOAtest/9.x/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 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. |
Migrating from SOAtest 5.5.x?
There are slight differences for these variables in SOAtest 5.5.x and SOAtest 9.x:
SOAtest 5.5.x Variables:
- SOAtestExe: Full path to soatestcli.exe in your SOAtest installation location. By default, this variable is set to the default install location. For most users this variable is correct and would not need to be modified.
- testSuite: Full path to your SOAtest project file. By default, this variable is set to HPQualityCenter.tst (located in examples/tests within the SOAtest install directory). You will need to set this variable to the full path of your SOAtest project that you want SOAtest to run.
- xmlReport: Full path to the XML report file which will store the test results. This file will be created by SOAtest after each test run.
- htmlReport: Full path to the HTML report file (optional). Similar to the xmlReport variable, this file will be created by SOAtest after each test run. If you do not wish for SOAtest to create an HTML report, set this variable to the empty string "" (default). If created, the HTML report will be attached to the test run and can be accessed directly from within HP ALM.
- detailedReporting: Boolean variable to control level of reporting. If set to true (default), SOAtest will report detailed information for all tests that ran in the SOAtest project. If false, only test failures will be reported.
- additionalArgs: Additional command line arguments send to SOAtest. For example, set this to "-testName Custom" to only run the test named Custom. Other advanced command line features can be used in a similar way.
Running a Test in the Test Lab Module
To run a test in the Test Lab module:
- Open theTest Lab module.
- Create a new folder from the Root node.
- Add a new Test Set to the new folder.
- From the Test Plan Tree (on ALM 12, open it by clicking Select Tests at the top left of the toolbar), find the test that was created from Test Plan and add it to the new test set.
- Once the test is added, select and run the test. Assuming that SOAtest is installed locally, ensure that the Run All Tests Locally option is checked, then click the Run All or Run button.
Understanding Test Results
After a test run is completed, you can see results summaries and details as you would for other tests.
For each test run, Test Center’s status column will indicate the overall success of your SOAtest test suite. For each test run, it will also show a list of run steps that correspond to each test that was executed within the SOAtest test suite. The status column for the run step will indicate whether that test passed or failed.
Detailed information about a test can be found by looking at the run step's Description field, which contains the following:
- Test Information: Includes test name, start time, stop time, test duration, and status. If it is a SOAP Client test, the asset (WSDL URI) and operation name will also be listed.
- 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.
Each run step also has Expected and Actual areas that are used for storing the expected test result and actual test result. If a test in your SOAtest project failed because of a diff or regression failure, these areas will be populated with the expected input and actual input received by the Diff tool that reported the error.
Filing Defects in HP ALM
SOAtest can file defects into HP ALM if the following prerequisites are met:
- SOAtest has valid Concerto settings set in the preferences. For details, see the Configuring Preferences Overview.
- The Concerto server that SOAtest connects to is itself connected to HP ALM / QC (see the Parasoft Concerto documentation for details).
To file a defect:
- Right-click any error message reported in SOAtest’s Quality Tasks view of SOAtest, then choose File Defect Report.
- The File Defect Report option will be available only if you have specified valid Concerto settings in the preferences.
- The File Defect Report option will be available only if you have specified valid Concerto settings in the preferences.
- In the dialog that opens, specify the information needed to file the defect. The Detected By and Assignee fields will be automatically populated with information from ALM / QC if the two prerequisites have been met.
Troubleshooting
When running tests with HP ALM, you may encounter the following error messages.
Error Message | Resolution |
---|---|
You do not have the required permissions to execute this action | This error is thrown from within HP ALM when the QC user running a test from test lab module does not have one or more permissions turned on. The HP 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 10, do the following:
To check that permission Status [RUN] is enabled:
|
Automation server can't create object | Ensure that you have installed the Microsoft SOAP Toolkit SDK as explained in Parasoft SOAtest Test Type Configuration and Test Creation or VAPI-XP Test Type Configuration and Test Creation. |
WSDLReader: Loading of the WSDL file failed HRESULT=0x80040154: Class not registered. | This is a known problem when using the Microsoft SOAP Toolkit on some Windows computers. The Microsoft Support Knowledge Base describes the problem and various resolutions at http://support.microsoft.com/kb/922736. |
SOAtest XML test results not found! | Verify the xmlReport variable is correct. SOAtest Server must also have write permissions on the folder where the XML file is to be written. |