Skip to content

Repository files navigation

GitHub Test Logger

Unit Test logger for Visual Studio Test Platform (vstest) and GitHub actions

CIRelease

Screenshot

Screenshot

Packages

StableCI
GitHub.TestLoggerNugetGPR

Usage

Github Test Logger can report test results automatically to your GitHub workflow.

⚠️ This logger can only be used from within a GitHub workflow, since it requires several environment variables provided by GitHub to access the GitHub Api.

For a complete example: githubtestlogger-example

Add a reference to the GitHub Logger nuget package in your test project:

#Package managerInstall-Package GitHub.TestLogger -Version 1.0.0

or

#CLI
dotnet add package GitHub.TestLogger --version 1.0.0

Use the following command line in tests

dotnet test --logger "github;GITHUB_TOKEN=${{secrets.GITHUB_TOKEN}}"

Parameters

Parameters can be set with the command line, or through Environment variables.

NameParameterEnvironmentDefault
Github token (mandatory)GITHUB_TOKEN[N/A]The github token that will be used to access the GitHub Api to publish the test results. Usually ${{secrets.GITHUB_TOKEN}}
Name (optional)nameGHL_CHECKRUN_NAMEThe job name the test report will be published under.test-report

Eg. to publish test result with name "my-test-report":

dotnet test --logger "github;name=my-test-report;GITHUB_TOKEN=${{secrets.GITHUB_TOKEN}}"

LICENSE

MIT

About

Unit Test logger for VSTest and GitHub actions

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages