Reset WebDriver and vncRecordingContainer when Selenium container stops#5116
Conversation
e42b56c to
c12e889
Compare
|
@kiview Would you please have a look? |
|
Hey @tobiasstadler, sure thing, but can you please update the description of the PR, so that we have the context? Like, which use cases does this unblock? |
|
@kiview I updated the description |
|
ping |
|
I am not sure I understand your example correctly. In case of using a JUnit-Rule or the Jupiter-Extension on a per-test-method basis, each test would instantiate a new |
|
@kiview You are right, I described the wrong case. Sorry! I changed the description to actually describe or problem. |
|
ping |
|
ping |
|
Hey @tobiasstadler! Thanks for spotting and fixing it. Do you think you can provide a simple test that will verify that this is no longer an issue? (so that we won't introduce a regression in the future) |
|
Thanks a lot for the contribution @tobiasstadler, we will take care of the test ourselves 🙂 |
|
Thank You! |
Some of our tests look similar to:
The selenium container is started before any test of one class are run and stopped after all test of one class are run. Currently
driveris created only once inBrowserWebDriverContainer.javaand when the container stopsdriver.quit()is called. So the second and any subsequent test class will see a "stopped" driver which will fail the tests of that class.Right now we recreate/start/stop the selenium container manually in
@BeforeAll/@AfterAllblock, but it would be nice if we could reuse the container definition.