-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Copy pathsettings.py
executable file
·72 lines (57 loc) · 2.89 KB
/
settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
"""
You'll probably want to customize this to your own environment and needs.
"""
# #####>>>>>----- REQUIRED/IMPORTANT SETTINGS -----<<<<<#####
# Default times to wait for page elements to appear before performing actions
SMALL_TIMEOUT = 5
LARGE_TIMEOUT = 10
EXTREME_TIMEOUT = 30
# Default time to wait after each browser action performed during Demo Mode
# Use Demo Mode when you want others to see what your automation is doing
# Usage: --demo_mode when run from the command line when using --with-selenium
# This value can be overwritten on the command line by using --demo_sleep=FLOAT
DEFAULT_DEMO_MODE_TIMEOUT = 1.2
# If True, existing logs from past test runs will be saved and take up space.
# If False, only the logs from the most recent test run will be saved locally.
# This has no effect on Jenkins/S3/MySQL, which may still be saving test logs.
ARCHIVE_EXISTING_LOGS = False
# Default names for files saved during test failures when logging is turned on.
# (These files will get saved to the "logs/" folder)
SCREENSHOT_NAME = "screenshot.jpg"
BASIC_INFO_NAME = "basic_test_info.txt"
PAGE_SOURCE_NAME = "page_source.html"
''' This adds wait_for_ready_state_complete() after various browser actions.
By default, Selenium waits for the 'interactive' state before continuing.
Setting this to True may improve reliability at the cost of speed.
WARNING: Some websites are in a perpetual "interactive" state due to
dynamic content that never fully finishes loading (Use "False" there). '''
# Called after self.open(url) or self.open_url(url), NOT self.driver.open(url)
WAIT_FOR_RSC_ON_PAGE_LOADS = False
# Called after self.click(selector), NOT element.click()
WAIT_FOR_RSC_ON_CLICKS = False
# #####>>>>>----- RECOMMENDED SETTINGS -----<<<<<#####
# ##### (For test logging and database reporting)
# Amazon S3 Bucket Credentials
# (For saving screenshots and other log files from tests)
S3_LOG_BUCKET = "[[S3 BUCKET NAME]]"
S3_BUCKET_URL = ("https://[[S3 BUCKET_NAME]].s3.amazonaws.com/")
S3_SELENIUM_ACCESS_KEY = "[[S3_ACCESS_KEY]]"
S3_SELENIUM_SECRET_KEY = "[[S3_SECRET_KEY]]"
# MySQL DB Credentials
# (For saving data from tests)
DB_HOST = "[TEST DB HOST]" # Ex: "127.0.0.1"
DB_USERNAME = "[TEST DB USERNAME]" # Ex: "root"
DB_PASSWORD = "[TEST DB PASSWORD]" # Ex: "test"
DB_SCHEMA = "[TEST DB SCHEMA]" # Ex: "test"
# #####>>>>>----- OPTIONAL SETTINGS -----<<<<<#####
# ##### (For reading emails, notifying people via chat apps, etc.)
# Default Email Credentials
# (If tests send out emails, you can scan and verify them by using IMAP)
EMAIL_USERNAME = "[TEST ACCOUNT GMAIL USERNAME]@gmail.com"
EMAIL_PASSWORD = "[TEST ACCOUNT GMAIL PASSWORD]"
EMAIL_IMAP_STRING = "imap.gmail.com"
EMAIL_IMAP_PORT = 993
# HipChat Reporting Credentials
# (For HipChat notifications if your team uses HipChat)
# (room_id and owner_to_mention get entered during nosetest options)
HIPCHAT_AUTH_TOKEN = "[ENTER YOUR HIPCHAT AUTH TOKEN HERE]"