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:

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:

  1. 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 is
    C:\Documents and Settings\All Users\Application Data\HP\ALM).

  2. Run the HP Server Deployment Wizard. This redeploys HP ALM with the necessary test type updates.
  3. 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.
  4. 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:

  1. 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).
  2. Go to Quality Center’s jboss\server\default\deploy directory and copy the 20qcbin.war file to your scratch directory.
  3. Go to your SOAtest installation’s integration\HP directory (for example, C:\Program Files\Parasoft\SOAtest\{ver}\integration\HP) and copy the soatest_test_type.zip file to your scratch directory on the Quality Center server.
  4. Unzip soatest_test_type.zip into your scratch directory. This should create two folders: CustomTestTypes and Extensions.
  5. Update 20wcbin.war with CustomTestTypes and Extensions. You can do this using the jar command from the Java JDK. For example, you might use 
    jar uvf 20qcbin.war CustomTestTypes Extensions
    Since war files use the zip file format, a zip application could also be used to update 20qcbin.war.

  6. Make a backup copy of the original 20qcbin.war file in the jboss\server\default\deploy directory—for instance, you could copy the original file, then rename it to 20qcbin.war.bak.
  7. Copy the new 20qcbin.war file from your scratch directory to the jboss\server\default\deploy directory.
  8. Restart Quality Center. Typically you would do this from the Windows Services console (e.g., by choosing Start> Administrative Tools> Services).
  9. Add Parasoft SOAtest to the list of test type options.
    1. Open a browser and enter the URL http://<server:port>/qcbin/start_a.htm
    2. Click the HP Quality Center link.
    3. Log on to Quality Center
    4. Click Tools> Customize.
    5. Click Project Entities.
    6. Expand Test then expand System Fields.
    7. Select Type then click the Goto List button.
    8. Click the New Item button, enter Parasoft SOAtest for the item name, then click OK.
    9. Close the Project Lists box then click Save.
    10. Log out of Quality Center. The changes will then take effect.

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:

  1. Re-register each client that uses ALM / QC as follows:
    1. Run IE with Administrator privileges.
    2. Navigate to http://<HP ALM server>:<HP ALM port>/qcbin/start_a.jsp?common=true .
    3. When prompted, install Parasoft-branded addins.



      Responding to Security Warning

      If the dialogs ask whether to run software from Parasoft, choose the Always run software from Parasoft Corporation option.
      If the dialogs refer to "unknown publisher" instead of "Parasoft Corporation", do the following:

      1) Close Internet Explorer.

      2) Install the Thawte Code Signing Intermediate CA from https://search.thawte.com/support/ssl-digital-certificates/index?page=content&actp=CROSSLINK&id=AR1493.

      3) Restart Internet Explorer.

      4)Try to log in again.

    4. When prompted, close the browser after client registration is complete.
  2. Open Internet Explorer again and enter the URL http://<server:port>/qcbin/start_a.htm.
  3. Click the HP ALM / QC link. Internet Explorer will open several Security Warning dialogs.



  4. 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

  1. 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.
  2. In the Test Plan tree, select Subject and click the New Folder toolbar button.



  3. In the New Folder dialog box, enter a folder name (e.g., SOAtest) in the Test Folder Name field.



  4. Select the newly-created folder, then click the New Test icon from the above toolbar.



  5. 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.

     

  6. Select the new test, then open the Test Script tab.



  7. Modify the test using the available controls (detailed below).
ControlRequiredDescription
Execution modeXSpecifies whether to use the web service interface (server) or the command line interface (command line).
ProtocolX

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:

  1. Create your own domain-specific SSL certificate (e.g., with Portecle or the java keytool command line).
  2. Change the SSL certificate used by SOAtest server (e.g., by modifying the SSL HTTP/1.1 Connector entry in [SOAtest install dir]/eclipse/plugins/com.parasoft.xtest.libs.web_[SOAtest_ver]/root/tomcat/conf/server.xml.)

  3. If the generated certificate is is self-signed: Configure Windows to trust the certificate (e.g., via the Windows Certificate Manager).

By default, the SOAtest server port is 9443 for HTTPS and 9080 for HTTP.

HostXHost name of the SOAtest server.
PortXPort 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.

ResourceXRelative 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
-dataSourceName command line argument.
If used, -dataSourceName must come after
-dataSourceRow. It can't be used by itself. You can specify which data source row you want to use, then you can limit the scope further by optionally specifying the name of a data source.

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

  1. 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.
  2. In the Test Plan Tree, select Subject and click the New Folder toolbar button.



  3. In the New Folder dialog box, enter a folder name (e.g., SOAtest) in the Test Folder Name field.



  4. Select the newly-created folder, then click the New Test icon from the above toolbar.



  5. 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.

     

  6. In the HP VAPI-XP Wizard select JavaScript as the Script Language, enter SOAtest for Script Name, then click Finish.
  7. Open the Test Script tab. Notice that a template has been created from the HP VAPI-XP wizard.



  8. Open the customized SOAtest script HPQualityCenter.txt located in integration/HP within the SOAtest install directory.

    Note that the script assumes the default install location is c:/Progra~1/Parasoft/SOAtest/[SOAtest version number]/. The script is configured to run a test suite called HPQuality-Center.tst within the examples/tests directory. 
  9. Copy the HPQualityCenter.txt script and replace it in the template.



  10. Modify the script as needed (see the following section for details).
  11. 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:

VariableAssumption
useWebServicetrue
SOAtestServerProtocolhttp
SOAtestServerHostlocalhost
SOAtestServerPort9080
SOAtestServerUsername

""
(No authentication specified)

SOAtestServerPassword

""
(No authentication specified)

testSuite"HPQualityCenter/HPQualityCenter.tst" inside a project called HPQualityCenter in the workspace
testName

""
(runs all tests)

dataSourceRow

""
(uses all data source rows)

dataSourceName

""
(uses all data source rows)

testConfiguration"user://Example Configuration"
environment

""
(uses the default active environment)

dataGroupConfig

""
(Uses the current active data source in each data group)

environmentConfig

""
(Uses the current environment variables in each test)

xmlReport"C:/Progra~1/Parasoft/SOAtest/9.x/examples/reports/HPQualityCenter.xml"
htmlReport"" 
detailedReportingtrue

Variable Descriptions

The following table describes the variables that can be used to configure the script's behavior:

VariableDescriptionExample
useWebServiceDetermines 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;
SOAtestServerProtocolSpecifies 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”;

testConfigurationThe name of the Test Configuration (same as the -config CLI argument).var testConfiguration = "user://Example Configuration";
testSuiteThe 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.

testNameThe name of the test in the test suite to run. (same as the -testName CLI argument).

var testName = "";
(leave as empty string "" to run all tests)

dataSourceRow dataSourceNameRuns tests with a single data source row (same as the -dataSourceRow and -data-SourceName CLI arguments).

var dataSourceRow = "";
var dataSourceName = "";
(leave as empty string "" to use all data source rows)

environmentThe name of the environment to enable during testing (same as the -environment CLI argument).

var environment = "";
(leave as empty string "" to use default active 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"
xmlReportThe 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 = "";

var htmlReport = "c:/Progra~1/Parasoft/SOAtest/9.x/examples/reports/HPQualityCenter2.html";
detailedReportingControls 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;
SOAtestExeThe 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";
Use "" to specify the default workspace location.

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 = "";

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:

  1. Open theTest Lab module.
  2. Create a new folder from the Root node.
  3. Add a new Test Set to the new folder.



  4. 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.





  5. 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:

  1. 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.
  2. 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 MessageResolution
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:

  1. Choose Tools> Customize.
  2. Select Groups.
  3. In the left, select the group that the QC user belongs to.
  4. Click the Change button on the right.

To check that permission Status [RUN] is enabled:

  1. In the new dialog window, open the Test Lab tab.
  2. Expand the Modify Run node.
  3. Go to the Status [RUN] nested node.
  4. Make sure this permission is enabled.

     
Automation server can't create objectEnsure 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.
  • No labels