Skip to content
Draft
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
11 changes: 11 additions & 0 deletions mytests.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
$pesterConfig = [PesterConfiguration]::Default
$pesterConfig.TestResult.Enabled = $true
$pesterConfig.Run.Path = '.\testing\mine.tests.ps1'
$pesterConfig.Run.PassThru = $true
$pesterConfig.Debug.WriteDebugMessages = $true

foreach ($fmt in 'NUnitXml NUnit2.5 NUnit3 JUnitXml'.split(' ')) {
$pesterConfig.TestResult.OutputFormat = $fmt
$pesterConfig.TestResult.OutputPath = "results.$fmt.xml"
Invoke-Pester -Configuration $pesterConfig
}
56 changes: 56 additions & 0 deletions results.JUnitXml.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<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">
<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">
<properties>
<property name="junit-version" value="4" />
<property name="os-version" value="10.0.26100" />
<property name="platform" value="Microsoft Windows 11 Pro|C:\WINDOWS|\Device\Harddisk0\Partition3" />
<property name="user-domain" value="Ralph" />
<property name="machine-name" value="RALPH" />
<property name="clr-version" value="8.0.10" />
<property name="cwd" value="C:\code\Pester" />
<property name="framework-version" value="6.0.0" />
<property name="user" value="corbob" />
</properties>
<testcase name="All The Tests.Reasons.Skips..." status="Skipped" classname="C:\code\Pester\testing\mine.tests.ps1" assertions="0" time="0.018">
<skipped message="Exception: I am skipped"></skipped>
</testcase>
<testcase name="All The Tests.Reasons.Does not skip" status="Passed" classname="C:\code\Pester\testing\mine.tests.ps1" assertions="0" time="0.005" />
<testcase name="All The Tests.Reasons.is Inconclusive" status="Inconclusive" classname="C:\code\Pester\testing\mine.tests.ps1" assertions="0" time="0.010">
<skipped message="Exception: I am inconclusive!"></skipped>
</testcase>
<testcase name="All The Tests.Reasons.is Failed!" status="Failed" classname="C:\code\Pester\testing\mine.tests.ps1" assertions="0" time="0.011">
<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
at &lt;ScriptBlock&gt;, C:\code\Pester\testing\mine.tests.ps1:14</failure>
</testcase>
<testcase name="All The Tests.No Reasons.Skips..." status="Skipped" classname="C:\code\Pester\testing\mine.tests.ps1" assertions="0" time="0.007">
<skipped message="Exception: is skipped"></skipped>
</testcase>
<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" />
<testcase name="All The Tests.No Reasons.is Inconclusive" status="Inconclusive" classname="C:\code\Pester\testing\mine.tests.ps1" assertions="0" time="0.007">
<skipped message="Exception: is inconclusive"></skipped>
</testcase>
<testcase name="All The Tests.No Reasons.is Failed!" status="Failed" classname="C:\code\Pester\testing\mine.tests.ps1" assertions="0" time="0.012">
<failure message="Expected $false, but got $true.">at $true | Should -BeFalse, C:\code\Pester\testing\mine.tests.ps1:29
at &lt;ScriptBlock&gt;, C:\code\Pester\testing\mine.tests.ps1:29</failure>
</testcase>
<testcase name="All The Tests.It Reasons.Skips" status="Skipped" classname="C:\code\Pester\testing\mine.tests.ps1" assertions="0" time="0.003">
<skipped message=""></skipped>
</testcase>
<testcase name="All The Tests.It No Reasons.Skips" status="Skipped" classname="C:\code\Pester\testing\mine.tests.ps1" assertions="0" time="0.013">
<skipped message=""></skipped>
</testcase>
<testcase name="All The Tests.Context Reasons.Skips" status="Skipped" classname="C:\code\Pester\testing\mine.tests.ps1" assertions="0" time="0.006">
<skipped message=""></skipped>
</testcase>
<testcase name="All The Tests.Context No Reasons.Skips" status="Skipped" classname="C:\code\Pester\testing\mine.tests.ps1" assertions="0" time="0.010">
<skipped message=""></skipped>
</testcase>
<testcase name="All The Tests.Describe Reasons.Skips" status="Skipped" classname="C:\code\Pester\testing\mine.tests.ps1" assertions="0" time="0.006">
<skipped message=""></skipped>
</testcase>
<testcase name="All The Tests.Describe No Reasons.Skips" status="Skipped" classname="C:\code\Pester\testing\mine.tests.ps1" assertions="0" time="0.005">
<skipped message=""></skipped>
</testcase>
</testsuite>
</testsuites>
95 changes: 95 additions & 0 deletions results.NUnit2.5.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<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">
<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" />
<culture-info current-culture="en-US" current-uiculture="en-US" />
<test-suite type="TestFixture" name="Pester" executed="True" result="Failure" success="False" time="0.4419" asserts="0" description="Pester">
<results>
<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">
<results>
<test-suite type="TestFixture" name="All The Tests" executed="True" result="Failure" success="False" time="0.3331" asserts="0" description="All The Tests">
<results>
<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">
<results>
<test-case description="Skips..." name="All The Tests.Reasons.Skips..." time="0.0113" asserts="0" success="False" result="Ignored" executed="False">
<reason>
<message>I am skipped</message>
</reason>
</test-case>
<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" />
<test-case description="is Inconclusive" name="All The Tests.Reasons.is Inconclusive" time="0.0073" asserts="0" success="False" result="Inconclusive" executed="True" />
<test-case description="is Failed!" name="All The Tests.Reasons.is Failed!" time="0.1057" asserts="0" success="False" result="Failure" executed="True">
<failure>
<message>Expected $false, because I am failed test, but got $true.</message>
<stack-trace>at $true | Should -BeFalse -Because 'I am failed test', C:\code\Pester\testing\mine.tests.ps1:14
at &lt;ScriptBlock&gt;, C:\code\Pester\testing\mine.tests.ps1:14</stack-trace>
</failure>
</test-case>
</results>
</test-suite>
<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">
<results>
<test-case description="Skips..." name="All The Tests.No Reasons.Skips..." time="0.0125" asserts="0" success="False" result="Ignored" executed="False">
<reason>
<message>is skipped</message>
</reason>
</test-case>
<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" />
<test-case description="is Inconclusive" name="All The Tests.No Reasons.is Inconclusive" time="0.0209" asserts="0" success="False" result="Inconclusive" executed="True" />
<test-case description="is Failed!" name="All The Tests.No Reasons.is Failed!" time="0.0242" asserts="0" success="False" result="Failure" executed="True">
<failure>
<message>Expected $false, but got $true.</message>
<stack-trace>at $true | Should -BeFalse, C:\code\Pester\testing\mine.tests.ps1:29
at &lt;ScriptBlock&gt;, C:\code\Pester\testing\mine.tests.ps1:29</stack-trace>
</failure>
</test-case>
</results>
</test-suite>
<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">
<results>
<test-case description="Skips" name="All The Tests.It Reasons.Skips" time="0.0043" asserts="0" success="False" result="Ignored" executed="False">
<reason>
<message>I am Skipped</message>
</reason>
</test-case>
</results>
</test-suite>
<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">
<results>
<test-case description="Skips" name="All The Tests.It No Reasons.Skips" time="0.007" asserts="0" success="False" result="Ignored" executed="False" />
</results>
</test-suite>
<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">
<results>
<test-case description="Skips" name="All The Tests.Context Reasons.Skips" time="0.0041" asserts="0" success="False" result="Ignored" executed="False">
<reason>
<message>I am Skipped</message>
</reason>
</test-case>
</results>
</test-suite>
<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">
<results>
<test-case description="Skips" name="All The Tests.Context No Reasons.Skips" time="0.0057" asserts="0" success="False" result="Ignored" executed="False" />
</results>
</test-suite>
<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">
<results>
<test-case description="Skips" name="All The Tests.Describe Reasons.Skips" time="0.007" asserts="0" success="False" result="Ignored" executed="False">
<reason>
<message>I am Skipped</message>
</reason>
</test-case>
</results>
</test-suite>
<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">
<results>
<test-case description="Skips" name="All The Tests.Describe No Reasons.Skips" time="0.0068" asserts="0" success="False" result="Ignored" executed="False" />
</results>
</test-suite>
</results>
</test-suite>
</results>
</test-suite>
</results>
</test-suite>
</test-results>
Loading
Loading