Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Web Service Interface question

LegacyForum
LegacyForum Posts: 1,664 ✭✭
edited December 2016 in SOAtest
Hi,
When using the Web Service Interface is there any way to override the active environment in the project?
I'm executing SOATest scripts from HP Quality Center using the VAPI-XP interface.


Thanks,
Brian

Tagged:

Comments

  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    edited February 2011
    Hi Brian,

    Yes, it is possible to run with a different environment if you have multiple ones. Look for a function in the test script called "invokeSOAtestWebServiceAndReport". There is a variable called args which is being set to an XML message. This is the XML message that will be sent to the SOAtest web service. The "soatestOptions" element can have child element called "environment" which works just like the -environment argument from the command line interface.

    So, instead of this:
    "<soatestOptions xmlns=\"http://www.parasoft.com/ns/schema/soatest.xsd\">&quot; +
    "<qualityCenter>" +
    "<xmlReportLocation>" + xmlReportLocation + "</xmlReportLocation>" +
    "<reportAllTraffic>" + detailedReporting + "</reportAllTraffic>" +
    "</qualityCenter>" +
    "</soatestOptions>"

    You can use something like this intead:
    "<soatestOptions xmlns=\"http://www.parasoft.com/ns/schema/soatest.xsd\">&quot; +
    "<environment>Name of whatever environment in your tst file you want to run</environment>" +
    "<qualityCenter>" +
    "<xmlReportLocation>" + xmlReportLocation + "</xmlReportLocation>" +
    "<reportAllTraffic>" + detailedReporting + "</reportAllTraffic>" +
    "</qualityCenter>" +
    "</soatestOptions>"

    In general, the web service interface mirrors the command line interface. In other words, command line arguments from the command line interface have a corresponding XML element in the web service interface. You can take a look at the WSDL and referenced schemas from http://hostname:9080/axis2/services/SOAtestService?wsdl . In particular, the http://hostname:9080/axis2/services/SOAtes...xsd=soatest.xsd XML schema document describes the soatestOptions element.
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Thanks for the quick reply I'll give that a try.

    What if the environment is in an Environment Reference file? Will just the environment name work then also?

    Brian
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Hi Brian,

    That's right, you should always be providing the environment name.

    Thanks for the quick reply I'll give that a try.

    What if the environment is in an Environment Reference file? Will just the environment name work then also?

    Brian

  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Thanks I tried it out and it works.

    Regards,
    Brian

Tagged