问题
I created a Selenium hub and 3 chrome nodes using docker. i can see the 3 chrome instances are up and running in the docker
Now how do i stress test a web application. please suggest the steps to run test on selenium grid inside the docker.
回答1:
You may start with this simple Python test
#!/usr/bin/env python2.7
SELENIUM_HUB = 'http://localhost:4444/wd/hub'
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
driver = webdriver.Remote(
command_executor=SELENIUM_HUB,
desired_capabilities=DesiredCapabilities.CHROME,
)
driver.get('http://www.google.com')
print(driver.title)
来源:https://stackoverflow.com/questions/39347404/running-testng-suite-on-selenium-grid-and-docker