testcontainers / testcontainers/testcontainers-java

VNC Recording does not work with JUnit 5

オープン
#1,341 コメント 20 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

resolution/acknowledged
主要言語
Java
スター
8.7k
フォーク
1.9k
平均マージ
2日 17時間
マージ済み PR(30日)
9

説明

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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、BrowserWebDriverContainer の JUnit 4 @Rule のパスと、JUnit 5 @Testcontainers および @Container のパスを比較します。不足している録画を再現し、録画のライフサイクルとログを追跡します。JUnit 5 のテストで期待される録画ファイルが生成され、回帰テストでそれがカバーされれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
docker, java
領域
testing
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。