Performing Regression Tests Using Insomnia Core

Objectives

After completing this lesson, you will be able to:
  • Call SAP Convergent Charging Web Services with Insomnia Core.
  • Use Insomnia Core for regression testing of price models.

Calling SAP Convergent Charging Web Services with Insomnia Core

Business Example

As a product modeler, you want to test your new price model implemented in CHP_##_CLOUD_SERVICE_V01 with description "Charge Plan Usages" which includes three usage charges.

Insomnia Core

Insomnia Core is an open-source web service testing application, which could be used to automate the setup of master data in SAP Convergent Charging and simulate the charging process for a charge plan to perform price model testing using the Soap-based web services SAP Convergent Charging offers. The web services mentioned above will be imported into Insomnia Core and executed from there.

The main window of insomnia core is divided into three major areas of interest:

  1. The request list area on the left
  2. The request area in the middle
  3. The response area to the right
The figure shows the screen areas of Insomnia Core, as described above.

Each entry in the request list represents a predefined service request that can be sent to SAP Convergent Charging. When you choose an entry in the request list, the request area will update and reflect the message payload of that request. Once a request has been sent and a response has been received, it is displayed in the response area on the right of the screen.

All requests in the list are assigned to a workspace, which is called My Workspace. You can create more workspaces if you like.

The service requests make use of variables. The values of these variables are stored in what is called an "environment" in Insomnia Core. Variables are replaced with their associated values when the request is sent. They allow each participant to use her/his own group number where applicable when executing the services. You can access the environment by pressing CTRL + E when the Insomnia Core application is in focus.

Environments are organized in a hierarchy. All variables defined for this course are placed in the so called Base Environment, which is accessible across all workspaces of Insomnia Core. The variables are defined in the json format.

Using Insomnia Core for Regression Testing of Price Models

The figure shows an example, of how variables are used in an environment.

Insomnia Core allows you to switch between environments to use for your selected workspace, so that your services are executed with different values depending on the environment you selected. This way you can store test data for your dev systems in one environment and test data for your test system in another one, and switch between them with ease. It also allows you to save the hostname and ports for your services inside a variable, so that the correct system is called when you switch environments. This was also done for this course.

To execute a set of services you need to select the service request from the list of requests on the left, and then choose Send. Insomnia Core will then resolve any variables you have referred to into their respective values and send the request message to the target system. Once the response arrives it is displayed in the response area for you to examine.