Skip to main content

Ranorex

Build from source

The source code can be found on GitHub: Ranorex Logger.

(Preferred option is NuGet install!)

  • Clone this repository
  • Open in a .Net IDE
  • Reference Ranorex.Core.dll and Ranorex.Libs.Util.dll from your Ranorex Installation(s)'
  • Reference the Orangebeard.Client DLL
  • Build the Ranorex Logger DLL

Installation

  • Install from NuGet
  • If you built it yourself: Add your dll as a reference in your Ranorex Solution
  • Reference it in Program.cs using RanorexOrangebeardListener;
  • Attach the logger to your Ranorex report. This can be done in Program.cs, or in a code module to be used as the first setup step. The Logger will then automatically create the root suite.
  • Environment vars can of course be set up elsewhere, or use orangebeard.json. See below:
    Environment.SetEnvironmentVariable("orangebeard.endpoint", "https://app.orangebeard.io/{ORGANIZATION}");
Environment.SetEnvironmentVariable("orangebeard.accessToken", "{LISTENER_TOKEN}");
Environment.SetEnvironmentVariable("orangebeard.project", "{PROJECT_NAME}");
Environment.SetEnvironmentVariable("orangebeard.testset", "Test Set name");
Environment.SetEnvironmentVariable("orangebeard.description", @"test run description"); //OPTIONAL
Environment.SetEnvironmentVariable("orangebeard.attributes", @"key:value;single tag"); //OPTIONAL
Environment.SetEnvironmentVariable("orangebeard.ref.url", @"https://my-ci-server.net/PRJ/1234"); //OPTIONAL
Environment.SetEnvironmentVariable("orangebeard.fileupload.patterns", @".*\.txt;.*\.bat"); //OPTIONAL

Environment.SetEnvironmentVariable("orangebeard.ranorex.systemattributes", "memory; number of displays"); //OPTIONAL

OrangebeardLogger orangebeard = new OrangebeardLogger();
Report.AttachLogger(orangebeard);

orangebeard.json: (in project work directory, or above in the path)

{
"endpoint": "https://app.orangebeard.io/{ORGANIZATION}",
"accessToken": "{LISTENER_TOKEN}",
"project": "{PROJECT_NAME}",
"testset": "{TESTSET}",
"description": "A description",
"attributes": [
{
"key": "Tool",
"value": "Ranorex"
}
],
"ref.url": "https://docs.orangebeard.io/"
}

If the orangebeard.ranorex.systemattributes environment variable is not present, no Ranorex system information will be sent to Orangebeard. If set, the content should be a semicolon-separated list of attributes to include. Attribute keys are matched case-insensitive.

Valid attributes are:

  • Ranorex version
  • OS version
  • OS default locale
  • .NET Runtime version
  • Number of logical CPUs
  • Number of displays
  • Screen dimension
  • Memory