assertj / assertj/assertj-swing
Make ScreenshotOnFailureResultFormatter take screenshots before the "After" methods are executed
- Vorherrschende Sprache
- Java
- Sterne
- 121
- Forks
- 52
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
_Issue by **[Brett Vasconcellos](http://jira.codehaus.org/secure/ViewProfile.jspa?name=brettv)** from Sat, 5 Jun 2010 14:18:21 -0500_
_Originally opened as http://jira.codehaus.org/browse/FEST-361_
---
In our project, we typically start the GUI under test in our Before methods and shut it down in the After methods.
We have a continuous integration setup with ant running the Fest tests on every check-in and would like to have screenshots of the failures, however it appears Junit 4.7 doesn't run the ScreenshotOnFailureResultFormatter code until after it's run the various teardown/After methods so we end up getting a screenshot of an empty desktop, similar to what was reported in FEST-216.
I am wondering whether it would be possible to somehow take and store the screenshot before the After methods run, in combination with the custom formatter to write them into the XML and thus include links to screenshots in the final HTML-based reports.
I'm no Junit expert, but I had a poke around in the source and it appears that perhaps extending org.junit.rules.TestWatchman instead of a custom runner might be the way to go – the failed method gets calls before the After methods do.
Now that I found this, a Google search shows me you may already be aware of the issue and TestWatchman approach.
---
votes (original issue): 0
watches (original issue): 0
Beitragsleitfaden
Rechercherichtung
Beginne damit, ScreenshotOnFailureResultFormatter nachzuverfolgen und zu untersuchen, wie es in den JUnit 4.7-Teardown integriert ist; vergleiche diesen Lebenszyklus anschließend mit dem erwähnten org.junit.rules.TestWatchman-Ansatz. Als erledigt gilt die Aufgabe, wenn Fehler die GUI erfassen, bevor die After-Methoden sie herunterfahren, und die Screenshot-Links in den XML- und HTML-Berichten verfügbar bleiben.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- desktop, testing
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 25/100