Skip to content

Commit 3738454

Browse files
authored
feature: update dependencies and add .net 9 support (#44)
* feature: update dependencies and add .net 9 support * tests: put integration tests in collection --------- Co-authored-by: Kurt <>
1 parent eeff30b commit 3738454

33 files changed

+1152
-1880
lines changed

README.md

Lines changed: 65 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,28 @@ Liquid Test Reports are logger extensions for the [Visual Studio Test Platform](
44

55
## Packages
66

7-
| Package | Version | Description |
8-
| ---------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
9-
| `LiquidTestReports.Cli` | [![NuGet Badge](https://buildstats.info/nuget/LiquidTestReports.Cli?includePreReleases=true)](https://www.nuget.org/packages/LiquidTestReports.Cli) | Command line tool to combine and convert TRX and JUnit tests reports into Markdown with Liquid template support |
10-
| `LiquidTestReports.Markdown` | [![NuGet Badge](https://buildstats.info/nuget/LiquidTestReports.Markdown?includePreReleases=false)](https://www.nuget.org/packages/LiquidTestReports.Markdown) | VS Test logger for generating test reports in Markdown format |
11-
| `LiquidTestReports.Custom` | [![NuGet Badge](https://buildstats.info/nuget/LiquidTestReports.Custom?includePreReleases=false)](https://www.nuget.org/packages/LiquidTestReports.Custom) | VS Test logger for generating reports from user provided liquid templates |
12-
| `LiquidTestReports.Core` | [![NuGet Badge](https://buildstats.info/nuget/LiquidTestReports.Core?includePreReleases=false)](https://www.nuget.org/packages/LiquidTestReports.Core) | Core library for creating custom VS Test loggers with liquid template support |
7+
| Package | Version | Description |
8+
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
9+
| `LiquidTestReports.Cli` | [![NuGet Downloads](https://img.shields.io/nuget/dt/LiquidTestReports.Cli)](https://www.nuget.org/packages/LiquidTestReports.Cli) | Command line tool to combine and convert TRX and JUnit tests reports into Markdown with Liquid template support |
10+
| `LiquidTestReports.Markdown` | [![NuGet Downloads](https://img.shields.io/nuget/dt/LiquidTestReports.Markdown)](https://www.nuget.org/packages/LiquidTestReports.Markdown) | VS Test logger for generating test reports in Markdown format |
11+
| `LiquidTestReports.Custom` | [![NuGet Downloads](https://img.shields.io/nuget/dt/LiquidTestReports.Custom)](https://www.nuget.org/packages/LiquidTestReports.Custom) | VS Test logger for generating reports from user provided liquid templates |
12+
| `LiquidTestReports.Core` | [![NuGet Downloads](https://img.shields.io/nuget/dt/LiquidTestReports.Core)](https://www.nuget.org/packages/LiquidTestReports.Core) | Core library for creating custom VS Test loggers with liquid template support |
1313

1414
## Changelog
1515

1616
### Latest:
1717

18+
- [All]
19+
- Add support for
20+
- .NET 9
21+
- Drop support for the following EOL frameworks
22+
- .NET 6
23+
- .NET 7
24+
1825
#### 2.0.0-beta.2
1926

2027
- [All]
21-
- Add support for
28+
- Add support for
2229
- .NET 7
2330
- .NET 8
2431
- Drop support for the following EOL frameworks
@@ -35,22 +42,22 @@ Liquid Test Reports are logger extensions for the [Visual Studio Test Platform](
3542

3643
#### 1.3.2 beta
3744

38-
- [Cli]
45+
- [Cli]
3946
- Add filename pattern matching support for CLI
4047

4148
#### 1.2.1 beta
4249

43-
- [Cli]
50+
- [Cli]
4451
- Add JUnit XML support
4552
- Change template input to use file instead of content string
4653

4754
[Previous changes](./docs/Changelog.md)
4855

49-
5056
## LiquidTestReports.Cli (Beta):
51-
[![NuGet Badge](https://buildstats.info/nuget/LiquidTestReports.Cli?includePreReleases=true)](https://www.nuget.org/packages/LiquidTestReports.Cli)
5257

53-
Generate Markdown or Custom Test Reports from existing TRX files
58+
[![NuGet Downloads](https://img.shields.io/nuget/dt/LiquidTestReports.Cli)](https://www.nuget.org/packages/LiquidTestReports.Cli)
59+
60+
Generate Markdown or Custom Test Reports from existing TRX files
5461

5562
#### Installation
5663

@@ -64,23 +71,24 @@ dotnet tool install --global LiquidTestReports.Cli --version 2.0.0-beta.2
6471
liquid [options]
6572
```
6673

67-
**Options:**
74+
**Options:**
75+
76+
**--inputs [inputs]** Array of formatted configuration strings for test report inputs, with configurations separated by a semicolon
6877

69-
**--inputs [inputs]** Array of formatted configuration strings for test report inputs, with configurations separated by a semicolon
70-
- **File=file-name;** The path or glob pattern for input file/s
71-
- **Folder=folder-name;** - Base directory for finding test files
72-
- **Format=report-format;** Optional input report format, case insensitive, supported values are `Trx` of `JUnit`. Defaults to `Trx`.
73-
- **GroupTitle=group-title;** Optional title to group reports under, test runs with the same group title will be merged.
74-
- **TestPrefix=test-prefix;** Optional test suffix, if provided test origination for the provided report will have the suffix appended to its name.
75-
- **key=value;** Optional key value pairs, only for custom template usage.
78+
- **File=file-name;** The path or glob pattern for input file/s
79+
- **Folder=folder-name;** - Base directory for finding test files
80+
- **Format=report-format;** Optional input report format, case insensitive, supported values are `Trx` of `JUnit`. Defaults to `Trx`.
81+
- **GroupTitle=group-title;** Optional title to group reports under, test runs with the same group title will be merged.
82+
- **TestPrefix=test-prefix;** Optional test suffix, if provided test origination for the provided report will have the suffix appended to its name.
83+
- **key=value;** Optional key value pairs, only for custom template usage.
7684

7785
**--parameters [parameters]** Array of formatted key value strings for custom template usage, with configurations separated by a semicolon
7886

7987
**--output-file [output-file]** Path to save test report to.
8088

8189
**--title [title]** Optional overall report title displayed in default report template. Defaults to "Test Run".
8290

83-
**--template [template]** Optional user defined liquid template. Defaults to the multi report markdown template is used.
91+
**--template [template]** Optional user defined liquid template. Defaults to the multi report markdown template is used.
8492

8593
**--version** Show version information.
8694

@@ -91,123 +99,117 @@ liquid [options]
9199
**JUnit to Markdown**
92100

93101
```bash
94-
liquid --inputs "File=xUnit-net461-junit-sample.xml;Format=JUnit" --output-file report.md
102+
liquid --inputs "File=xUnit-net461-junit-sample.xml;Format=JUnit" --output-file report.md
95103
```
96104

97105
**TRX to Markdown** - [Sample Output](docs/samples/cli/SingleInput.md)
98106

99107
```bash
100-
liquid --inputs "File=xUnit-net461-sample.trx;Format=Trx" --output-file SingleInput.md
108+
liquid --inputs "File=xUnit-net461-sample.trx;Format=Trx" --output-file SingleInput.md
101109
```
102110

103-
**Multiple Report inputs, grouping, and custom template usage**
111+
**Multiple Report inputs, grouping, and custom template usage**
104112

105113
- [More Examples](./docs/CliExamples.md)
106114

107-
108115
#### Removal
109116

110-
**Global tool removal:**
117+
**Global tool removal:**
111118

112119
```bash
113120
dotnet tool uninstall LiquidTestReports.Cli -g
114121
```
115122

116123
## LiquidTestReports.Markdown
117-
[![NuGet Badge](https://buildstats.info/nuget/LiquidTestReports.Markdown?includePreReleases=false)](https://www.nuget.org/packages/LiquidTestReports.Markdown)
118124

119-
The Markdown logger package is a ready to use implementation of the test logger that generates Markdown format reports.
125+
[![NuGet Downloads](https://img.shields.io/nuget/dt/LiquidTestReports.Markdown)](https://www.nuget.org/packages/LiquidTestReports.Markdown)
126+
127+
The Markdown logger package is a ready to use implementation of the test logger that generates Markdown format reports.
120128

121129
[Sample Report](docs/samples/xUnit.md)
122130

123131
**How to use**:
124132

125133
1. Install the markdown logger to your test project by running the following command
126-
`dotnet add package LiquidTestReports.Markdown`
127-
134+
`dotnet add package LiquidTestReports.Markdown`
128135
2. Run the tests using the supplied logger
129-
`dotnet test --logger "liquid.md"`
130-
136+
`dotnet test --logger "liquid.md"`
131137
3. Report will be generated in the test results folder
132138

133-
134139
See also: [Testing .NET Core Apps with GitHub Actions](https://dev.to/kurtmkurtm/testing-net-core-apps-with-github-actions-3i76)
135140

136-
137141
## LiquidTestReports.Custom
138-
[![NuGet Badge](https://buildstats.info/nuget/LiquidTestReports.Custom?includePreReleases=false)](https://www.nuget.org/packages/LiquidTestReports.Custom)
139142

140-
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](docs/Properties.md).
143+
[![NuGet Downloads](https://img.shields.io/nuget/dt/LiquidTestReports.Custom)](https://www.nuget.org/packages/LiquidTestReports.Custom)
144+
145+
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](docs/Properties.md).
141146

142147
[Sample Report](docs/samples/xUnit.txt) (using example template below)
143148

144149
**How to use:**
145150

146151
1. Install the core logger to your test project either using the nuget or by running the following command
147-
148-
`dotnet add package LiquidTestReports.Custom`
152+
153+
`dotnet add package LiquidTestReports.Custom`
149154

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

152-
```TemplateExample.txt
153-
Test Statistics:
154-
155-
None: {{ run.test_run_statistics.none_count }}
156-
Passed: {{ run.test_run_statistics.passed_count }}
157-
Failed: {{ run.test_run_statistics.failed_count }}
158-
Skipped: {{ run.test_run_statistics.skipped_count }}
159-
Not Found: {{ run.test_run_statistics.not_found_count }}
160-
Total: {{ run.test_run_statistics.executed_tests_count }}
161-
162-
```
157+
```TemplateExample.txt
158+
Test Statistics:
163159
164-
3. Run the tests using the supplied logger
160+
None: {{ run.test_run_statistics.none_count }}
161+
Passed: {{ run.test_run_statistics.passed_count }}
162+
Failed: {{ run.test_run_statistics.failed_count }}
163+
Skipped: {{ run.test_run_statistics.skipped_count }}
164+
Not Found: {{ run.test_run_statistics.not_found_count }}
165+
Total: {{ run.test_run_statistics.executed_tests_count }}
165166
166-
`dotnet test --logger "liquid.custom;Template=TemplateExample.txt"`
167+
```
167168

168-
4. Report will be generated in the test results folder
169+
3. Run the tests using the supplied logger
169170

171+
`dotnet test --logger "liquid.custom;Template=TemplateExample.txt"`
170172

173+
4. Report will be generated in the test results folder
171174

172175
For a more detailed example, take a look at included [Markdown template](./src/LiquidTestReports.Markdown/Resources/MdReport.md).
173176

174-
*More liquid template and syntax documentation is available on the [Shopify Github](https://shopify.github.io/liquid/basics/introduction/).*
177+
_More liquid template and syntax documentation is available on the [Shopify Github](https://shopify.github.io/liquid/basics/introduction/)._
175178

176179
## LiquidTestReports.Core
177-
[![NuGet Badge](https://buildstats.info/nuget/LiquidTestReports.Core?includePreReleases=false)](https://www.nuget.org/packages/LiquidTestReports.Core)
180+
181+
[![NuGet Downloads](https://img.shields.io/nuget/dt/LiquidTestReports.Core)](https://www.nuget.org/packages/LiquidTestReports.Core)
178182

179183
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.
180184

181185
**How to install**:
182186

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

185-
`dotnet add package LiquidTestReports.Core`
189+
`dotnet add package LiquidTestReports.Core`
186190

187-
188-
## Compatibility
191+
## Compatibility
189192

190193
**.NET 4.5.1+ and .NET Core 3.0+**
191194

192195
No additional configuration is required.
193196

194197
**.NET Core 2.1 - 2.2**
195198

196-
By default, the logger will not be copied to the output folder, and will not be discovered.
197-
To use with these versions, include `CopyLocalLockFileAssemblies` in your test project. This will copy the logger to your output folder.
199+
By default, the logger will not be copied to the output folder, and will not be discovered.
200+
To use with these versions, include `CopyLocalLockFileAssemblies` in your test project. This will copy the logger to your output folder.
198201

199-
``` xml
202+
```xml
200203
<PropertyGroup>
201204
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
202205
</PropertyGroup>
203206
```
204207

205-
*Note: this will also copy other NuGet dependencies into your output folder*
208+
_Note: this will also copy other NuGet dependencies into your output folder_
206209

207210
**.NET Core 2.0**
208211

209-
Issues appear to be present in testing with .NET Core 2.0, as this target is no longer supported, it is recommended to update to supported version of .NET Core.
210-
212+
Issues appear to be present in testing with .NET Core 2.0, as this target is no longer supported, it is recommended to update to supported version of .NET Core.
211213

212214
## License
213215

@@ -221,4 +223,3 @@ This library utilises the following libraries under the MIT License
221223

222224
- **Microsoft - VSTest** - https://github.com/microsoft/vstest/blob/master/LICENSE
223225
- **Spectre.Console** - https://github.com/spectreconsole/spectre.console
224-

scripts/createjunitfiles.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
dotnet test ../test/SampleProject/SampleProject.Tests.xUnit -l "junit;LogFilePath=TestResults/xUnit-net8.0-junit-sample.xml" -f net8.0
22
dotnet test ../test/SampleProject/SampleProject.Tests.NUnit -l "junit;LogFilePath=TestResults/NUnit-net8.0-junit-sample.xml" -f net8.0
33
dotnet test ../test/SampleProject/SampleProject.Tests.MSTest -l "junit;LogFilePath=TestResults/MSTest-net8.0-junit-sample.xml" -f net8.0
4-
dotnet test ../test/SampleProject/SampleProject.Tests.xUnit -l "junit;LogFilePath=TestResults/xUnit-net6.0-junit-sample.xml" -f net6.0
5-
dotnet test ../test/SampleProject/SampleProject.Tests.NUnit -l "junit;LogFilePath=TestResults/NUnit-net6.0-junit-sample.xml" -f net6.0
6-
dotnet test ../test/SampleProject/SampleProject.Tests.MSTest -l "junit;LogFilePath=TestResults/MSTest-net6.0-junit-sample.xml" -f net6.0
4+
dotnet test ../test/SampleProject/SampleProject.Tests.xUnit -l "junit;LogFilePath=TestResults/xUnit-net9.0-junit-sample.xml" -f net9.0
5+
dotnet test ../test/SampleProject/SampleProject.Tests.NUnit -l "junit;LogFilePath=TestResults/NUnit-net9.0-junit-sample.xml" -f net9.0
6+
dotnet test ../test/SampleProject/SampleProject.Tests.MSTest -l "junit;LogFilePath=TestResults/MSTest-net9.0-junit-sample.xml" -f net9.0
77
Move-Item -Path ../test/SampleProject/SampleProject.Tests.xUnit/TestResults/*-junit-sample.xml -Destination ../test/LiquidTestReports.Cli.Tests/JUnitTestInput/ -force
88
Move-Item -Path ../test/SampleProject/SampleProject.Tests.MSTest/TestResults/*-junit-sample.xml -Destination ../test/LiquidTestReports.Cli.Tests/JUnitTestInput/ -force
99
Move-Item -Path ../test/SampleProject/SampleProject.Tests.NUnit/TestResults/*-junit-sample.xml -Destination ../test/LiquidTestReports.Cli.Tests/JUnitTestInput/ -force

scripts/createtrxfiles.ps1

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
# TRX
12
dotnet test ../test/SampleProject/SampleProject.Tests.xUnit -l "trx;LogFileName=xUnit-net8.0-sample.trx" -f net8.0
23
dotnet test ../test/SampleProject/SampleProject.Tests.NUnit -l "trx;LogFileName=NUnit-net8.0-sample.trx" -f net8.0
34
dotnet test ../test/SampleProject/SampleProject.Tests.MSTest -l "trx;LogFileName=MSTest-net8.0-sample.trx" -f net8.0
4-
dotnet test ../test/SampleProject/SampleProject.Tests.xUnit -l "trx;LogFileName=xUnit-net6.0-sample.trx" -f net6.0
5-
dotnet test ../test/SampleProject/SampleProject.Tests.NUnit -l "trx;LogFileName=NUnit-net6.0-sample.trx" -f net6.0
6-
dotnet test ../test/SampleProject/SampleProject.Tests.MSTest -l "trx;LogFileName=MSTest-net6.0-sample.trx" -f net6.0
5+
dotnet test ../test/SampleProject/SampleProject.Tests.xUnit -l "trx;LogFileName=xUnit-net9.0-sample.trx" -f net9.0
6+
dotnet test ../test/SampleProject/SampleProject.Tests.NUnit -l "trx;LogFileName=NUnit-net9.0-sample.trx" -f net9.0
7+
dotnet test ../test/SampleProject/SampleProject.Tests.MSTest -l "trx;LogFileName=MSTest-net9.0-sample.trx" -f net9.0
78
Move-Item -Path ../test/SampleProject/SampleProject.Tests.xUnit/TestResults/*-sample.trx -Destination ../test/LiquidTestReports.Cli.Tests/TrxTestInput/ -force
89
Move-Item -Path ../test/SampleProject/SampleProject.Tests.MSTest/TestResults/*-sample.trx -Destination ../test/LiquidTestReports.Cli.Tests/TrxTestInput/ -force
9-
Move-Item -Path ../test/SampleProject/SampleProject.Tests.NUnit/TestResults/*-sample.trx -Destination ../test/LiquidTestReports.Cli.Tests/TrxTestInput/ -force
10+
Move-Item -Path ../test/SampleProject/SampleProject.Tests.NUnit/TestResults/*-sample.trx -Destination ../test/LiquidTestReports.Cli.Tests/TrxTestInput/ -force

src/LiquidTestReports.Cli/LiquidTestReports.Cli.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
5+
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
66
<PackAsTool>true</PackAsTool>
77
<ToolCommandName>liquid</ToolCommandName>
88
<PackageOutputPath>./nupkg</PackageOutputPath>
@@ -16,8 +16,8 @@
1616
<PackageReadmeFile>README.md</PackageReadmeFile>
1717
</PropertyGroup>
1818
<ItemGroup>
19-
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" Version="8.0.0" />
20-
<PackageReference Include="Spectre.Console" Version="0.48.0" />
19+
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" Version="9.0.0" />
20+
<PackageReference Include="Spectre.Console" Version="0.49.1" />
2121
<PackageReference Include="System.CommandLine.DragonFruit" Version="0.4.0-alpha.22272.1" />
2222
</ItemGroup>
2323
<ItemGroup>

src/LiquidTestReports.Core/LiquidTestReports.Core.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
44
<AssemblyName>LiquidTestReports.Core</AssemblyName>
5-
<TargetFrameworks>netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
5+
<TargetFrameworks>netstandard2.0;net8.0;net9.0</TargetFrameworks>
66
<RepositoryUrl>https://github.com/kurtmkurtm/LiquidTestReports</RepositoryUrl>
77
<PackageProjectUrl>https://github.com/kurtmkurtm/LiquidTestReports</PackageProjectUrl>
88
<PackageLicenseFile>LICENSE</PackageLicenseFile>
@@ -11,8 +11,8 @@
1111
</PropertyGroup>
1212
<ItemGroup>
1313
<PackageReference Include="DotLiquid" Version="2.2.692" />
14-
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="17.9.0" />
15-
<PackageReference Include="NuGet.Frameworks" Version="6.9.1" />
14+
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="17.11.1" />
15+
<PackageReference Include="NuGet.Frameworks" Version="6.12.1" />
1616
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
1717
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />
1818
<PackageReference Include="System.ValueTuple" Version="4.5.0" />

src/LiquidTestReports.Custom/LiquidTestReports.Custom.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
44
<AssemblyName>LiquidTestReports.Custom.TestLogger</AssemblyName>
5-
<TargetFrameworks>netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
5+
<TargetFrameworks>netstandard2.0;net8.0;net9.0</TargetFrameworks>
66
<RepositoryUrl>https://github.com/kurtmkurtm/LiquidTestReports</RepositoryUrl>
77
<PackageProjectUrl>https://github.com/kurtmkurtm/LiquidTestReports</PackageProjectUrl>
88
<PackageLicenseFile>LICENSE</PackageLicenseFile>
@@ -24,7 +24,7 @@
2424
</None>
2525
</ItemGroup>
2626
<ItemGroup>
27-
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="17.9.0" />
27+
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="17.11.1" />
2828
</ItemGroup>
2929
<ItemGroup>
3030
<ProjectReference Include="..\LiquidTestReports.Core\LiquidTestReports.Core.csproj" />

0 commit comments

Comments
 (0)