testcontainers / testcontainers/testcontainers-java
VNC Recording does not work with JUnit 5
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Java
- Estrellas
- 8.7k
- Forks
- 1.9k
- Merge medio
- 2 d 17 h
- PR fusionados (30 d)
- 9
Descripción
When I have a plain old JUnit 4 test where I am using @Rule :
@Rule
public BrowserWebDriverContainer chrome = new BrowserWebDriverContainer()
.withCapabilities(new ChromeOptions())
.withRecordingMode(VncRecordingMode.RECORD_ALL, new File("./target/"))
.withRecordingFileFactory(new DefaultRecordingFileFactory());
Everything works fine. I am getting this in the logs:
Selenium remote URL is: http://localhost:32873/wd/hub
VNC URL is: vnc://vnc:secret@localhost:32872
[main] INFO org.testcontainers.containers.BrowserWebDriverContainer - Screen recordings for test com.foo.bar.ChromeWebDriverContainerTest-simpleExploreTest will be stored at: .\target\PASSED-com.foo.bar.ChromeWebDriverContainerTest-simpleExploreTest-20190326-162333.flv
The file is there and that's ok.
But if I have JUnit 5 test where I am using @Testcontainers + @Container:
@Container
BrowserWebDriverContainer chrome = new BrowserWebDriverContainer()
.withCapabilities(new ChromeOptions())
.withRecordingMode(VncRecordingMode.RECORD_ALL, new File("./target/"))
.withRecordingFileFactory(new DefaultRecordingFileFactory());
The test is ok (passed), but there is no recording file. Nothing on the logs, just:
Selenium remote URL is: http://localhost:32873/wd/hub
VNC URL is: vnc://vnc:secret@localhost:32872
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza comparando la ruta de JUnit 4 @Rule con la ruta de JUnit 5 @Testcontainers y @Container para BrowserWebDriverContainer. Reproduce la grabación que falta y sigue el ciclo de vida y los logs de la grabación; se considera terminado cuando una prueba de JUnit 5 produce el archivo de grabación esperado y una prueba de regresión lo cubre.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- docker, java
- Área
- testing
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100