From 4f58920e3a5ac5a4c977397e513553da95fedb17 Mon Sep 17 00:00:00 2001 From: jscott-concord <65616979+jscott-concord@users.noreply.github.com> Date: Thu, 17 Dec 2020 16:00:42 -0800 Subject: [PATCH 1/5] Update README.md When running nunit-console in powershell or on Mac it appears you must quote the syntax when adding for example transform or format --- nunit3-summary/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nunit3-summary/README.md b/nunit3-summary/README.md index e7c44a2..ed06c00 100644 --- a/nunit3-summary/README.md +++ b/nunit3-summary/README.md @@ -16,6 +16,11 @@ These transforms may be used independently or through the `nunit3-console` `--re ``` nunit3-console.exe my.test.dll --result=my.test.summary.txt;transform=text-summary.xslt ``` +Note: If you are running nunit3-console in Windows Powershell or Mac you will need to add quotes + +``` +nunit3-console.exe my.test.dll --result="my.test.summary.txt;transform=text-summary.xslt" +``` Naturally, if you use one of the HTML transforms, you will want to change the file type of the result output. @@ -24,5 +29,10 @@ Note that the `--result` option may be repeated to create several reports. If yo ``` nunit3-console.exe my.test.dll --result=my.test.summary.txt;transform=text-summary.xslt --result=TestResult.xml ``` +Note: If you are using nunit3-console in Windows Powershell or Mac you will need to add quotes + +``` +nunit3-console.exe my.test.dll --result="my.test.summary.txt;transform=text-summary.xslt" --result=TestResult.xml +``` If you want to use one of the transforms separately, after the test run, you will need to use a program that can apply an XSLT transform to an XML file. Note that the input file must be in NUnit3 format. From 52a4945c73e2f88d7c2beb7bfa4d6e536f7c83ba Mon Sep 17 00:00:00 2001 From: Jim Scott Date: Thu, 17 Dec 2020 17:00:14 -0800 Subject: [PATCH 2/5] Added html report that uses bootstrap css and jquery to provide a richer experience in look over results produced by nunit3-console by using transform --- nunit3-summary/README.md | 7 + nunit3-summary/html-report-bootstrap.xslt | 312 ++++++++++++++++++++++ 2 files changed, 319 insertions(+) create mode 100644 nunit3-summary/html-report-bootstrap.xslt diff --git a/nunit3-summary/README.md b/nunit3-summary/README.md index e7c44a2..aea0bc5 100644 --- a/nunit3-summary/README.md +++ b/nunit3-summary/README.md @@ -6,6 +6,7 @@ The following transforms are included: * `html-report.xslt` creates a report similar to what the console itself displays in html format. * `html-summary.xslt` creates the summary report alone in html format. +* `html-report-bootstrap.xslt` create a report with pass results and output with expand/collapse * `text-report.xslt` creates a report similar to what the console itself displays in text format. * `text-summary.xslt` creates the summary report alone in text format.' @@ -13,6 +14,12 @@ See our [website](http://nunit.org/nunit-summary) for samples of the report outp These transforms may be used independently or through the `nunit3-console` `--result` option. When used with `nunit3-console`, use a command-line similar to this: +``` +NOTE: When running nunit3-console in Windows Powershell or Mac you will need to surround the options with quotes + +nunit-console.exe my.test.dll --result="my.test.summary.txt;transform=text-summary.xslt" +``` + ``` nunit3-console.exe my.test.dll --result=my.test.summary.txt;transform=text-summary.xslt ``` diff --git a/nunit3-summary/html-report-bootstrap.xslt b/nunit3-summary/html-report-bootstrap.xslt new file mode 100644 index 0000000..9ff3765 --- /dev/null +++ b/nunit3-summary/html-report-bootstrap.xslt @@ -0,0 +1,312 @@ + + + + + + + <xsl:value-of select="test-suite/@name"/> Test Results <xsl:value-of select="@start-time"/> + + + + + + + + +

Command Line

+
+					
+				
+ +

Test Run Summary

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Runtime Environment

+ + + + + + + + + + + + + + +
OS Version: + +
CLR Version: + +
NUnit Version: + +
+ + +
+

Test Files

+ +
    + +
  1. + +
  2. +
    +
+
+
+ + + +

Tests Not Run

+
    + +
+
+ + + +

Errors and Failures

+
    + +
+
+ + + + +

Run Settings

+
    +
  • + DefaultTimeout: +
  • +
  • + WorkDirectory: +
  • +
  • + ImageRuntimeVersion: +
  • +
  • + ImageTargetFrameworkName: +
  • +
  • + ImageRequiresX86: +
  • +
  • + ImageRequiresDefaultAppDomainAssemblyResolver: +
  • +
  • + NumberOfTestWorkers: +
  • +
+ +
+ + +

Tests Run

+ Show/Hide All Results +
    + +
+
+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + + + + + + + + + + + +
    +
    +
    +						
    +						
    +							
    +								
    +
    + +
    +
    +
    + + + + + +
    +
    +
    +
  • +
    + +
    \ No newline at end of file From 873943b3a7857bdcdac8eaa8841ba14fe6fa7a18 Mon Sep 17 00:00:00 2001 From: Jim Scott Date: Mon, 25 Jan 2021 17:59:53 -0800 Subject: [PATCH 3/5] Moved bootstrap report to its own folder --- README.md | 1 + nunit3-bootstrap/README.md | 22 ++ nunit3-bootstrap/html-report-bootstrap.xslt | 312 ++++++++++++++++++++ 3 files changed, 335 insertions(+) create mode 100644 nunit3-bootstrap/README.md create mode 100644 nunit3-bootstrap/html-report-bootstrap.xslt diff --git a/README.md b/README.md index 2979476..fa28d51 100644 --- a/README.md +++ b/README.md @@ -6,3 +6,4 @@ A collection of contributed XSLT transforms for use with the NUnit result file, | [nunit3-junit](https://github.com/nunit/nunit-transforms/tree/master/nunit3-junit) | Converts NUnit3 results to JUnit-style results. | Paul Hicks | | [nunit3-summary](https://github.com/nunit/nunit-transforms/tree/master/nunit3-summary) | Converts NUnit3 results to reports similar to those produced by the console runner. | Charlie Poole | | [nunit2-summary](https://github.com/nunit/nunit-transforms/tree/master/nunit2-summary) | Converts NUnit2 results to reports similar to those produced by the console runner. | Charlie Poole | +| [nunit3-bootstrap](https://github.com/nunit/nunit-transforms/tree/master/nunit3-bootstrap) | Converts NUnit3 results to rich html report using Bootstrap. | Jim Scott | diff --git a/nunit3-bootstrap/README.md b/nunit3-bootstrap/README.md new file mode 100644 index 0000000..74ac144 --- /dev/null +++ b/nunit3-bootstrap/README.md @@ -0,0 +1,22 @@ +# NUnit 3 Result Transform using Bootstrap -- Jim Scott + +This folder contains a transform based on nunit3-summary/html-report.xslt + +The following transform is included: + +* `html-report-bootstrap.xslt` create a report with pass results and output with expand/collapse + + +This transform may be used independently or through the `nunit3-console` `--result` option. When used with `nunit3-console`, use a command-line similar to this: + +``` +NOTE: When running nunit3-console in Windows Powershell or Mac you will need to surround the options with quotes + +nunit-console.exe my.test.dll --result="my.test.summary.txt;transform=html-report-bootstrap.xslt" +``` + +``` +nunit3-console.exe my.test.dll --result=my.test.summary.txt;transform=html-report-bootstrap.xslt +``` + +If you want to use one of the transforms separately, after the test run, you will need to use a program that can apply an XSLT transform to an XML file. Note that the input file must be in NUnit3 format. diff --git a/nunit3-bootstrap/html-report-bootstrap.xslt b/nunit3-bootstrap/html-report-bootstrap.xslt new file mode 100644 index 0000000..9ff3765 --- /dev/null +++ b/nunit3-bootstrap/html-report-bootstrap.xslt @@ -0,0 +1,312 @@ + + + + + + + <xsl:value-of select="test-suite/@name"/> Test Results <xsl:value-of select="@start-time"/> + + + + + + + + +

    Command Line

    +
    +					
    +				
    + +

    Test Run Summary

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Runtime Environment

    + + + + + + + + + + + + + + +
    OS Version: + +
    CLR Version: + +
    NUnit Version: + +
    + + +
    +

    Test Files

    + +
      + +
    1. + +
    2. +
      +
    +
    +
    + + + +

    Tests Not Run

    +
      + +
    +
    + + + +

    Errors and Failures

    +
      + +
    +
    + + + + +

    Run Settings

    +
      +
    • + DefaultTimeout: +
    • +
    • + WorkDirectory: +
    • +
    • + ImageRuntimeVersion: +
    • +
    • + ImageTargetFrameworkName: +
    • +
    • + ImageRequiresX86: +
    • +
    • + ImageRequiresDefaultAppDomainAssemblyResolver: +
    • +
    • + NumberOfTestWorkers: +
    • +
    + +
    + + +

    Tests Run

    + Show/Hide All Results +
      + +
    +
    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + + + + + + + + + + + +
    +
    +
    +						
    +						
    +							
    +								
    +
    + +
    +
    +
    + + + + + +
    +
    +
    +
  • +
    + +
    \ No newline at end of file From e850c32460b622195af070053bf9ab384439bf5d Mon Sep 17 00:00:00 2001 From: Jim Scott Date: Mon, 25 Jan 2021 18:06:22 -0800 Subject: [PATCH 4/5] Added license.txt --- nunit3-bootstrap/license.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 nunit3-bootstrap/license.txt diff --git a/nunit3-bootstrap/license.txt b/nunit3-bootstrap/license.txt new file mode 100644 index 0000000..e3490ff --- /dev/null +++ b/nunit3-bootstrap/license.txt @@ -0,0 +1,19 @@ +Copyright (c) 2021 Jim Scott + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file From c5093b6e042488bf89dca559feafc3c7beb57989 Mon Sep 17 00:00:00 2001 From: Jim Scott Date: Mon, 25 Jan 2021 18:08:27 -0800 Subject: [PATCH 5/5] Modified README --- nunit3-bootstrap/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nunit3-bootstrap/README.md b/nunit3-bootstrap/README.md index 74ac144..f4f3fa0 100644 --- a/nunit3-bootstrap/README.md +++ b/nunit3-bootstrap/README.md @@ -4,7 +4,7 @@ This folder contains a transform based on nunit3-summary/html-report.xslt The following transform is included: -* `html-report-bootstrap.xslt` create a report with pass results and output with expand/collapse +* `html-report-bootstrap.xslt` create a report with pass/fail results and output with expand/collapse This transform may be used independently or through the `nunit3-console` `--result` option. When used with `nunit3-console`, use a command-line similar to this: