Code Monkey home page Code Monkey logo

ghpr.console's Introduction

Project icon

Some Links:
Core | MSTest | MSTestV2 | NUnit | SpecFlow | Console | Site Repo

Build status NuGet Version Codacy Badge CodeFactor

Ghpr.Console

Usage

  • download Ghpr.Console as Nuget package
  • make sure you have .json settings file in the same folder as Ghpr.Console.exe file
  • check that all dependencies exist in the Ghpr.Console.exe folder
  • run Ghpr.Console.exe with one or several arguments: paths to .xml or .trx files with test results

If your file extension is .xml then Ghpr.NUnit will be used to generate test results, else if the extension is .trx then Ghpr.MSTest will be used to generate report from file.

Release notes

You can find it here for all packages.

ghpr.console's People

Contributors

dependabot-preview[bot] avatar dependabot-support avatar elv1s42 avatar mend-bolt-for-github[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ghpr.console's Issues

Can't get a report generated

I'm trying to use this in combination with Nunit and dotnet test ... the XML report generated is valid, all the dependencies are in there, the executable runs without giving any errors. I get the following

Ghpr.Console.exe Common.Tests/test-result.xml
Generating the report for the file 'Common.Tests/test-result.xml'...
Generating the report done.

The report is nowhere to be found. I've also tried the Nunit version of GHPReported can't get any of them to work.

Retention - clean up job - Doesn't appear to work

I'm setting the Retention amount and till, but old runs remain in the newly generated report.

Steps to reproduce the behavior:
I’ve adjusted the ‘amount’ from 1000 down to 3. When I generate a new report, the ‘Total Runs’ continues to tick up. I’ve adjusted the ‘till’ from "2017-01-25 10:00:00" to "2019-11-27 13:34:00" (Current Date/Time) and when I generate a new report, ALL previously generated reports remain. It does not appear that any reports are removed.

  1. Set Retention:Amount = 3
  2. Set Retention:Till = "2019-11-27 13:34:00"
  3. Generate report with 8 runs

Expected behavior
Expected reports prior to “2019-11-27 13:34:00” to be removed. I expected reports with highlighted dates to be removed.
image

Also expected 'Total Runs' to not exceed 3, but every time a run is executed, the Total Runs increments by one:
image

I was also expect file generated prior to “2019-11-27 13:34:00” to be removed from the 'runs' folder...but they remain.
image

Ghpr.Core.settings.json:
{
"default": {
"outputPath": "C:\ProgramData\Selenium\GHPRReport\Reports\OctopusMaintenance\ALL",
"dataServiceFile": "Ghpr.LocalFileSystem.dll",
"loggerFile": "",
"sprint": "",
"reportName": "OctopusMaintenance",
"projectName": "P1-P2",
"runName": "11/27/19_13:38:33",
"runGuid": "",
"realTimeGeneration": "True",
"runsToDisplay": "15",
"testsToDisplay": "1000",
"retention": {
"amount": 3,
"till": "2019-11-27 13:34:00"
}
},
"projects": null
}

I'm concerned that if 'clean up job' doesn't run, I'll eventually consume all the disk space.

NUGET Package:
I’m using NUGET packages:
Ghpr.Console version="0.9.9.1"
Ghpr.Core version="0.9.9.9"
Ghpr.LocalFileSystem version="0.9.9.9"
Ghpr.MSTestV2 version="0.9.9.1"
Ghpr.NUnit version="0.9.9.9"
MSTest.TestAdapter version="1.4.0"
MSTest.TestFramework version="1.4.0"
NUnit version="3.12.0"
NUnit.Engine version="3.10.0"

Browser: Chrome

In the Test details page, 'Output' Tab are empty although there do have some value in origin XML file

Describe the bug
I use the latest version of NUnit console runner to execute some test cases from a testcase.dll, and get an XML result in Nunit3 XML format.

After I use GHPReport console runner to convert it into HMTL result. in "Test details" page, 'Main' Tab looks good, but 'Output' Tab is empty.

I go back and check in the original XML result file, there do have some out logs, it just not showing up in the converted HTML file.

To Reproduce
Steps to reproduce the behavior:

  1. Execute testcases.dll with latest Nunit3 console runner, and get an XML format result file.

  2. Use GHPReporter_console to convert XML file into HTML files. using code $originalTestResultFile = "C:\TestResults\NunitTestResult.xml" C:\GHPReporter\GHPReporter_console\Ghpr.Console.exe $originalTestResultFile
    in powershell.
    This image is what's in my GHPReporter_console folder:
    image

  3. Then we have a folder of HTML result like this:
    image

  4. We open the HTML result page and go to any Test details page. We can see that 'Main' Tab looks good, but 'Output' and 'Extra output' Tabs are empty. please see 2 images below:
    image
    image

  5. I go back and check the XML file, I do see expect 'output' part has value like:
    image

Expected behavior
In HTML files, we expect the 'Output' tab to have the value that exists in XML file

Screenshots
Please see screenshots above

Desktop (please complete the following information):

  • OS: Win10
  • Browser chrome
  • Version 75

Attached XML file and HTML files
Attached the original XML file and the result HTMLs I generated with console runner.
XML+HTMLs.zip

Could this be published as a .NET tool?

To get this up and running is dependent on downloading the is and all dependencies distributing as a .NET tool would help manage this and simplify installation.

As part of this it would be nice to provide the configuration files as arguments as I think the console application is dependent on having configuration in the same directory as the application.

Screenshots required in the report

This is the same request than for Ghpr.MSTestV2, but here for Ghpr.Console.

I have some screenshots attached to my tests, so I would like to have also these screenshots in the GHPR report please.

Regards,

Yannick

FileNotFoundException: Could not load file or assembly 'Ghpr.NUnit,

C:\Work\Sources\Automation\packages\Ghpr.Console.0.8.1\lib>Ghpr.Console.exe C:\Work\Sources\Automation\TestResult.xml

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Ghpr.NUnit, Version=0.8.1.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
at Ghpr.Console.ReportHelper.GenerateReport(String path)
at Ghpr.Console.Program.Main(String[] paths)

Ghpr.Console produces empty report

Hello,

Bug:
While trying Ghpr.Console on Ghpr.Examples, it produced an empty report.
image

How to reproduce:

  1. Installed all the latest required packages from GHPR (Core (0.9.9.1), Nunit (0.9.9.1), NUnitTests (1.0.0.0), Console (0.9.9.1)).
  2. Installed inside the addin of NUnit Console: addins/../../../Users/suyttenhove/Documents/TestGHPR/Ghpr.NUnit.Examples/bin/x86/Debug/Ghpr.NUnit.dll
  3. I started from Ghpr.NunitExamples.
  4. Did the tests and produced the .xml with NUnit Console within Ghpr.NUnit.Examples\Ghpr.NUnitExamples\bin\x86\Debug\ .

NUnit.Settings.json looks like this:
{ "default": { "outputPath": "C:\\", "dataServiceFile": "Ghpr.LocalFileSystem.dll", "loggerFile": "", "sprint": "", "reportName": "GHP Report", "projectName": "Examples Projet", "runName": "", "runGuid": "", "realTimeGeneration": "True", "runsToDisplay": "5", "testsToDisplay": "5", "retention": { "amount": 1000, "till": "2020-01-25 10:00:00" } }, "projects": [ { "pattern": "Ghpr.NUnitExamples.dll", "settings": { "outputPath": "C:\\Users\\suyttenhove\\Documents\\TestGHPR\\Ghpr.NUnit.Examples\\bin\\x86\\Debug\\" } } ] }

Would you have an idea as to why no Runs are reported?

When I use Extent Reports to produce the report, I get the correct result:
image

Thanks,
Simon

question for dependency of Ghpr.Console

Hello,

I downloaded the Ghpr.Console from the VS nuget for my project and it's in the package of project.
I had already TestReport.xml that generated by nunit3-console.exe. I just want to use the Ghpr.Console.exe to convert the TestReport.xml files to html.

I use the command in the packages\Ghpr.Console.0.9.9\lib\net452 folder:

$ ./Ghpr.Console.exe TestReport.xml

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Ghpr.NUnit, Version=0.9.9.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
at Ghpr.Cli.ReportHelper.GenerateReport(String path)
at Ghpr.Cli.Program.Main(String[] args)

The execution will be failed....

So is there any dependency of Ghpr.Console.exe ? or is there anything that missed?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.