In this video, Meaghan Lewis runs a Selenium WebDriver test against a local instance of the Selenium Grid. Meaghan also touches on hosting the grid on physical or virtual servers.
- Now that I have a central hub and node set up,…it's time to run test on the grid.…There is just one change that I need…to make to my test, first.…So I'll open up the test…in the exercise file for this video, 02 04.…In line 10, I will change the way the driver is created…and instead of using a regular Firefox driver,…I will use a remote Firefox instance.…So to do this, I will change the way my driver is set up…to create a remote driver with desired capabilities…and pass in Firefox.…
What this line now does is to create an instance…of the remote web driver…which indicates tests will be run remotely.…The desired capabilities represent the properties…that I want to launch the remote web driver with.…These properties can include browser name,…version and platform.…Now I will save this file and go back to my terminal.…And I'll run this test using the same command…I used previously, typing rspec blog-test.rb.…
When that happens, my test appears to have run…exactly as it did before.…A new Firefox browser window opens up,…
Find out how to set up the test-writing framework, WebDriver, and Selenium Grid, which allows you to distribute the testing load and run tests against a remote server. Learn best practices to write effective tests using variables and functions, and to organize tests into suites that can scale over time. Instructor Meaghan Lewis—a QA engineer at GitHub—also explains the test pyramid paradigm, which details an ideal way to balance unit, integration, and UI testing.
- Setting up Selenium WebDriver
- Using the Selenium grid to distribute the testing load
- Setting up a hub and nodes
- Writing clean test code
- Organizing a test suite