-
-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add WebDriver module #780
feat: Add WebDriver module #780
Conversation
add also a basic standalone images name
✅ Deploy Preview for testcontainers-dotnet ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Test is working -> create chrome standalone cotnainer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, the project looks good. Still, the interesting part is missing (adding and combining all the required resources to run Webdriver). Keep in mind you need to hold more resources to start the Webdriver (network and multiple container).
BTW, I replied yesterday to a similar topic on StackOverflow, maybe it's interesting for you.
@ShaharM7 would be part of the var videoFilePath = "test/result/folder/video.mp4";
var container = new WebDriverBuilder().WithVideoRecording(videoFilePath).Build();
await container.StartAsync(); and both containers can be spun up. |
Yes, the idea is that the WebDriver module sets up everything internally. Calling |
@HofmeisterAn
|
@vlaskal I will like your help :) contact me with .slack |
this is the entry point for selenium grid application: https://www.selenium.dev/documentation/grid/components/#router
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added some suggestions. Please add an EditorConfig file to the test project directory too.
tests/Testcontainers.WebDriver.Tests/Testcontainers.WebDriver.Tests.csproj
Outdated
Show resolved
Hide resolved
No needs it -> that is not configuration
…tnet into feature/WebDriverContainer
…tnet into feature/WebDriverContainer
…containers-dotnet into feature/WebDriverContainer
… is stopped on export
Remove expose methods that can be *easy* used by the 'WithEnvironment()' method Co-authored-by: Andre Hofmeister <9199345+HofmeisterAn@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for submitting the WebDriver module, we appreciate your contribution and the time you took to create this PR. Everything looks good to me 🙏.
Thanks so much for your help :) and support too |
WebDriver container - use selenium docker docker-selenium.
The idea is very similar to the dynamic grid approach. When there is the demand for containers then it is raised.
The idea is:
What does the p.r describe?
The p.r describe how to raise up a webdriver container -> selenium standalone on demand of which browser to run on.
For starter the design architecture that the image will rise up for tests is a selenium standalone image that containers all the selenium grid components: selenium-grid-componenets it includes the:
router, session-queue, session map (his image call: sessions, event bus, and distributer which are the components of the hub.|
The hub joins with the node - where the tests will run.
The possible browsers are:
firefox
edge
chrome
The running can contain videos, different running options, an inspection of vnc server, and so on.
Why is it important?
When we are running e2e tests using a selenium grid, we run the tests on the prepared beforehand selenium grid, it is using a lot of computing resources because we have a full application that always running with a const number of machines that can be run on. when one developer runs his tests it is no problem, he has enough machine - nodes to run on.
But when 10 developers running e2e testing it become a more problematic and messages start be stack in the session-queue and then we get session timeout exception.
Also, we can use a dynamic grid that selenium gives us this option. But again node docker restricts us with the number of containers we are running.
If we will run on demand by white box testing approach. Each test class will run in the same container and then we will get more indications of where the tests fail.
In addition, we can get a video of the running tests by running another container in parallel to the standalone container running.
By that, we can get the attached correct video running to the test.
Related issues
Require #762
How to test this PR
To start we need to do unit testing for example: When creating a webdriver with some options then the container that will rise up contains the correct options running.