Skip to content

muttonchop/agent-net-vstest

 
 

Repository files navigation

Build status

Installation

NuGet version

Install ReportPortal.VSTest.TestLogger NuGet package into your project with tests.

Configuration

Add new ReportPortal.config.json file into your project with Copy if newer value for Copy to Output Directory property.

Example of config file:

{
  "$schema": "https://raw.githubusercontent.com/reportportal/agent-net-vstest/master/ReportPortal.VSTest.TestLogger/ReportPortal.config.schema",
  "enabled": true,
  "server": {
    "url": "https://rp.epam.com/api/v1/",
    "project": "default_project",
    "authentication": {
      "uuid": "7853c7a9-7f27-43ea-835a-cab01355fd17"
    }
  },
  "launch": {
    "name": "VS Test Demo Launch",
    "description": "this is description",
    "debugMode": true,
    "tags": [ "t1", "t2" ]
  }
}

Results publishing

To publish test results in real-time to the ReportPortal specify Logger argument.

vstest.console.exe

vstest.console.exe MyTests.dll /TestAdapterPath:. /Logger:ReportPortal

dotnet vstest

dotnet vstest MyTests.dll --logger:ReportPortal

In case if you see Could not find a test logger with AssemblyQualifiedName, URI or FriendlyName 'ReportPortal'. error message after executing tests, and your target framework is netcoreapp, it's recommended to make dotnet publish before executing tests. It's needed to copy TestLogger with dependencies to output folder, so vstest is able to discover TestLogger.

Parameters overriding

--logger:ReportPortal;Launch.Name="My new launch name"

Supported parameters

  • Launch.Name

  • Launch.Description

  • Launch.Tags - comma-separated list

  • Launch.IsDebugMode - true/false

  • Server.Project

  • Server.Authentication.Uuid

About

Logger extension for VsTest

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%