Compare commits

...

2 Commits

Author SHA1 Message Date
dependabot[bot]
181063afcd Bump fantomas from 6.3.7 to 6.3.9 (#58)
* Bump WoofWare.Myriad.Plugins.Attributes from 3.1.4 to 3.1.6

Bumps [WoofWare.Myriad.Plugins.Attributes](https://github.com/Smaug123/WoofWare.Myriad) from 3.1.4 to 3.1.6.
- [Release notes](https://github.com/Smaug123/WoofWare.Myriad/releases)
- [Changelog](https://github.com/Smaug123/WoofWare.Myriad/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Smaug123/WoofWare.Myriad/compare/WoofWare.Myriad.Plugins.Attributes.3.1.4...WoofWare.Myriad.Plugins.Attributes.3.1.6)

---
updated-dependencies:
- dependency-name: WoofWare.Myriad.Plugins.Attributes
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump ApiSurface from 4.0.40 to 4.0.41

Bumps [ApiSurface](https://github.com/G-Research/ApiSurface) from 4.0.40 to 4.0.41.
- [Release notes](https://github.com/G-Research/ApiSurface/releases)
- [Commits](https://github.com/G-Research/ApiSurface/compare/ApiSurface.4.0.40...ApiSurface.4.0.41)

---
updated-dependencies:
- dependency-name: ApiSurface
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump fantomas from 6.3.7 to 6.3.9

Bumps [fantomas](https://github.com/fsprojects/fantomas) from 6.3.7 to 6.3.9.
- [Release notes](https://github.com/fsprojects/fantomas/releases)
- [Changelog](https://github.com/fsprojects/fantomas/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fsprojects/fantomas/compare/v6.3.7...v6.3.9)

---
updated-dependencies:
- dependency-name: fantomas
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump WoofWare.DotnetRuntimeLocator from 0.1.3 to 0.1.4

Bumps [WoofWare.DotnetRuntimeLocator](https://github.com/Smaug123/WoofWare.DotnetRuntimeLocator) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/Smaug123/WoofWare.DotnetRuntimeLocator/releases)
- [Commits](https://github.com/Smaug123/WoofWare.DotnetRuntimeLocator/compare/WoofWare.DotnetRuntimeLocator.0.1.3...WoofWare.DotnetRuntimeLocator.0.1.4)

---
updated-dependencies:
- dependency-name: WoofWare.DotnetRuntimeLocator
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Deps

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Smaug123 <3138005+Smaug123@users.noreply.github.com>
2024-06-10 18:42:15 +01:00
Patrick Stevens
41a39ca159 No empty namespaces in TRX reports (#60) 2024-06-10 18:08:16 +01:00
5 changed files with 44 additions and 41 deletions

View File

@@ -3,7 +3,7 @@
"isRoot": true, "isRoot": true,
"tools": { "tools": {
"fantomas": { "fantomas": {
"version": "6.3.7", "version": "6.3.9",
"commands": [ "commands": [
"fantomas" "fantomas"
] ]

View File

@@ -3,6 +3,11 @@ namespace TestRunner
open System open System
open System.Xml open System.Xml
[<RequireQualifiedAccess>]
module private XmlUtil =
[<Literal>]
let NS = "http://microsoft.com/schemas/VisualStudio/TeamTest/2010"
/// Describes the times at which a complete test run went through state transitions. /// Describes the times at which a complete test run went through state transitions.
/// These all have semantics specific to the test runner, and I have not rigorously worked out what /// These all have semantics specific to the test runner, and I have not rigorously worked out what
/// semantics NUnit has, so take these with considerable amounts of salt. /// semantics NUnit has, so take these with considerable amounts of salt.
@@ -22,8 +27,7 @@ type TrxReportTimes =
} }
member internal this.toXml (doc : XmlDocument) : XmlNode = member internal this.toXml (doc : XmlDocument) : XmlNode =
let node = let node = doc.CreateElement ("Times", XmlUtil.NS)
doc.CreateElement ("Times", "http://microsoft.com/schemas/VisualStudio/TeamTest/2010")
do do
let attr = doc.CreateAttribute "creation" let attr = doc.CreateAttribute "creation"
@@ -113,7 +117,7 @@ type TrxDeployment =
} }
member internal this.toXml (doc : XmlDocument) : XmlNode = member internal this.toXml (doc : XmlDocument) : XmlNode =
let node = doc.CreateElement "Deployment" let node = doc.CreateElement ("Deployment", XmlUtil.NS)
do do
let attr = doc.CreateAttribute "runDeploymentRoot" let attr = doc.CreateAttribute "runDeploymentRoot"
@@ -149,7 +153,7 @@ type TrxTestSettings =
} }
member internal this.toXml (doc : XmlDocument) : XmlNode = member internal this.toXml (doc : XmlDocument) : XmlNode =
let node = doc.CreateElement "TestSettings" let node = doc.CreateElement ("TestSettings", XmlUtil.NS)
do do
let attr = doc.CreateAttribute "name" let attr = doc.CreateAttribute "name"
@@ -243,13 +247,13 @@ type TrxErrorInfo =
} }
member internal this.toXml (doc : XmlDocument) : XmlNode = member internal this.toXml (doc : XmlDocument) : XmlNode =
let node = doc.CreateElement "ErrorInfo" let node = doc.CreateElement ("ErrorInfo", XmlUtil.NS)
match this.Message with match this.Message with
| None -> () | None -> ()
| Some message -> | Some message ->
let child = doc.CreateTextNode message let child = doc.CreateTextNode message
let messageNode = doc.CreateElement "Message" let messageNode = doc.CreateElement ("Message", XmlUtil.NS)
messageNode.AppendChild child |> ignore<XmlNode> messageNode.AppendChild child |> ignore<XmlNode>
node.AppendChild messageNode |> ignore<XmlNode> node.AppendChild messageNode |> ignore<XmlNode>
@@ -257,7 +261,7 @@ type TrxErrorInfo =
| None -> () | None -> ()
| Some stackTrace -> | Some stackTrace ->
let child = doc.CreateTextNode stackTrace let child = doc.CreateTextNode stackTrace
let stackTraceNode = doc.CreateElement "StackTrace" let stackTraceNode = doc.CreateElement ("StackTrace", XmlUtil.NS)
stackTraceNode.AppendChild child |> ignore<XmlNode> stackTraceNode.AppendChild child |> ignore<XmlNode>
node.AppendChild stackTraceNode |> ignore<XmlNode> node.AppendChild stackTraceNode |> ignore<XmlNode>
@@ -291,13 +295,13 @@ type TrxOutput =
} }
member internal this.toXml (doc : XmlDocument) : XmlNode = member internal this.toXml (doc : XmlDocument) : XmlNode =
let node = doc.CreateElement "Output" let node = doc.CreateElement ("Output", XmlUtil.NS)
match this.StdOut with match this.StdOut with
| None -> () | None -> ()
| Some stdout -> | Some stdout ->
let text = doc.CreateTextNode stdout let text = doc.CreateTextNode stdout
let childNode = doc.CreateElement "StdOut" let childNode = doc.CreateElement ("StdOut", XmlUtil.NS)
childNode.AppendChild text |> ignore<XmlNode> childNode.AppendChild text |> ignore<XmlNode>
node.AppendChild childNode |> ignore<XmlNode> node.AppendChild childNode |> ignore<XmlNode>
@@ -362,7 +366,7 @@ type TrxUnitTestResult =
} }
member internal this.toXml (doc : XmlDocument) : XmlNode = member internal this.toXml (doc : XmlDocument) : XmlNode =
let node = doc.CreateElement "UnitTestResult" let node = doc.CreateElement ("UnitTestResult", XmlUtil.NS)
do do
let attr = doc.CreateAttribute "executionId" let attr = doc.CreateAttribute "executionId"
@@ -582,7 +586,7 @@ type TrxTestMethod =
} }
member internal this.toXml (doc : XmlDocument) : XmlNode = member internal this.toXml (doc : XmlDocument) : XmlNode =
let node = doc.CreateElement "TestMethod" let node = doc.CreateElement ("TestMethod", XmlUtil.NS)
do do
let attr = doc.CreateAttribute "codeBase" let attr = doc.CreateAttribute "codeBase"
@@ -668,7 +672,7 @@ type TrxExecution =
} }
member internal this.toXml (doc : XmlDocument) : XmlNode = member internal this.toXml (doc : XmlDocument) : XmlNode =
let node = doc.CreateElement "Execution" let node = doc.CreateElement ("Execution", XmlUtil.NS)
do do
let attr = doc.CreateAttribute "id" let attr = doc.CreateAttribute "id"
@@ -723,7 +727,7 @@ type TrxUnitTest =
} }
member internal this.toXml (doc : XmlDocument) : XmlNode = member internal this.toXml (doc : XmlDocument) : XmlNode =
let node = doc.CreateElement "UnitTest" let node = doc.CreateElement ("UnitTest", XmlUtil.NS)
do do
let attr = doc.CreateAttribute "name" let attr = doc.CreateAttribute "name"
@@ -821,7 +825,7 @@ type TrxTestEntry =
} }
member internal this.toXml (doc : XmlDocument) : XmlNode = member internal this.toXml (doc : XmlDocument) : XmlNode =
let node = doc.CreateElement "TestEntry" let node = doc.CreateElement ("TestEntry", XmlUtil.NS)
do do
let attr = doc.CreateAttribute "testListId" let attr = doc.CreateAttribute "testListId"
@@ -905,7 +909,7 @@ type TrxTestListEntry =
} }
member internal this.toXml (doc : XmlDocument) : XmlNode = member internal this.toXml (doc : XmlDocument) : XmlNode =
let node = doc.CreateElement "TestList" let node = doc.CreateElement ("TestList", XmlUtil.NS)
do do
let attr = doc.CreateAttribute "name" let attr = doc.CreateAttribute "name"
@@ -998,7 +1002,7 @@ type TrxRunInfo =
} }
member internal this.toXml (doc : XmlDocument) : XmlNode = member internal this.toXml (doc : XmlDocument) : XmlNode =
let node = doc.CreateElement "RunInfo" let node = doc.CreateElement ("RunInfo", XmlUtil.NS)
do do
let attr = doc.CreateAttribute "computerName" let attr = doc.CreateAttribute "computerName"
@@ -1015,7 +1019,7 @@ type TrxRunInfo =
attr.Value <- this.Timestamp.ToString "o" attr.Value <- this.Timestamp.ToString "o"
node.Attributes.Append attr |> ignore<XmlAttribute> node.Attributes.Append attr |> ignore<XmlAttribute>
let childNode = doc.CreateElement "Text" let childNode = doc.CreateElement ("Text", XmlUtil.NS)
let textNode = doc.CreateTextNode this.Text let textNode = doc.CreateTextNode this.Text
childNode.AppendChild textNode |> ignore<XmlNode> childNode.AppendChild textNode |> ignore<XmlNode>
node.AppendChild childNode |> ignore<XmlNode> node.AppendChild childNode |> ignore<XmlNode>
@@ -1154,7 +1158,7 @@ type TrxCounters =
} }
member internal this.toXml (doc : XmlDocument) : XmlNode = member internal this.toXml (doc : XmlDocument) : XmlNode =
let node = doc.CreateElement "Counters" let node = doc.CreateElement ("Counters", XmlUtil.NS)
do do
let attr = doc.CreateAttribute "total" let attr = doc.CreateAttribute "total"
@@ -1475,7 +1479,7 @@ type TrxResultsSummary =
} }
member internal this.toXml (doc : XmlDocument) : XmlNode = member internal this.toXml (doc : XmlDocument) : XmlNode =
let node = doc.CreateElement "ResultSummary" let node = doc.CreateElement ("ResultSummary", XmlUtil.NS)
do do
let attr = doc.CreateAttribute "outcome" let attr = doc.CreateAttribute "outcome"
@@ -1486,7 +1490,7 @@ type TrxResultsSummary =
node.AppendChild (this.Output.toXml doc) |> ignore<XmlNode> node.AppendChild (this.Output.toXml doc) |> ignore<XmlNode>
do do
let runInfosNode = doc.CreateElement "RunInfos" let runInfosNode = doc.CreateElement ("RunInfos", XmlUtil.NS)
for runInfo in this.RunInfos do for runInfo in this.RunInfos do
runInfosNode.AppendChild (runInfo.toXml doc) |> ignore<XmlNode> runInfosNode.AppendChild (runInfo.toXml doc) |> ignore<XmlNode>
@@ -1575,8 +1579,7 @@ type TrxReport =
} }
member internal this.toXml (doc : XmlDocument) : XmlNode = member internal this.toXml (doc : XmlDocument) : XmlNode =
let node = let node = doc.CreateElement ("TestRun", XmlUtil.NS)
doc.CreateElement ("TestRun", "http://microsoft.com/schemas/VisualStudio/TeamTest/2010")
do do
let attr = doc.CreateAttribute "id" let attr = doc.CreateAttribute "id"
@@ -1592,7 +1595,7 @@ type TrxReport =
node.AppendChild (this.Settings.toXml doc) |> ignore<XmlNode> node.AppendChild (this.Settings.toXml doc) |> ignore<XmlNode>
do do
let resultNode = doc.CreateElement "Results" let resultNode = doc.CreateElement ("Results", XmlUtil.NS)
for result in this.Results do for result in this.Results do
resultNode.AppendChild (result.toXml doc) |> ignore<XmlNode> resultNode.AppendChild (result.toXml doc) |> ignore<XmlNode>
@@ -1600,7 +1603,7 @@ type TrxReport =
node.AppendChild resultNode |> ignore<XmlNode> node.AppendChild resultNode |> ignore<XmlNode>
do do
let defsNode = doc.CreateElement "TestDefinitions" let defsNode = doc.CreateElement ("TestDefinitions", XmlUtil.NS)
for result in this.TestDefinitions do for result in this.TestDefinitions do
defsNode.AppendChild (result.toXml doc) |> ignore<XmlNode> defsNode.AppendChild (result.toXml doc) |> ignore<XmlNode>
@@ -1608,7 +1611,7 @@ type TrxReport =
node.AppendChild defsNode |> ignore<XmlNode> node.AppendChild defsNode |> ignore<XmlNode>
do do
let testsNode = doc.CreateElement "TestEntries" let testsNode = doc.CreateElement ("TestEntries", XmlUtil.NS)
for result in this.TestEntries do for result in this.TestEntries do
testsNode.AppendChild (result.toXml doc) |> ignore<XmlNode> testsNode.AppendChild (result.toXml doc) |> ignore<XmlNode>
@@ -1616,7 +1619,7 @@ type TrxReport =
node.AppendChild testsNode |> ignore<XmlNode> node.AppendChild testsNode |> ignore<XmlNode>
do do
let listsNode = doc.CreateElement "TestLists" let listsNode = doc.CreateElement ("TestLists", XmlUtil.NS)
for result in this.TestLists do for result in this.TestLists do
listsNode.AppendChild (result.toXml doc) |> ignore<XmlNode> listsNode.AppendChild (result.toXml doc) |> ignore<XmlNode>

View File

@@ -16,7 +16,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="ApiSurface" Version="4.0.40" /> <PackageReference Include="ApiSurface" Version="4.0.41" />
<PackageReference Include="FsCheck" Version="3.0.0-rc3" /> <PackageReference Include="FsCheck" Version="3.0.0-rc3" />
<PackageReference Include="FsUnit" Version="6.0.0" /> <PackageReference Include="FsUnit" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />

View File

@@ -16,7 +16,7 @@
<PackageId>WoofWare.NUnitTestRunner</PackageId> <PackageId>WoofWare.NUnitTestRunner</PackageId>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarnOn>FS3559</WarnOn> <WarnOn>FS3559</WarnOn>
<WoofWareMyriadPluginVersion>2.1.40</WoofWareMyriadPluginVersion> <WoofWareMyriadPluginVersion>2.1.42</WoofWareMyriadPluginVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@@ -39,8 +39,8 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Spectre.Console" Version="0.49.1" /> <PackageReference Include="Spectre.Console" Version="0.49.1" />
<PackageReference Include="WoofWare.DotnetRuntimeLocator" Version="0.1.3" /> <PackageReference Include="WoofWare.DotnetRuntimeLocator" Version="0.1.4" />
<PackageReference Include="WoofWare.Myriad.Plugins.Attributes" Version="3.1.4" /> <PackageReference Include="WoofWare.Myriad.Plugins.Attributes" Version="3.1.6" />
<PackageReference Include="Myriad.SDK" Version="0.8.3" /> <PackageReference Include="Myriad.SDK" Version="0.8.3" />
<PackageReference Include="WoofWare.Myriad.Plugins" Version="$(WoofWareMyriadPluginVersion)" PrivateAssets="all" /> <PackageReference Include="WoofWare.Myriad.Plugins" Version="$(WoofWareMyriadPluginVersion)" PrivateAssets="all" />
</ItemGroup> </ItemGroup>

View File

@@ -3,13 +3,13 @@
{fetchNuGet}: [ {fetchNuGet}: [
(fetchNuGet { (fetchNuGet {
pname = "ApiSurface"; pname = "ApiSurface";
version = "4.0.40"; version = "4.0.41";
sha256 = "1c9z0b6minlripwrjmv4yd5w8zj4lcpak4x41izh7ygx8kgmbvx0"; sha256 = "03kfa5ngmgkik9lc58sp8s9rrh9g40hhgjnrv662ks0d0y2i9i89";
}) })
(fetchNuGet { (fetchNuGet {
pname = "fantomas"; pname = "fantomas";
version = "6.3.7"; version = "6.3.9";
sha256 = "1z1a5bw7vwz6g8nvfgkvx66jnm4hmvn62vbyq0as60nw0jlvaidl"; sha256 = "1b34iiiff02bbzjv03zyna8xmrgs6y87zdvp5i5k58fcqpjw44sx";
}) })
(fetchNuGet { (fetchNuGet {
pname = "FsCheck"; pname = "FsCheck";
@@ -183,18 +183,18 @@
}) })
(fetchNuGet { (fetchNuGet {
pname = "WoofWare.DotnetRuntimeLocator"; pname = "WoofWare.DotnetRuntimeLocator";
version = "0.1.3"; version = "0.1.4";
sha256 = "0qw41mcvx4qy012pj1dlpdfwsz036qrx7xnzsirk5fz715f1a45m"; sha256 = "19pp4qlyf18g704ppbcsm1rhjqjpi84py18yljj9nx70331m8bpg";
}) })
(fetchNuGet { (fetchNuGet {
pname = "WoofWare.Myriad.Plugins"; pname = "WoofWare.Myriad.Plugins";
version = "2.1.40"; version = "2.1.42";
sha256 = "025lv42zjvqpr2di0iaqhqpricqary3l2a3cxgjjl0zxzflfbmx2"; sha256 = "0px46m734gsn1xa97111v1nwkyc2j52bw7z4bjdljzkmzzmnqa91";
}) })
(fetchNuGet { (fetchNuGet {
pname = "WoofWare.Myriad.Plugins.Attributes"; pname = "WoofWare.Myriad.Plugins.Attributes";
version = "3.1.4"; version = "3.1.6";
sha256 = "06yw013f2qs2r8bxvja2c5kzbqc5knd3sc3pf6w5gaz4fbzwc2c3"; sha256 = "0786pr1p0nq0854mqi2cddmh185j3jihwn6azz9wiy6nxawjbrd2";
}) })
(fetchNuGet { (fetchNuGet {
pname = "WoofWare.PrattParser"; pname = "WoofWare.PrattParser";