testcontainers / testcontainers/testcontainers-java
VNC recording not working correctly if BrowserWebDriverContainer used as @ClassRule
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 1.9k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 9
Description
The following test won't record any videos:
public class ChromeRecordingWebDriverContainerClassRuleTest extends BaseWebDriverContainerTest {
@ClassRule
public static BrowserWebDriverContainer chrome = new BrowserWebDriverContainer()
.withDesiredCapabilities(DesiredCapabilities.chrome())
.withRecordingMode(RECORD_FAILING, new File("./build/"))
.withRecordingFileFactory(new DefaultRecordingFileFactory());
@Test
public void recordingTestThatShouldBeRecordedButDeleted() {
doSimpleExplore(chrome);
}
@Test
public void failingTest() {
doSimpleExplore(chrome);
assert false;
}
}
If recording mode is set to RECORD_ALL, only a single file is created:
PASSED-ChromeRecordingWebDriverContainerClassRuleTest-null-20180523-095412.flv
If the container is used as @Rule with RECORD_ALL, the two expected files are created:
FAILED-ChromeRecordingWebDriverContainerClassRuleTest-failingTest-20180523-095506.flv
PASSED-ChromeRecordingWebDriverContainerClassRuleTest-recordingTestThatShouldBeRecordedButDeleted-20180523-095511.flv
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ChromeRecordingWebDriverContainerClassRuleTest and reproduce the difference between @ClassRule and @Rule using RECORD_ALL. Trace BrowserWebDriverContainer's recording lifecycle and recording file naming for class-scoped tests; done means each test produces the expected recording, including the test name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, java
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100