Web Service Interface question

LegacyForumLegacyForum Posts: 1,669 ✭✭
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

  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    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\">"; +
    "<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\">"; +
    "<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.
  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    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
  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    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

  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    Thanks I tried it out and it works.

    Regards,
    Brian
Sign In or Register to comment.