Creating Webservice Modules

As of Tricentis Tosca 12.2, the Webservice Engine 3.0 is no longer supported. By default, you cannot create WSE TestCases in API Scan.

For information on how to re-enable scanning WSE TestCases in API Scan, see chapter "Web service".

Create Webservice TestCases and Modules with the Tosca API Scan as described in chapter "Tricentis Tosca API Scan" and chapter "Create TestCases with API Scan".

Alternatively, you can use Tosca XScan to scan WSDL files and create modules manually. In this case, you need to adjust the Module to use scanned XML or JSON files in embedded mode along with Webservices. These adjustments are described below.

Creating XModules from a WSDL file manually

WSDL files or URLs of WSDL files are scanned with Tosca XScan.

  1. Import the TBox XEngines Modules subset (see chapter "Use the Standard subset").

  2. Select the option Scan Application->Non UI->Legacy Scan from the context menu of a Module folder.

    The folder containing the imported Webservice Modules must either be located on the level of the current folder or higher up. If this is not the case, a search is made for the folder on each parent level starting from the top down. The first occurrence of the folder is used.

  3. Specify the option File or Url as the Scan mode.

  4. Enter the path to the required WSDL file into the File path or Url field.

  5. Click on OK to start scanning.

  6. For further information on configuration options in XScan, please refer to chapter "Creating Modules from XSD files".

  7. Click on the Save button to create the Modules and then exit the XScan window.

The structure of the created XModules is adopted from the imported Webservice Modules.

After the WSDL file has been scanned, Tosca creates a folder for each binding. This folder includes a Module named <Operation> for each operation. This Module is a copy of the Module Communicate with Web service and can be moved to the TestCases section by using drag and drop.

In addition, each binding folder contains a WSE Modules folder which contains the following Modules for each operation:

  • <Operation> Request

    Specialization of the Module Web service request data in XML embedded.

  • <Operation> <Binding>

    Copy of the Module SOAP over HTTP. The ModuleAttributes may differ from each other, depending on the scanned Webservice.

  • <Operation> Response

    Specialization of the Module Web service response data in XML embedded.

In the XModule <Operation>, the ModuleAttributes Request, Response and Communicate are already instantiated with the three scanned Specialization Modules <Operation> Request, <Operation> <Binding> and <Operation> Response.

In this example, a WSDL file containing two bindings has been scanned. Four operations are available for each binding. The folder WSE Modules contains the Specialization Modules for Request, Communicate and Response for the individual operations.

WSDL file - extract with two operations

If the Module <Operation> is dragged onto a TestCase, the TestStepValues for Communicate are instantiated with the data from the WSDL file and the default values.

A SOAP 1.1 example of automatically set values

The TestStepValues Request and Response are directly linked with the Modules created with XScan and cannot be modified. If other Specialization Modules for Request and Response are to be used, the Module Communicate with Web service from the Tosca TBox package must be used and all specializations and data must be defined manually see chapter "Creating Webservice TestCases").

The values entered by default into the TestStep are stored in the Default value column of the corresponding Module. If the default values in the Module are modified, these values will not be adapted in existing TestSteps. Therefore, we recommend using test configuration parameters in the TestCases section rather than default values, since the test configuration parameters can be centrally modified at a later stage.

Defining XModules from files as request or response

XModules that have been created from XML or JSON files and are used in embedded mode must be manually defined as request or response. To define an XML or JSON Module as request, select the entry WebserviceEngine->Define as embedded request in the context menu of the XModule. To define an XML or JSON Module as response, select the entry WebserviceEngine->Define as embedded response.

Define as embedded

Alternatively, the corresponding Generalization-Module from the directory WSE 3.0->Classes->Webservice data can be set as Generalization-Module as described in chapter "Generalizations and Specializations".