Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screenshot added via NUnit TestContext.AddTestAttachment does not display GHPReport #67

Closed
msscribner opened this issue Oct 24, 2019 · 7 comments
Assignees
Labels
Projects

Comments

@msscribner
Copy link

msscribner commented Oct 24, 2019

Screenshot is not displaying in the GHPReport

From a Selenium Test, I'm adding creating a screen shot and adding it to the NUNIT log:
TestContext.AddTestAttachment("C:\temp\emailName.JPG");

Generated XML looks something like:
image

To generate the GHPReport, I'm including NuGet packages:
image

I'm expecting to see the .jpg in the Screenshots link, but it does not display:

image

The test_20191023_191447000.json look like:
{
"name": "ParallelTest_A_00",
"fullName": "AutomationTests.ParallelTests.ParallelTest_A.ParallelTest_A_00",
"description": null,
"duration": 0.262805,
"testStackTrace": " at AutomationTests.Base.BaseTest.ExecuteTest(Action action, DriverType driverType, String strTestName) in C:\TFS\QAAutomation\AutomationTests\Base\BaseTest.cs:line 71\r\n at AutomationTests.ParallelTests.ParallelTest_A.ParallelTest_A_00() in C:\TFS\QAAutomation\AutomationTests\ParallelTest_A.cs:line 106",
"testMessage": "System.Exception : Retries Exceeded. Exception: NUnit.Framework.AssertionException: Expected: True\r\n But was: False\r\n\r\n at NUnit.Framework.Assert.ReportFailure(String message) in D:\a\1\s\src\NUnitFramework\framework\Assert.cs:line 394\r\n at NUnit.Framework.Assert.That[TActual](TActual actual, IResolveConstraint expression, String message, Object[] args) in D:\a\1\s\src\NUnitFramework\framework\Assert.That.cs:line 241\r\n at AutomationTests.ParallelTests.ParallelTest_A.<>c.<ParallelTest_A_00>b__2_0() in C:\TFS\QAAutomation\AutomationTests\ParallelTest_A.cs:line 104\r\n at AutomationTests.Base.BaseTest.ExecuteTest(Action action, DriverType driverType, String strTestName) in C:\TFS\QAAutomation\AutomationTests\Base\BaseTest.cs:line 46 1) Expected: True\r\n But was: False\r\n\r\n",
"result": "Failed: Error",
"testType": null,
"output": {
"itemName": "test_output_20191023_191447000.json",
"date": "2019-10-23T19:14:47Z"
},
"priority": null,
"categories": [
"P22"
],
"testInfo": {
"guid": "493c9583-7c24-0582-5194-66ed161b96b3",
"start": "2019-10-23T19:14:46Z",
"finish": "2019-10-23T19:14:47Z",
"itemName": "test_20191023_191447000.json"
},
"runGuid": "651dc1f6-0ead-4436-b808-1998debd6979",
"screenshots": [],
"events": [],
"testData": [],
"FailedOrBroken": true,
"TestResult": 2
}

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chrome
@elv1s42 elv1s42 self-assigned this Oct 25, 2019
@elv1s42
Copy link
Member

elv1s42 commented Oct 25, 2019

Hi @msscribner !
Thank you for the issue, I'll try to reproduce it.
Are you running the tests in parallel? Are you doing it on the framework level or on engine level?

@elv1s42 elv1s42 added the bug label Oct 25, 2019
@msscribner
Copy link
Author

msscribner commented Oct 25, 2019 via email

@msscribner
Copy link
Author

This is the NUNIT report I'm using as input for the GHP Report
AutomationTestResults_A_00_10232019_151438.txt

@elv1s42
Copy link
Member

elv1s42 commented Oct 25, 2019

Ok, so am I right that you are using Ghpr.Console to generate the report after test run is finished?
Also can you please check that the screenshot <filePath>C:\temp\emailName.JPG</filePath> file exists at the time when the report is generated?

Thank you

@msscribner
Copy link
Author

msscribner commented Oct 25, 2019 via email

@elv1s42
Copy link
Member

elv1s42 commented Oct 26, 2019

Hi @msscribner !
I was able to reproduce the issue, the file AutomationTestResults_A_00_10232019_151438.txt helped a lot, thank you. Going to fix it on this weekend and try to release the next week

@elv1s42 elv1s42 added this to ToDo (Prioritised) in Ghpr Common via automation Oct 26, 2019
@elv1s42 elv1s42 moved this from ToDo (Prioritised) to InProgress (Dev/QA) in Ghpr Common Oct 26, 2019
@elv1s42 elv1s42 moved this from InProgress (Dev/QA) to Done (Aw. Release) in Ghpr Common Oct 28, 2019
@elv1s42
Copy link
Member

elv1s42 commented Nov 15, 2019

Released in v0.9.10

@elv1s42 elv1s42 closed this as completed Nov 15, 2019
Ghpr Common automation moved this from Done (Aw. Release) to Archive Nov 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Ghpr Common
  
Archive
Development

No branches or pull requests

2 participants