Integrations

Reporting Reqnroll test results to ReportPortal

arrow leftBack to blog
userReportPortal Team
calendarMay 8, 2025

If you are using the Reqnroll test framework for automation and want to track test results on the fly, integrating it with ReportPortal is a great choice.

To set this up, simply install the ReportPortal.Reqnroll NuGet package in your project containing the test scenarios. This package acts as an agent between Reqnroll and ReportPortal, automatically streaming test outcomes as they run, allowing you to monitor execution without waiting for the entire test suite to finish.

In this article, we’ll explore how to integrate the Reqnroll test framework with ReportPortal using our agent. You’ll learn how to install and configure the Reqnroll agent, execute tests, and enrich them with logs, attachments, and nested steps. Once integrated, your test results will be automatically sent to ReportPortal, allowing you to monitor them in real time and generate a Reqnroll test report to extract valuable insights into test execution across your projects.

Installing the Reqnroll Agent

To install ReportPortal.Reqnroll package, execute the following command:  

```cmd 
dotnet add package ReportPortal.Reqnroll 
``` 

This will add the necessary dependencies to your project, enabling seamless communication with the ReportPortal server.

Configuration of the Agent

Once the agent is installed, you need to configure it to communicate with your ReportPortal server. This is done by adding a `ReportPortal.json` file to your test project. Ensure that the file's property `Copy to Output Directory` is set to `Copy if newer`.

Here is an example of a `ReportPortal.json` configuration file:  

```json 
{ 
  "$schema": "https://raw.githubusercontent.com/reportportal/agent-dotnet-reqnroll/master/src/ReportPortal.ReqnrollPlugin/ReportPortal.config.schema", 
  "server": { 
    "url": " https://demo.reportportal.io", 
    "project": "default_project", 
    "apiKey": " RnR_Ws6Qrrl1TE6AmqdgqKoKeQNs0dgkd5bcqLkM9p0O_YDnOfP4VEzN7WIyyn5C0c14" 
  }, 
  "launch": { 
    "name": "Reqnroll Demo Launch", 
    "description": "this is description", 
    "attributes": [ "t1", "os:win10" ] 
  } 
} 
``` 

Key Configuration Properties:

  • `server.url`: The URL of your ReportPortal server, including the protocol (e.g., `https://rp.epam.com`).

  • `server.project`: The name of the project in ReportPortal where the test results will be reported.

  • `server.apiKey`: The API key for authenticating with the ReportPortal server. You can find this in your user profile on the ReportPortal UI.

  • `launch.name`: The name of the test launch.

  • `launch.description`: A brief description of the test launch.

  • `launch.attributes`: Custom attributes for the launch, such as tags or metadata. 

Descriptions and attributes can be used to specify additional information about the test launch or individual test cases. For making the most out of attributes, have a look at the best practices. Attributes also can be helpful for filtering test results and building widgets like "Component Health Check".

For advanced configurations, such as environment variables, directory sources, or HTTP settings (e.g., proxy, timeout, retries), refer to the official documentation.

Adding Logs to Reqnroll Test Results 

Logs provide detailed information about test execution, including errors, warnings, and debug information.

To add logs:

  • Configure the logging framework in your project. 

  • Use the logging framework's API to capture logs during test execution and send them to ReportPortal.

You can integrate one of the next logging frameworks:  

Example (using Serilog):

Log.Information("Test started");
Log.Error("An error occurred during test execution");

Logs will appear in ReportPortal under the test item details.    More details on logging enhancements (including attachments and nested steps).

Running Reqnroll Tests

After configuring the agent, you can execute your Reqnroll tests as usual. The agent will automatically capture the test results and send them to the configured ReportPortal server.

Reqnroll test results in ReportPortal

Monitoring Reqnroll Test Results in ReportPortal

Following these steps, you can enhance your Reqnroll integration with ReportPortal and take full advantage of its advanced reporting capabilities. ReportPortal provides detailed visualization of your automation workflow, enabling you to monitor test automation metrics, generate reports, and assess the stability of your project.

Useful links:

Agent documentation

Other available integrations