Tricentis Tosca 16.0 Released on Feb-2023 ----- UFT has been upgraded from UFT 15.0.1 to UFT One 15.0.2, Beginning at November 2020.

Tuesday 5 September 2023

API Testing menu

 The API Testing menu consists of four sections:

  1. Module Attribute

  2. Connection

  3. Tools

  4. Message


Module Attribute

Module Attributes are business-relevant elements of a message, such as a name, ID, or address. Module Attributes allow you to steer the values of these message elements in your TestCase. You can define Module Attributes for the following elements of a message in Tosca Commander:

  • Attachments

  • Authentication

  • Headers

  • Method, endpoint, and resource

  • Parameters

  • Payload

  • Status code and response time


The following options are available in the Module Attribute section:

 Add

Add Module Attributes. The dropdown menu offers the following options:
  • Add Module Attributes with Dynamic List Item(s)

  • Add Module Attributes with Static List Item(s)

  • Open the Attribute Assistant to add Module Attributes


 Buffer - 

Add and buffer Module Attributes. The dropdown menu offers the following options:

  • Buffer Module Attributes with Dynamic List Item(s)

  • Buffer Module Attributes with Static List Item(s)

  • Open the Attribute Assistant to add and buffer Module Attributes


 Body - 

We can create Body Module Attributes from the elements of a message or the whole body of a message. Use the dynamic menu API Testing to create body Module Attributes from the body of your request message or your response message.


Create body Module Attributes from a request message: 

To add or buffer the body of your request message, follow the steps below:

  1. Select the Module and switch to the Technical View.

  2. Access the API Testing menu.

  3. Click Body and select one of the following options from the dropdown menu:

    • To mark the entire payload and add it as a Module Attribute, click Insert Message.

    • To mark the entire payload and buffer it as a Module Attribute, click Insert from Buffer.

    • To load a payload from file as a Module Attribute, click Load from File ....

      In the subsequent dialog, select a file name and click Open.


Create body Module Attributes from a response message : 

To add or buffer the body of your response message, follow the steps below:

  1. Select the Module and switch to the Technical View.

  2. Access the API Testing menu.

  3. Click Body and select one of the following options from the dropdown menu:

    • To mark the entire payload and add it as a Module Attribute, click Verify Message.

    • To mark the entire payload and buffer it as a Module Attribute, click Buffer Message.

    • To save the payload of your message as a Module Attribute, click Save to File ....

      In the subsequent dialog, define a file name and click Save.



 Validate- 

Check whether the Module Attributes in your API Modules are valid. This can be useful, for instance, if you performed any updates or changes to a Module.

To validate Module Attributes, follow the steps below:

  1. In Tosca Commander, select one of the following elements:

    • a Module Attribute

    • an API Module

    • a Module folder that contains API Modules

    • a ComponentFolder that contains API Modules and TestCases

    • the project root element

  2. Navigate to the API Testing menu.

  3. In the Module Attribute section, click  Validate.


 Update - 

You can use the Update function to update your Module Attributes in one of the following cases:

  • Your payload has changed.

  • You want to use an existing Module Attribute to steer a different element within the payload.

Tricentis Tosca automatically applies any changes you perform on the Module to the corresponding messages.


To update a Module Attribute, follow the steps below:

  1. Select the respective Module Attribute.

    The Technical View displays the current element to be steered in your TestCase.

    The XPath expression in the Properties pane displays the link to the element in the payload.

  1. In the Payload tab, highlight the new or changed element with your mouse.

  2. Click Update in the API Testing menu.

The system displays the updated XPath expression in the Properties pane.

If you update a body Module Attribute, the system updates the DefaultValue.

Connection

Use the Connection section of the API Testing menu to open the API Connection Manager and to add connections.

You can use the API Connection Manager to manage all your API connections and environments in one place.


The following options are available in the Connection section:

 Manage - Open the API Connection Manager.

 Create  -    Create a connection from an API Module to the API Connection Manager. 


Tools

Use the Tools section of the API Testing menu to open Tricentis Tosca API Scan, open selected Modules in API Scan and to convert OSV scenarios into API TestCases.


The following options are available in the Tools section: 

 API Scan   -  Start API Scan or open selected Modules in API Scan.

 Convert to TestCase  -  Convert an OSV Scenario into an API TestCase.


Message

Use the Message section of the API Testing menu to search message payloads, add files to your message, generate XTestStepValues, and to format the visible message. Additionally, you can update API Modules if the schema has changed.


The following options are available in the Message section:


 Update  -  Update API Modules.

 Add Files Add a file to the payload of your message or as an attachment.

 Search in Payload Search for stringsregular expressions  and wildcards in the message payload.

 Auto fill Values  - Generate XTestStepValues from the default values of the linked Module or from values pasted from your clipboard.

 Pretty Print  - Format the visible message in the Technical View of the selected Module.

 Word Wrap  -  Break long text and wrap it into the next line in a selected module.


No comments:

Post a Comment

Note: only a member of this blog may post a comment.