Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Update tool to run with .Net 6.0.0 #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions src/TrxToHtml.Test/TrxToHtml.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<CodeAnalysisRuleSet>..\stylecop.ruleset</CodeAnalysisRuleSet>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand All @@ -11,11 +11,17 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Include="xunit" Version="2.4.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
<PackageReference Include="coverlet.collector" Version="1.2.0" />
<PackageReference Include="FluentAssertions" Version="6.7.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
12 changes: 6 additions & 6 deletions src/TrxToHtml/TrxToHtml.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<CodeAnalysisRuleSet>..\stylecop.ruleset</CodeAnalysisRuleSet>
<PackAsTool>true</PackAsTool>
<ToolCommandName>trx-to-html</ToolCommandName>
<Authors>Samhammer AG</Authors>
<Company>Samhammer AG</Company>
<RepositoryUrl>https://github.com/SamhammerAG/TrxToHtml</RepositoryUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Version>1.0.1</Version>
<Version>6.0.0</Version>
<PackageId>Samhammer.TrxToHtml</PackageId>
</PropertyGroup>
<ItemGroup>
Expand All @@ -19,9 +19,9 @@
<EmbeddedResource Include="Template.html" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.8.0" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="1.1.0" />
<PackageReference Include="Scriban" Version="2.1.4" />
<PackageReference Include="CommandLineParser" Version="2.9.1" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="6.0.6" />
<PackageReference Include="Scriban" Version="5.4.6" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
7 changes: 6 additions & 1 deletion src/TrxToHtml/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@
total = 0
failed = 0
passed = 0
time = 0
for run in TestRuns
total = total + run.ResultSummary.Counters.total
failed = failed + run.ResultSummary.Counters.failed
passed = passed + run.ResultSummary.Counters.passed
for result in run.Results
time = time + (timespan.parse result.duration).TotalMilliseconds
end
end
}}
<body>
Expand All @@ -21,6 +25,7 @@ <h1>Test Results</h1>
<span>Total:</span>&nbsp; <span class="total">{{ total }}</span>
<span>Passed:</span>&nbsp; <span class="passed">{{ passed }}</span>
<span>Failed:</span>&nbsp; <span class="failed">{{ failed }}</span>
<span>Time:</span>&nbsp; <span class="total">{{ time | math.format "0s 000ms" }}</span>
</p>

{{~ if failed > 0 ~}}
Expand Down Expand Up @@ -58,7 +63,7 @@ <h2>All Results</h2>
</td>
<td>{{ result.outcome }}</td>
<td>{{ result.testName | html.escape }}</td>
<td class="duration">{{ result.duration | (timespan.parse).TotalMilliseconds | math.ceil }}ms</td>
<td class="duration">{{ (timespan.parse result.duration).TotalMilliseconds }}ms</td>
</tr>
{{~ end ~}}
{{~ end ~}}
Expand Down