assertj / assertj/assertj-swing

Make ScreenshotOnFailureResultFormatter take screenshots before the "After" methods are executed

Abierto
#69 0 comentarios 0 reacciones 0 asignados Ver en GitHub
import from fest-swing Improvement Major
Lenguaje dominante
Java
Estrellas
121
Forks
52
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

_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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Empieza por rastrear ScreenshotOnFailureResultFormatter y cómo se integra con el teardown de JUnit 4.7; después, compara ese ciclo de vida con el enfoque mencionado de org.junit.rules.TestWatchman. Se considera terminado cuando los fallos capturan la GUI antes de que los métodos After la apaguen y los enlaces a las capturas de pantalla sigan disponibles en los informes XML y HTML.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
java
Área
desktop, testing
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.