testcontainers / testcontainers/testcontainers-java
VNC Recording does not work with JUnit 5
まだ誰も着手していません。
- 主要言語
- 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
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、BrowserWebDriverContainer の JUnit 4 @Rule のパスと、JUnit 5 @Testcontainers および @Container のパスを比較します。不足している録画を再現し、録画のライフサイクルとログを追跡します。JUnit 5 のテストで期待される録画ファイルが生成され、回帰テストでそれがカバーされれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- docker, java
- 領域
- testing
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100