testcontainers / testcontainers/testcontainers-java

VNC recording not working correctly if BrowserWebDriverContainer used as @ClassRule

Open
#707 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

modules/selenium resolution/acknowledged type/bug
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.