Top-Q / difido-reports

This project aims to provide a generic implementation for HTML test reports.
http://top-q.github.io/difido-reports
Apache License 2.0
47 stars 31 forks source link

problem with screenshot in @BeforeClass method #147

Closed idanharari closed 7 years ago

idanharari commented 7 years ago

There is a problem with the following scenario: class1

  1. @test test1 ...

class2

  1. @beforeClass-..... takeSceenshot(){ File scrFile = driver.getScreenshotAs(OutputType.FILE); report.addImage(scrFile, screenshotDescription); .....
  2. @test test2 ...

the screenshot saved in ...\current\tests\test-1 and not in ...\current\tests\test-2 Thus the execution tree of test2 looks like this (in setup): test2 What can I do to fix this? thanks

itaiag commented 7 years ago

What Difido version are you using?

idanharari commented 7 years ago

2.1.00 with TestNG Binder

il.co.topq.difido
        <artifactId> difido-testng </artifactId>
        <version> LATEST </version>
itaiag commented 7 years ago

The support for fixture methods in TestNG was introduced only last Saturday. Can you check the behavior with version 2.1.01-SNAPSHOT ?

idanharari commented 7 years ago

Still the same problem. The Screenshots from the Setup (before class) are saved in the previous test folder.

Ben-Mark commented 7 years ago

Are the screenshots from the @AfterClass method saved in the correct folder?

On 31 July 2017 at 14:14, idanharari notifications@github.com wrote:

Still the same problem. The Screenshots from the Setup (before class) are saved in the previous test folder.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Top-Q/difido-reports/issues/147#issuecomment-319038865, or mute the thread https://github.com/notifications/unsubscribe-auth/AQbHABbyMQKMHR4cPaQpX-R1NfslgHYMks5sTbcIgaJpZM4Onp_a .