GHPReporter / Ghpr.MSTestV2

Adapter for MSTestV2 (generate HTML report for MSTestV2)
https://ghpreporter.github.io/
MIT License
3 stars 1 forks source link

Working MSTestV2 Example #30

Closed chdev77 closed 4 years ago

chdev77 commented 4 years ago

I got the trx file generated from the MSTestV2.Examples....

So now I run the Ghrp.Console.exe MyTrxFile.trx and no output is created. I copied the examples json file to the bin dir where the console exe is and still nothing.

Ghpr.MSTestV2.Settings.json

{
  "outputPath": "C:\\Users\\charbaugh\\source\\repos\\Ghpr.MSTestV2.Examples\\Ghpr.MSTestV2.Examples\\bin\\Debug\\_GHPReporter_MSTest_Report",
  "dataServiceFile": "Ghpr.LocalFileSystem.dll",
  "loggerFile": "",
  "sprint": "",
  "runName": "",
  "runGuid": "",
  "realTimeGeneration": "True",
  "runsToDisplay": "5",
  "testsToDisplay": "5",
  "retention": {
    "amount": 1000,
    "till": "2020-04-20 10:00:00"
  }
}

I get this response from the console....

C:\Users\charbaugh\Source\Repos\Ghpr.MSTestV2.Examples\Ghpr.MSTestV2.Examples\bin\Debug> .\Ghpr.Console.exe "C:\Users\charbaugh\source\repos\Ghpr.MSTestV2.Examples\Ghpr.MSTestV2.Examples
\TestResults\charbaugh_DESKTOP-JKJ05HC_2020-04-16_00_05_15.trx"
Generating the report for the file 'C:\Users\charbaugh\source\repos\Ghpr.MSTestV2.Examples\Ghpr.MSTestV2.Examples\TestResults\charbaugh_DESKTOP-JKJ05HC_2020-04-16_00_05_15.trx'...

Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: source
   at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
   at Ghpr.Core.Factories.ReporterFactory.InitializeReporter(ReporterSettings settings, ITestDataProvider testDataProvider, String projectName)
   at Ghpr.MSTestV2.Utils.GhprMSTestV2RunHelper.CreateReportFromFile(String path, ITestDataProvider dataProvider)
   at Ghpr.Cli.Program.Main(String[] args)

Because of all the necessary configurations I would expect a ps/bat script with the examples so we can have a working example without having to go through the source code. I love the reports demo and is why I'm here! Great work.

elv1s42 commented 4 years ago

Hi @chdev77!

Looks like the .json settings are not up to date. Please see the description of the configuration file here: https://github.com/GHPReporter/Ghpr.Core/#about-settings-file

The issue here is that MSTestV2.Examples repository was not updated for a long time. I'll upgrade it with the latest NuGet packages.

Thank you for the issue.

Regards, Evgeniy

elv1s42 commented 4 years ago

The examples repository updated with the latest changes now