Skip to content

Commit 75df833

Browse files
committed
Auto stash before rebase of "reasons" onto "upstream/main"
1 parent 4bde77a commit 75df833

5 files changed

Lines changed: 346 additions & 4 deletions

File tree

mytests.ps1

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
$pesterConfig = [PesterConfiguration]::Default
2-
$pesterConfig.TestResult
32
$pesterConfig.TestResult.Enabled = $true
4-
$pesterConfig.TestResult.OutputFormat = 'NUnit2.5'
5-
$pesterConfig.TestResult.OutputPath = 'results.new.xml'
63
$pesterConfig.Run.Path = '.\testing\mine.tests.ps1'
74
$pesterConfig.Run.PassThru = $true
85
$pesterConfig.Debug.WriteDebugMessages = $true
9-
$results = Invoke-Pester -Configuration $pesterConfig
6+
7+
foreach ($fmt in 'NUnitXml NUnit2.5 NUnit3 JUnitXml'.split(' ')) {
8+
$pesterConfig.TestResult.OutputFormat = $fmt
9+
$pesterConfig.TestResult.OutputPath = "results.$fmt.xml"
10+
Invoke-Pester -Configuration $pesterConfig
11+
}

results.JUnitXml.xml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="no"?>
2+
<testsuites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="junit_schema_4.xsd" name="Pester" tests="14" errors="0" failures="2" disabled="8" time="0.303">
3+
<testsuite name="C:\code\Pester\testing\mine.tests.ps1" tests="14" errors="0" failures="2" hostname="RALPH" id="0" skipped="8" disabled="0" package="C:\code\Pester\testing\mine.tests.ps1" time="0.303">
4+
<properties>
5+
<property name="junit-version" value="4" />
6+
<property name="os-version" value="10.0.26100" />
7+
<property name="platform" value="Microsoft Windows 11 Pro|C:\WINDOWS|\Device\Harddisk0\Partition3" />
8+
<property name="user-domain" value="Ralph" />
9+
<property name="machine-name" value="RALPH" />
10+
<property name="clr-version" value="8.0.10" />
11+
<property name="cwd" value="C:\code\Pester" />
12+
<property name="framework-version" value="6.0.0" />
13+
<property name="user" value="corbob" />
14+
</properties>
15+
<testcase name="All The Tests.Reasons.Skips..." status="Skipped" classname="C:\code\Pester\testing\mine.tests.ps1" assertions="0" time="0.018">
16+
<skipped message="Exception: I am skipped"></skipped>
17+
</testcase>
18+
<testcase name="All The Tests.Reasons.Does not skip" status="Passed" classname="C:\code\Pester\testing\mine.tests.ps1" assertions="0" time="0.005" />
19+
<testcase name="All The Tests.Reasons.is Inconclusive" status="Inconclusive" classname="C:\code\Pester\testing\mine.tests.ps1" assertions="0" time="0.010">
20+
<skipped message="Exception: I am inconclusive!"></skipped>
21+
</testcase>
22+
<testcase name="All The Tests.Reasons.is Failed!" status="Failed" classname="C:\code\Pester\testing\mine.tests.ps1" assertions="0" time="0.011">
23+
<failure message="Expected $false, because I am failed test, but got $true.">at $true | Should -BeFalse -Because 'I am failed test', C:\code\Pester\testing\mine.tests.ps1:14
24+
at &lt;ScriptBlock&gt;, C:\code\Pester\testing\mine.tests.ps1:14</failure>
25+
</testcase>
26+
<testcase name="All The Tests.No Reasons.Skips..." status="Skipped" classname="C:\code\Pester\testing\mine.tests.ps1" assertions="0" time="0.007">
27+
<skipped message="Exception: is skipped"></skipped>
28+
</testcase>
29+
<testcase name="All The Tests.No Reasons.Does not skip" status="Passed" classname="C:\code\Pester\testing\mine.tests.ps1" assertions="0" time="0.011" />
30+
<testcase name="All The Tests.No Reasons.is Inconclusive" status="Inconclusive" classname="C:\code\Pester\testing\mine.tests.ps1" assertions="0" time="0.007">
31+
<skipped message="Exception: is inconclusive"></skipped>
32+
</testcase>
33+
<testcase name="All The Tests.No Reasons.is Failed!" status="Failed" classname="C:\code\Pester\testing\mine.tests.ps1" assertions="0" time="0.012">
34+
<failure message="Expected $false, but got $true.">at $true | Should -BeFalse, C:\code\Pester\testing\mine.tests.ps1:29
35+
at &lt;ScriptBlock&gt;, C:\code\Pester\testing\mine.tests.ps1:29</failure>
36+
</testcase>
37+
<testcase name="All The Tests.It Reasons.Skips" status="Skipped" classname="C:\code\Pester\testing\mine.tests.ps1" assertions="0" time="0.003">
38+
<skipped message=""></skipped>
39+
</testcase>
40+
<testcase name="All The Tests.It No Reasons.Skips" status="Skipped" classname="C:\code\Pester\testing\mine.tests.ps1" assertions="0" time="0.013">
41+
<skipped message=""></skipped>
42+
</testcase>
43+
<testcase name="All The Tests.Context Reasons.Skips" status="Skipped" classname="C:\code\Pester\testing\mine.tests.ps1" assertions="0" time="0.006">
44+
<skipped message=""></skipped>
45+
</testcase>
46+
<testcase name="All The Tests.Context No Reasons.Skips" status="Skipped" classname="C:\code\Pester\testing\mine.tests.ps1" assertions="0" time="0.010">
47+
<skipped message=""></skipped>
48+
</testcase>
49+
<testcase name="All The Tests.Describe Reasons.Skips" status="Skipped" classname="C:\code\Pester\testing\mine.tests.ps1" assertions="0" time="0.006">
50+
<skipped message=""></skipped>
51+
</testcase>
52+
<testcase name="All The Tests.Describe No Reasons.Skips" status="Skipped" classname="C:\code\Pester\testing\mine.tests.ps1" assertions="0" time="0.005">
53+
<skipped message=""></skipped>
54+
</testcase>
55+
</testsuite>
56+
</testsuites>

results.NUnit2.5.xml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="no"?>
2+
<test-results xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="nunit_schema_2.5.xsd" name="Pester" total="14" errors="0" failures="2" not-run="0" inconclusive="2" ignored="0" skipped="8" invalid="0" date="2025-01-09" time="13:16:13">
3+
<environment os-version="10.0.26100" platform="Microsoft Windows 11 Pro|C:\WINDOWS|\Device\Harddisk0\Partition3" user-domain="Ralph" machine-name="RALPH" clr-version="8.0.10" cwd="C:\code\Pester" nunit-version="2.5.8.0" user="corbob" />
4+
<culture-info current-culture="en-US" current-uiculture="en-US" />
5+
<test-suite type="TestFixture" name="Pester" executed="True" result="Failure" success="False" time="0.4419" asserts="0" description="Pester">
6+
<results>
7+
<test-suite type="TestFixture" name="C:\code\Pester\testing\mine.tests.ps1" executed="True" result="Failure" success="False" time="0.4419" asserts="0" description="C:\code\Pester\testing\mine.tests.ps1">
8+
<results>
9+
<test-suite type="TestFixture" name="All The Tests" executed="True" result="Failure" success="False" time="0.3331" asserts="0" description="All The Tests">
10+
<results>
11+
<test-suite type="TestFixture" name="All The Tests.Reasons" executed="True" result="Failure" success="False" time="0.1397" asserts="0" description="All The Tests.Reasons">
12+
<results>
13+
<test-case description="Skips..." name="All The Tests.Reasons.Skips..." time="0.0113" asserts="0" success="False" result="Ignored" executed="False">
14+
<reason>
15+
<message>I am skipped</message>
16+
</reason>
17+
</test-case>
18+
<test-case description="Does not skip" name="All The Tests.Reasons.Does not skip" time="0.0065" asserts="0" success="True" result="Success" executed="True" />
19+
<test-case description="is Inconclusive" name="All The Tests.Reasons.is Inconclusive" time="0.0073" asserts="0" success="False" result="Inconclusive" executed="True" />
20+
<test-case description="is Failed!" name="All The Tests.Reasons.is Failed!" time="0.1057" asserts="0" success="False" result="Failure" executed="True">
21+
<failure>
22+
<message>Expected $false, because I am failed test, but got $true.</message>
23+
<stack-trace>at $true | Should -BeFalse -Because 'I am failed test', C:\code\Pester\testing\mine.tests.ps1:14
24+
at &lt;ScriptBlock&gt;, C:\code\Pester\testing\mine.tests.ps1:14</stack-trace>
25+
</failure>
26+
</test-case>
27+
</results>
28+
</test-suite>
29+
<test-suite type="TestFixture" name="All The Tests.No Reasons" executed="True" result="Failure" success="False" time="0.2107" asserts="0" description="All The Tests.No Reasons">
30+
<results>
31+
<test-case description="Skips..." name="All The Tests.No Reasons.Skips..." time="0.0125" asserts="0" success="False" result="Ignored" executed="False">
32+
<reason>
33+
<message>is skipped</message>
34+
</reason>
35+
</test-case>
36+
<test-case description="Does not skip" name="All The Tests.No Reasons.Does not skip" time="0.0046" asserts="0" success="True" result="Success" executed="True" />
37+
<test-case description="is Inconclusive" name="All The Tests.No Reasons.is Inconclusive" time="0.0209" asserts="0" success="False" result="Inconclusive" executed="True" />
38+
<test-case description="is Failed!" name="All The Tests.No Reasons.is Failed!" time="0.0242" asserts="0" success="False" result="Failure" executed="True">
39+
<failure>
40+
<message>Expected $false, but got $true.</message>
41+
<stack-trace>at $true | Should -BeFalse, C:\code\Pester\testing\mine.tests.ps1:29
42+
at &lt;ScriptBlock&gt;, C:\code\Pester\testing\mine.tests.ps1:29</stack-trace>
43+
</failure>
44+
</test-case>
45+
</results>
46+
</test-suite>
47+
<test-suite type="TestFixture" name="All The Tests.It Reasons" executed="True" result="Ignored" success="True" time="0.2278" asserts="0" description="All The Tests.It Reasons">
48+
<results>
49+
<test-case description="Skips" name="All The Tests.It Reasons.Skips" time="0.0043" asserts="0" success="False" result="Ignored" executed="False">
50+
<reason>
51+
<message>I am Skipped</message>
52+
</reason>
53+
</test-case>
54+
</results>
55+
</test-suite>
56+
<test-suite type="TestFixture" name="All The Tests.It No Reasons" executed="True" result="Ignored" success="True" time="0.2431" asserts="0" description="All The Tests.It No Reasons">
57+
<results>
58+
<test-case description="Skips" name="All The Tests.It No Reasons.Skips" time="0.007" asserts="0" success="False" result="Ignored" executed="False" />
59+
</results>
60+
</test-suite>
61+
<test-suite type="TestFixture" name="All The Tests.Context Reasons" executed="True" result="Ignored" success="True" time="0.2562" asserts="0" description="All The Tests.Context Reasons">
62+
<results>
63+
<test-case description="Skips" name="All The Tests.Context Reasons.Skips" time="0.0041" asserts="0" success="False" result="Ignored" executed="False">
64+
<reason>
65+
<message>I am Skipped</message>
66+
</reason>
67+
</test-case>
68+
</results>
69+
</test-suite>
70+
<test-suite type="TestFixture" name="All The Tests.Context No Reasons" executed="True" result="Ignored" success="True" time="0.272" asserts="0" description="All The Tests.Context No Reasons">
71+
<results>
72+
<test-case description="Skips" name="All The Tests.Context No Reasons.Skips" time="0.0057" asserts="0" success="False" result="Ignored" executed="False" />
73+
</results>
74+
</test-suite>
75+
<test-suite type="TestFixture" name="All The Tests.Describe Reasons" executed="True" result="Ignored" success="True" time="0.2876" asserts="0" description="All The Tests.Describe Reasons">
76+
<results>
77+
<test-case description="Skips" name="All The Tests.Describe Reasons.Skips" time="0.007" asserts="0" success="False" result="Ignored" executed="False">
78+
<reason>
79+
<message>I am Skipped</message>
80+
</reason>
81+
</test-case>
82+
</results>
83+
</test-suite>
84+
<test-suite type="TestFixture" name="All The Tests.Describe No Reasons" executed="True" result="Ignored" success="True" time="0.3025" asserts="0" description="All The Tests.Describe No Reasons">
85+
<results>
86+
<test-case description="Skips" name="All The Tests.Describe No Reasons.Skips" time="0.0068" asserts="0" success="False" result="Ignored" executed="False" />
87+
</results>
88+
</test-suite>
89+
</results>
90+
</test-suite>
91+
</results>
92+
</test-suite>
93+
</results>
94+
</test-suite>
95+
</test-results>

0 commit comments

Comments
 (0)