-
Notifications
You must be signed in to change notification settings - Fork 14
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
Comments
Hi @msscribner ! |
I believe the answer to your question ( framework level
<https://github.com/nunit/docs/wiki/Framework-Parallel-Test-Execution>
vs engine
level <https://github.com/nunit/docs/wiki/Engine-Parallel-Test-Execution>)
is Framework.level. But in this case, I'm only executing a single test.
Test are configured as:
[TestFixture, Parallelizable(ParallelScope.All)]
. . .
[Test, Category(Category.P22), Retry(1)]
public void ParallelTest_A_00()
{
string strTestName = "ParallelTest_A_00";
Action action = () =>
{
TestContext.AddTestAttachment("C:\\temp\\emailName.JPG");
//Make a false exception occur
// Assert.IsTrue(false);
};
Assert.IsTrue(ExecuteTest(action, DriverType.Chrome,
strTestName));
}
So even though I cam run in parallel, I'm specifically running a single
test.
I've attached the generated NUNIT .xml.
Shane
…On Fri, Oct 25, 2019 at 4:13 AM Evgeniy Kosjakov ***@***.***> wrote:
Hi @msscribner <https://github.com/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
<https://github.com/nunit/docs/wiki/Framework-Parallel-Test-Execution> or
on engine level
<https://github.com/nunit/docs/wiki/Engine-Parallel-Test-Execution>?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#67?email_source=notifications&email_token=AK3KQCXMC35SQR27QSUHX7LQQKTCRA5CNFSM4JEUOUC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECHSJ4Y#issuecomment-546252019>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AK3KQCVVZ754W4OWTUTX4CTQQKTCRANCNFSM4JEUOUCQ>
.
|
This is the NUNIT report I'm using as input for the GHP Report |
Ok, so am I right that you are using Ghpr.Console to generate the report after test run is finished? Thank you |
My application calls the API ReportHelper.GenerateReport.
ReportHelper.GenerateReport(files.ToArray());
The file 'emailName.JPG' physically exists at the location
C:\temp\emailName.JPG.
…On Fri, Oct 25, 2019 at 11:36 AM Evgeniy Kosjakov ***@***.***> wrote:
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
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#67?email_source=notifications&email_token=AK3KQCR4KNHAFCFT75RMMK3QQMG6JA5CNFSM4JEUOUC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECIXGYQ#issuecomment-546403170>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AK3KQCRZLINOFIXDG3QJ6FLQQMG6JANCNFSM4JEUOUCQ>
.
|
Hi @msscribner ! |
Released in v0.9.10 |
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:
To generate the GHPReport, I'm including NuGet packages:
I'm expecting to see the .jpg in the Screenshots link, but it does not display:
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):
The text was updated successfully, but these errors were encountered: