Description

The Ranorex listener plugin receives messages from Ranorex through HTTP and sends them to 1Gateway. 


Prerequisites

The following procedure is Ranorex Solution Based. This means it has to be repeated vor every Project/Solution to be included.

You need to add 2 Files and a Variable needs to be set to send the Report directly to the Webserver. The Report will then be sent as application/xml to the Webserver

  1. PostReport.dll - reference has to be added → Copy file to C:\Program Files (x86)\Ranorex\Studio\Bin
  2. SendToWebServer.cs - needs to be added in the teardown section of the TestSuite
  3. WebUri Variabel has to be set with the url of the Webserver

Please contact us to receive the 2 files you need

Add PostReport.dll

1) Open RanorexStudio and open Project → Add reference

2) Open the Tab ".Net Assembly Browser" to add PostReport.dll file.

3) "OK" Approve

4) Verify in the Project Tree that the reference has been added to the References.

Add SendToWebServer.cs to the Teardown Section

1) Add Existing item to Project

2) Select File.

3) Add an additional TEARDOWN section on TestSuite root level

  1. Check File is added to the Project
  2. Open the TestSuite(double click)
  3. If there is no Teardown section, right click the top Level TestSuite and "Add teardown"

4) Drag & Drop the SendToWebServer.cs to into the Teardown Section

Set WebUri Variable

  1. Double Click on the "Unbound Variable" behind the SendToWebServer in the TestSuit Teardown.
  2. Name it WebURI. Add the value URL of the Web Service. Add the type for 1Gateway so the Type of the Message will be ranorex.
    http://192.168.193.56:8090/ws/rest/send?token=<1gatewaytoken>&type=ranorex&transform=ranorex
  3. Select the Module variable to "SendToWebServer.ServerUri". You should be able to select it.

Configure Ranorex to send Custom Values

It is also possible to send custom values from parameters as metrics into 1gateway. For this you need to convert a log action into UserCode and add parameters.

  1. Get a Value and save it into a Variable(any variable which is accessible in the UsercCode can be used).
  2. Create a "Log Message"
  3. Convert it into "UserCode"
  4. Edit the Usercode like to following

    // From
    Report.Log(ReportLevel.Info, "User", "");
    
    //To
    Report.Log(ReportLevel.Info, "MetricValue", "metricvalue:<identificaitonvalue>:"+result);
    
    //- "MetricValue" is the Category which is used
    //- "metricvalue:MultiplyingResult:"+result this will be split by : in the 1gateway
    //   "metricvalue" is needed for identification
    //   "<identificaitonvalue>" can be any string. Can be used for identification or extra information
    //	 "result" variable which contains the custom value
    C#


Installation

Make sure you have the 1gateway zip file that includes the plugin files and valid licences information ready. This file has been provided to you with the installation files.

1 - Login

Login to 1gateway, and make sure you are in "Advanced mode". If this is the first time you log in, the default user and password are both 'admin' (without the quotes).

2 - System Maintenance

Click on the menu icon and choose the option "System maintenance"


3 - Upload file


In the System maintenance view you can either drag and drop the downloaded zip file or select it by clicking the "choose file" button.

4 - Restart

After the upload installation will be confirmed. Restart 1Gateway to ensure any locked files are updated.

Configuration


Open the main menu and click on "New plugin"

Select the plugin you want to configure. Use the Filter field if needed.

The configuration of the Ranorex plugin doesn't include any fields.

See also