HTML report to include screenshots of failures from WebDriver #3602

Merged
merged 2 commits into from Oct 13, 2016

Conversation

Projects
None yet
5 participants
@DavertMik
Member

DavertMik commented Oct 11, 2016

  • added reports section to MetaData in tests
  • WebDriver to store html and png reports to metadata
  • improved styling of HTML report

selection_154

@Naktibalda

This comment has been minimized.

Show comment
Hide comment
@Naktibalda

Naktibalda Oct 12, 2016

Member

How are you going to support multiple screenshots per test? #3594

Member

Naktibalda commented Oct 12, 2016

How are you going to support multiple screenshots per test? #3594

@DavertMik

This comment has been minimized.

Show comment
Hide comment
@DavertMik

DavertMik Oct 12, 2016

Member

How are you going to support multiple screenshots per test? #3594

I won't. For multiple screenshots we have Recoder and API to build any custom extension to handle that.

Member

DavertMik commented Oct 12, 2016

How are you going to support multiple screenshots per test? #3594

I won't. For multiple screenshots we have Recoder and API to build any custom extension to handle that.

@DavertMik

This comment has been minimized.

Show comment
Hide comment
@DavertMik

DavertMik Oct 13, 2016

Member

Added HTML reports to InnerBrowser and improved some links and stryling

selection_156

Member

DavertMik commented Oct 13, 2016

Added HTML reports to InnerBrowser and improved some links and stryling

selection_156

@DavertMik DavertMik merged commit 2220eea into 2.2 Oct 13, 2016

5 checks passed

continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
semaphoreci The build passed on Semaphore.
Details

@DavertMik DavertMik deleted the html-report branch Oct 13, 2016

@rebas82

This comment has been minimized.

Show comment
Hide comment
@rebas82

rebas82 Nov 2, 2016

  1. when i run test by selenium server (chrome), screenshot is only from visible screen. When i run test by phantomjs, screenshot is frome complete page (i can see everything on page).

Is it posible have complete screenshot from selenium server as is from phantomjs?

  1. some people dont like screenshots in html report, or have own function for doing fail screenshot (as me). Is it posible doing some settings to YML file, where tester set if they need failscreenshot or not need?

rebas82 commented Nov 2, 2016

  1. when i run test by selenium server (chrome), screenshot is only from visible screen. When i run test by phantomjs, screenshot is frome complete page (i can see everything on page).

Is it posible have complete screenshot from selenium server as is from phantomjs?

  1. some people dont like screenshots in html report, or have own function for doing fail screenshot (as me). Is it posible doing some settings to YML file, where tester set if they need failscreenshot or not need?
@Naktibalda

This comment has been minimized.

Show comment
Hide comment
@Naktibalda

Naktibalda Nov 2, 2016

Member

@rebas82 You should raise a separate ticket for these suggestions.

Member

Naktibalda commented Nov 2, 2016

@rebas82 You should raise a separate ticket for these suggestions.

@rebas82

This comment has been minimized.

Show comment
Hide comment

rebas82 commented Nov 2, 2016

ok

@Sereda-Fazen

This comment has been minimized.

Show comment
Hide comment
@Sereda-Fazen

Sereda-Fazen Nov 9, 2016

Hi everybody!
I've updated Codeception to 2.2.6. and when I run tests. I received in HTML Report the following
image

We together with my collegue added the feature in order to work in HTML Report.

  1. In the file ResultReport/HTML.php we added the string

$png = "<tr><td class='error'><div class='screenshot'><img src='data:image/png;base64," . base64_encode(file_get_contents($reports['png'])) . "' alt='failure screenshot'></div></td></tr>";

Currently it works but the path in the HTML Report is absolute

Sereda-Fazen commented Nov 9, 2016

Hi everybody!
I've updated Codeception to 2.2.6. and when I run tests. I received in HTML Report the following
image

We together with my collegue added the feature in order to work in HTML Report.

  1. In the file ResultReport/HTML.php we added the string

$png = "<tr><td class='error'><div class='screenshot'><img src='data:image/png;base64," . base64_encode(file_get_contents($reports['png'])) . "' alt='failure screenshot'></div></td></tr>";

Currently it works but the path in the HTML Report is absolute

@hadouke

This comment has been minimized.

Show comment
Hide comment
@hadouke

hadouke Feb 1, 2017

Is ther3 any updates on this? I also have trouble with showing screens in new report.
I have the same problem on local machine as also in CI.
As I see there is a problem with a path to file - https://www.screencast.com/t/tzKHuiHSOg
Changing path to file make it work - https://www.screencast.com/t/2ljrkLRIye
It is searching this file at wrong dir.
Please, fix

hadouke commented Feb 1, 2017

Is ther3 any updates on this? I also have trouble with showing screens in new report.
I have the same problem on local machine as also in CI.
As I see there is a problem with a path to file - https://www.screencast.com/t/tzKHuiHSOg
Changing path to file make it work - https://www.screencast.com/t/2ljrkLRIye
It is searching this file at wrong dir.
Please, fix

chris1312 added a commit to chris1312/Codeception that referenced this pull request Jun 16, 2017

HTML report to include screenshots of failures from WebDriver (#3602)
* HTML report to include screenshots of failures from WebDriver

* improved to support HTML reports as well
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment