Slightly modified test runner script to specify test suite for debugging, implemented tests for info.werefox.cafe root page.
parent
e2e4e9b175
commit
fd2a56fac4
@ -0,0 +1,38 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
# Necessary imports
|
||||
from robot.api.logger import info
|
||||
from shared_methods import load_data, check_buttons, standardize_url
|
||||
import footer_test
|
||||
|
||||
|
||||
def execute_tests(driver, site_url):
|
||||
filepaths = ['/data/pages.yml', '/data/identities.yml']
|
||||
data = load_data(filepaths)
|
||||
for d in data:
|
||||
temp_url = standardize_url(data[d]['url'])
|
||||
if ('info.werefox.cafe' not in temp_url):
|
||||
data[d]['url'] = f'info.werefox.cafe{temp_url}'
|
||||
else:
|
||||
data[d]['url'] = temp_url
|
||||
|
||||
# Load requested site
|
||||
info('Attempting to get page...')
|
||||
driver.get(site_url)
|
||||
info('Page loaded.')
|
||||
|
||||
info('Attempting to click through subdomain buttons...')
|
||||
# Check all the buttons work
|
||||
if (not check_buttons(driver, data)):
|
||||
info('Test failed.')
|
||||
return False
|
||||
|
||||
# A little bit of setup, grabbing the button elements
|
||||
data = footer_test.load_data()
|
||||
# Check the footer buttons
|
||||
if (not check_buttons(driver, data)):
|
||||
info('Test failed.')
|
||||
return False
|
||||
|
||||
info('Test succeeded.')
|
||||
return True
|
@ -0,0 +1,14 @@
|
||||
*** Settings ***
|
||||
Documentation Import Python functions
|
||||
|
||||
Library info_root_domain_test.py
|
||||
Library shared_methods.py
|
||||
|
||||
|
||||
*** Keywords ***
|
||||
Info Werefox Cafe Test Cases
|
||||
[Arguments] ${site_url}
|
||||
|
||||
${result}= Execute Tests ${driver} ${site_url}
|
||||
|
||||
Should Be True ${result}
|
@ -0,0 +1,19 @@
|
||||
*** Settings ***
|
||||
Documentation Validate functionality of info.werefox.cafe's root page.
|
||||
|
||||
Resource info_werefox_cafe.resource
|
||||
Library webdriver_methods.py
|
||||
Variables shared_vars.py ${remote_url}
|
||||
|
||||
Default Tags positive
|
||||
|
||||
|
||||
*** Variables ***
|
||||
${remote_url} http://192.168.0.202:4444
|
||||
${site_url} https://info.werefox.cafe
|
||||
|
||||
|
||||
*** Test Cases ***
|
||||
Test Werefox Cafe [Documentation] Run Info Werefox Cafe Test Cases.
|
||||
Info Werefox Cafe Test Cases ${site_url}
|
||||
[Teardown] Teardown Webdriver ${driver}
|
Loading…
Reference in new issue