Skip to content

NightOwl888/LiquidTestReports

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Liquid Test Reports are logger extensions for the Visual Studio Test Platform that provide flexible test report generation using liquid templates. This project contains an extensible core for code based extension, a custom logger for providing your own templates without code, and a Markdown implementation.

Changelog

Latest:

1.0.1

  • Remove pre-release tags 🎉
  • Fix: Create drop for test result messages, and replace URIs with strings

Previous changes

LiquidTestReports.Markdown

NuGet Badge

The Markdown logger package is a ready to use implementation of the test logger that generates Markdown format reports.

Sample Report

How to use:

  1. Install the markdown logger to your test project by running the following command dotnet add package LiquidTestReports.Markdown

  2. Run the tests using the supplied logger dotnet test --logger "liquid.md"

  3. Report will be generated in the test results folder

See also: Testing .NET Core Apps with GitHub Actions

LiquidTestReports.Custom

NuGet Badge

The custom logger package allows you to create your own reports simply by passing the file path of the template to the test logger. The list of template properties are available here.

Sample Report (using example template below)

How to use:

  1. Install the core logger to your test project either using the nuget or by running the following command

    dotnet add package LiquidTestReports.Custom

  2. Add a new text file to your test project, and set Copy to Output Directory asCopy always, below is a starting sample template

Test Statistics:

None: {{ run.test_run_statistics.none_count }}
Passed: {{ run.test_run_statistics.passed_count }}
Failed: {{ run.test_run_statistics.failed_count }}
Skipped: {{ run.test_run_statistics.skipped_count }}
Not Found: {{ run.test_run_statistics.not_found_count }}
Total: {{ run.test_run_statistics.executed_tests_count }}
  1. Run the tests using the supplied logger

    dotnet test --logger "liquid.custom;TemplateExample.txt"

  2. Report will be generated in the test results folder

For a more detailed example, take a look at included Markdown template.

More liquid template and syntax documentation is available on the Shopify Github.

LiquidTestReports.Core

NuGet Badge

The core project is utilised by the above two loggers and can be used to implement your own, however, this is yet to be documented. The custom and markdown implementations provide an guide of how to implement this.

How to install:

  1. Install the core logger to your test project either using the nuget or by running the following command

    dotnet add package LiquidTestReports.Core

License

LiquidTestReports is under BSD 2-Clause License.

This library utilises the following libraries under the Apache 2.0 license

This library utilises the following libraries under the MIT License

About

Template driven reporting VS Test providing Markdown and Liquid Template test loggers

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 99.5%
  • PowerShell 0.5%