From 8b2be7af775778442312815b33870ff785094d53 Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 24 Feb 2026 12:04:36 +0100 Subject: [PATCH 01/10] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b8c9ef9..517b17b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 1.5.3 +* Improve error message when browser name can't be matched +* Updated dependencies + # 1.5.2 * Updated dependencies From bd6498d2786d0178e3c54f7088af754bb0aafd90 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Thu, 26 Feb 2026 04:42:27 +0000 Subject: [PATCH 02/10] Update lycheeverse/lychee-action digest to 8646ba3 --- .github/workflows/broken-links.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/broken-links.yml b/.github/workflows/broken-links.yml index e6c3385..d768259 100644 --- a/.github/workflows/broken-links.yml +++ b/.github/workflows/broken-links.yml @@ -18,7 +18,7 @@ jobs: - name: Link Checker id: lychee - uses: lycheeverse/lychee-action@a8c4c7cb88f0c7386610c35eb25108e448569cb0 # v2 + uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2 with: fail: false # Don't fail on broken links, create an issue instead From 8b6624e632e759013ba7aa24ba6ec36f4951f500 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Thu, 26 Feb 2026 04:45:51 +0000 Subject: [PATCH 03/10] Update lycheeverse/lychee-action digest to 8646ba3 --- .github/workflows/broken-links.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/broken-links.yml b/.github/workflows/broken-links.yml index 2675c8b..5b50d06 100644 --- a/.github/workflows/broken-links.yml +++ b/.github/workflows/broken-links.yml @@ -19,7 +19,7 @@ jobs: - name: Link Checker id: lychee - uses: lycheeverse/lychee-action@a8c4c7cb88f0c7386610c35eb25108e448569cb0 # v2 + uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2 with: fail: false # Don't fail on broken links, create an issue instead From a53730bb4a5a0765d9972d93dd5884253f67b619 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Fri, 27 Feb 2026 04:43:58 +0000 Subject: [PATCH 04/10] Update actions/upload-artifact action to v7 --- .github/workflows/check-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-build.yml b/.github/workflows/check-build.yml index b1a6d66..b5d7995 100644 --- a/.github/workflows/check-build.yml +++ b/.github/workflows/check-build.yml @@ -69,7 +69,7 @@ jobs: fi - name: Upload demo files - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: name: demo-files-java-${{ matrix.java }} path: ${{ env.DEMO_MAVEN_MODULE }}/target/${{ env.DEMO_MAVEN_MODULE }}.jar @@ -152,7 +152,7 @@ jobs: - name: Upload report if: always() - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: name: pmd-report if-no-files-found: ignore From 0dd98aa6afd62c5443dcf9fbe4b88b667e3cab3c Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Fri, 27 Feb 2026 04:44:22 +0000 Subject: [PATCH 05/10] Update actions/upload-artifact action to v7 --- .github/workflows/check-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-build.yml b/.github/workflows/check-build.yml index 0763305..7ba6049 100644 --- a/.github/workflows/check-build.yml +++ b/.github/workflows/check-build.yml @@ -145,7 +145,7 @@ jobs: - name: Upload report if: always() - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: name: pmd-report if-no-files-found: ignore From 0dcf9cfe57c8d8c8ace1253845b67afb8bd47bda Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Sun, 1 Mar 2026 04:48:23 +0000 Subject: [PATCH 06/10] Update dependency com.puppycrawl.tools:checkstyle to v13.3.0 --- pom.xml | 2 +- template-placeholder/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index a219280..e214afa 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ com.puppycrawl.tools checkstyle - 13.2.0 + 13.3.0 diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index 9e08842..2547c6f 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -215,7 +215,7 @@ com.puppycrawl.tools checkstyle - 13.2.0 + 13.3.0 From 77e37f981ecf107f1ebb690beb75262b3314b38e Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Mon, 2 Mar 2026 04:46:12 +0000 Subject: [PATCH 07/10] Update dependency net.sourceforge.pmd:pmd-core to v7.22.0 [SECURITY] --- pom.xml | 2 +- template-placeholder/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index a219280..4cac133 100644 --- a/pom.xml +++ b/pom.xml @@ -83,7 +83,7 @@ net.sourceforge.pmd pmd-core - 7.21.0 + 7.22.0 net.sourceforge.pmd diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index 9e08842..4a20d6d 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -253,7 +253,7 @@ net.sourceforge.pmd pmd-core - 7.21.0 + 7.22.0 net.sourceforge.pmd From 961291c3795ca9f249ce028fe98fe1524da6b0fb Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Mon, 2 Mar 2026 04:46:14 +0000 Subject: [PATCH 08/10] Update dependency net.sourceforge.pmd:pmd-java to v7.22.0 --- pom.xml | 2 +- template-placeholder/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index a219280..97f7b18 100644 --- a/pom.xml +++ b/pom.xml @@ -88,7 +88,7 @@ net.sourceforge.pmd pmd-java - 7.21.0 + 7.22.0 diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index 9e08842..3831400 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -258,7 +258,7 @@ net.sourceforge.pmd pmd-java - 7.21.0 + 7.22.0 From 6f9b5b39e904c2167782591b14a645b1fd49b730 Mon Sep 17 00:00:00 2001 From: AB Date: Mon, 2 Mar 2026 12:00:46 +0100 Subject: [PATCH 09/10] Create report-gha-workflow-security-problems.yml Fixes https://github.com/xdev-software/base-template/issues/13 --- .../report-gha-workflow-security-problems.yml | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/report-gha-workflow-security-problems.yml diff --git a/.github/workflows/report-gha-workflow-security-problems.yml b/.github/workflows/report-gha-workflow-security-problems.yml new file mode 100644 index 0000000..b17aa53 --- /dev/null +++ b/.github/workflows/report-gha-workflow-security-problems.yml @@ -0,0 +1,61 @@ +name: Report workflow security problems + +on: + workflow_dispatch: + push: + branches: [ develop ] + paths: + - '.github/workflows/**' + +permissions: + issues: write + +jobs: + prt: + runs-on: ubuntu-latest + timeout-minutes: 15 + # Only run this in our repos (Prevent notification spam by forks) + if: ${{ github.repository_owner == 'xdev-software' }} + steps: + - uses: actions/checkout@v6 + + - name: Check + id: check + run: | + grep -l 'pull_request_target:' --exclude report-gha-workflow-security-problems.yml *.yml > reported.txt && exit 1 || exit 0 + working-directory: .github/workflows + + - name: Find already existing issue + id: find-issue + if: ${{ !cancelled() }} + run: | + echo "number=$(gh issue list -l 'bug' -l 'automated' -L 1 -S 'in:title "Incorrectly configure GHA workflow (prt)"' -s 'open' --json 'number' --jq '.[].number')" >> $GITHUB_OUTPUT + env: + GH_TOKEN: ${{ github.token }} + + - name: Close issue if everything is fine + if: ${{ success() && steps.find-issue.outputs.number != '' }} + run: gh issue close -r 'not planned' ${{ steps.find-issue.outputs.number }} + env: + GH_TOKEN: ${{ github.token }} + + - name: Create report + if: ${{ failure() && steps.check.conclusion == 'failure' }} + run: | + echo 'Detected usage of `pull_request_target`. This event is dangerous and MUST NOT BE USED AT ALL COST!' > reported.md + echo '' >> reported.md + echo '/cc @xdev-software/gha-workflow-security' >> reported.md + echo '' >> reported.md + echo '```' >> reported.md + cat .github/workflows/reported.txt >> reported.md + echo '```' >> reported.md + cat reported.md + + - name: Create Issue From File + if: ${{ failure() && steps.check.conclusion == 'failure' }} + uses: peter-evans/create-issue-from-file@fca9117c27cdc29c6c4db3b86c48e4115a786710 # v6 + with: + issue-number: ${{ steps.find-issue.outputs.number }} + title: 'Incorrectly configure GHA workflow (prt)' + content-filepath: ./reported.md + labels: bug, automated From 49e1e42510083b6cb486cd02f18ffc20b31bcc9a Mon Sep 17 00:00:00 2001 From: AB Date: Thu, 5 Mar 2026 16:42:00 +0100 Subject: [PATCH 10/10] Change default format to `.mkv` and fixate version See also #266 --- CHANGELOG.md | 8 ++++++++ README.md | 9 ++++++++- pom.xml | 2 +- testcontainers-selenium-demo/pom.xml | 4 ++-- testcontainers-selenium/pom.xml | 2 +- .../selenium/containers/browser/SeleniumUtils.java | 2 +- .../containers/recorder/SeleniumRecordingContainer.java | 7 +++++-- .../testcontainers/selenium/SimpleContainerTest.java | 2 +- 8 files changed, 27 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 517b17b..4ad8d9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# 2.0.0 +_Major version bump due to default video container format change_ +* Pinned recorder container to `selenium/video:ffmpeg-8.0-20260202` because the currently latest version of the container is not shutting down properly +* Changed default video container format to `mkv` + * This format allows to play the videos even when they are incomplete +* Update default Selenium version to `4.41.0` +* Updated dependencies + # 1.5.3 * Improve error message when browser name can't be matched * Updated dependencies diff --git a/README.md b/README.md index fde3770..900c6f7 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ A re-implementation of [Testcontainer Selenium/WebDriver](https://java.testconta * No VNC Server started in the browser container (unless explicitly stated) → Saves memory * Uses [Selenium's implementation](https://github.com/SeleniumHQ/docker-selenium/tree/trunk/Video) and isn't [based](https://github.com/testcontainers/vnc-recorder) on [some python code from 2010](https://pypi.org/project/vnc2flv/#history) * Way more customization options for e.g. ``framerate``, ``codec``, ``preset`` ... - * Uses ``mp4`` as default recording format (wider support in comparison to ``flv``) + * Uses ``mkv`` as default recording format (wider support in comparison to ``flv``) * [Renders while saving the video](https://github.com/SeleniumHQ/docker-selenium/blob/4c572afd1173b5bd49fa2def3b54ea552fccee85/Video/video.sh#L126) (not when finished which takes additional time) * Stops the recorder before saving the file so that there is no way that [it runs forever](https://github.com/testcontainers/testcontainers-java/discussions/6229). * Automatically tries to select a alternative Selenium version for the docker image if it [doesn't exist](https://github.com/SeleniumHQ/docker-selenium/issues/1979). @@ -25,6 +25,13 @@ Usage is very similar to [Testcontainers default implementation](https://java.te Make sure to remove the original Testcontainer Webdrivers dependency to avert any mix ups while using the library. For more information take a look at [our demo](./testcontainers-selenium-demo/src/main/java/software/xdev/Application.java). +### Why are videos recorded as `.mkv` and how can I open them? + +In version 2 `.mp4` was replaced with `.mkv` as the default video container format.
+This was done because `.mp4` requires finalization as otherwise the file/container will be consider corrupt. `.mkv` has no such problems. + +[Most video players](https://en.wikipedia.org/wiki/Matroska#Support) (including browsers) can play `.mkv` files out of the box. + ## Installation [Installation guide for the latest release](https://github.com/xdev-software/testcontainers-selenium/releases/latest#Installation) diff --git a/pom.xml b/pom.xml index aa0a084..c5c37df 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ software.xdev testcontainers-selenium-root - 1.5.4-SNAPSHOT + 2.0.0-SNAPSHOT pom diff --git a/testcontainers-selenium-demo/pom.xml b/testcontainers-selenium-demo/pom.xml index 277ef93..131cc91 100644 --- a/testcontainers-selenium-demo/pom.xml +++ b/testcontainers-selenium-demo/pom.xml @@ -7,11 +7,11 @@ software.xdev testcontainers-selenium-root - 1.5.4-SNAPSHOT + 2.0.0-SNAPSHOT testcontainers-selenium-demo - 1.5.4-SNAPSHOT + 2.0.0-SNAPSHOT jar diff --git a/testcontainers-selenium/pom.xml b/testcontainers-selenium/pom.xml index 4b780e2..8499fe8 100644 --- a/testcontainers-selenium/pom.xml +++ b/testcontainers-selenium/pom.xml @@ -6,7 +6,7 @@ software.xdev testcontainers-selenium - 1.5.4-SNAPSHOT + 2.0.0-SNAPSHOT jar testcontainers-selenium diff --git a/testcontainers-selenium/src/main/java/software/xdev/testcontainers/selenium/containers/browser/SeleniumUtils.java b/testcontainers-selenium/src/main/java/software/xdev/testcontainers/selenium/containers/browser/SeleniumUtils.java index 29cf665..376c8f7 100644 --- a/testcontainers-selenium/src/main/java/software/xdev/testcontainers/selenium/containers/browser/SeleniumUtils.java +++ b/testcontainers-selenium/src/main/java/software/xdev/testcontainers/selenium/containers/browser/SeleniumUtils.java @@ -38,7 +38,7 @@ public final class SeleniumUtils private static final Logger LOG = LoggerFactory.getLogger(SeleniumUtils.class); // as of 2026-01 - public static final String DEFAULT_SELENIUM_VERSION = "4.40.0"; + public static final String DEFAULT_SELENIUM_VERSION = "4.41.0"; private static String cachedVersion; private SeleniumUtils() diff --git a/testcontainers-selenium/src/main/java/software/xdev/testcontainers/selenium/containers/recorder/SeleniumRecordingContainer.java b/testcontainers-selenium/src/main/java/software/xdev/testcontainers/selenium/containers/recorder/SeleniumRecordingContainer.java index d13e116..a3d8732 100644 --- a/testcontainers-selenium/src/main/java/software/xdev/testcontainers/selenium/containers/recorder/SeleniumRecordingContainer.java +++ b/testcontainers-selenium/src/main/java/software/xdev/testcontainers/selenium/containers/recorder/SeleniumRecordingContainer.java @@ -31,7 +31,10 @@ @SuppressWarnings("java:S2160") public class SeleniumRecordingContainer extends RecordingContainer { - public static final DockerImageName DEFAULT_IMAGE = DockerImageName.parse("selenium/video"); + public static final DockerImageName DEFAULT_IMAGE = + // Workaround https://github.com/SeleniumHQ/docker-selenium/issues/3093 + // As of 2026-03 the latest version of the container is not shutting down properly + DockerImageName.parse("selenium/video:ffmpeg-8.0-20260202"); // https://github.com/SeleniumHQ/docker-selenium/blob/033f77c02dde9d61d1a4d44be7526ef689244606/Video/Dockerfile#L103-L110 public static final String ENV_DISPLAY_CONTAINER_NAME = "DISPLAY_CONTAINER_NAME"; @@ -47,7 +50,7 @@ public class SeleniumRecordingContainer extends RecordingContainer target) { diff --git a/testcontainers-selenium/src/test/java/software/xdev/testcontainers/selenium/SimpleContainerTest.java b/testcontainers-selenium/src/test/java/software/xdev/testcontainers/selenium/SimpleContainerTest.java index 56eabd7..726144a 100644 --- a/testcontainers-selenium/src/test/java/software/xdev/testcontainers/selenium/SimpleContainerTest.java +++ b/testcontainers-selenium/src/test/java/software/xdev/testcontainers/selenium/SimpleContainerTest.java @@ -85,7 +85,7 @@ public String getFilesystemFriendlyName() final String recordedFileName = recorded.getFileName().toString(); Assertions.assertAll( - () -> Assertions.assertTrue(recordedFileName.endsWith(".mp4")), + () -> Assertions.assertTrue(recordedFileName.endsWith(".mkv")), () -> Assertions.assertTrue(recordedFileName.startsWith("PASSED-")), () -> Assertions.assertTrue(Files.size(recorded) > 0)); }