Added test development features

This commit is contained in:
axl89 2016-06-03 16:26:37 +02:00
parent 87631edf4b
commit 65dbbd5498
2 changed files with 18 additions and 0 deletions

7
extras/build_ci_dev_vars.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
export TRAVIS_JOB_NUMBER="DEBUG"
export TRAVIS_COMMIT="DEBUG"
export TRAVIS_BRANCH="DEBUG"
export SAUCE_USERNAME="DEBUG"
export SAUCE_ACCESS_KEY="DEBUG"
export DEVELOPMENT=1

View File

@ -4,6 +4,17 @@ from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import random
import string
def gen_random_string(size,preffix=None):
random_string = ''.join(random.SystemRandom().choice(string.ascii_uppercase string.digits) for _ in range(size))
if preffix:
return preffix+random_string
else:
return random_string
def login(driver,user="admin",passwd="pandora",pandora_url="http://127.0.0.1/"):
driver.get(pandora_url+"/pandora_console/index.php")
driver.find_element_by_id("nick").clear()