Browse Source

Does changing the port make Sauce Labs work?

tags/2.5.0
Matthew Petroff 5 years ago
parent
commit
275a3be3fc
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      tests/run_tests.py

+ 5
- 5
tests/run_tests.py View File

@@ -25,7 +25,7 @@ print("Starting web server...")
os.chdir(os.path.dirname(os.path.abspath(__file__))) # cd to script dir
os.chdir("..")
httpd = http.server.HTTPServer(
("127.0.0.1", 12345), http.server.SimpleHTTPRequestHandler
("localhost", 8000), http.server.SimpleHTTPRequestHandler
)
thread = threading.Thread(None, httpd.serve_forever)
thread.start()
@@ -36,10 +36,10 @@ print("Starting web driver...")
if os.environ.get("TRAVIS_JOB_NUMBER"):
# Configuration for Travis CI / Sauce Labs testing
driver = webdriver.Remote(
command_executor="http://{}:{}@ondemand.saucelabs.com/wd/hub".format(
os.environ["SAUCE_USERNAME"], os.environ["SAUCE_ACCESS_KEY"]
),
command_executor="https://ondemand.saucelabs.com:443/wd/hub",
desired_capabilities={
"username": os.environ["SAUCE_USERNAME"],
"accessKey": os.environ["SAUCE_ACCESS_KEY"],
"tunnel-identifier": os.environ["TRAVIS_JOB_NUMBER"],
"build": os.environ["TRAVIS_JOB_NUMBER"],
"browserName": "firefox",
@@ -56,7 +56,7 @@ else:
def run_tests():
# Load page
print("Loading page...")
driver.get("http://127.0.0.1:12345/tests/tests.html")
driver.get("http://localhost:8000/tests/tests.html")

# Make sure viewer loaded
print("Running tests...")


Loading…
Cancel
Save