diff options
| author | = <=> | 2019-03-11 05:45:03 -0400 |
|---|---|---|
| committer | = <=> | 2019-03-11 05:45:03 -0400 |
| commit | 033d0ff35744e498bb2e02d9f41492318d37724d (patch) | |
| tree | 385eb7233196e79d0a1c3d60d79df985f5fad417 /tests/testcases/test.py | |
| parent | f46aedcb7fb37dcd4483edd4a429a0c026038a9e (diff) | |
#791 - tweaks, rundirs
Diffstat (limited to 'tests/testcases/test.py')
| -rw-r--r-- | tests/testcases/test.py | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/tests/testcases/test.py b/tests/testcases/test.py index 621b6c60..0cc7e826 100644 --- a/tests/testcases/test.py +++ b/tests/testcases/test.py @@ -4,7 +4,7 @@ Invokes other test cases ''' import unittest -from time import sleep +from time import sleep,localtime,strftime from appium import webdriver import os import glob @@ -13,6 +13,7 @@ import common as c import wizard import app import montage +import errno class ZmninjaAndroidTests(unittest.TestCase): 'Class to run tests against zmNinja' @@ -51,16 +52,29 @@ class ZmninjaAndroidTests(unittest.TestCase): c.testConfig['portal'] = 'https://demo.zoneminder.com/zm' c.testConfig['user'] = 'zmuser' c.testConfig['password'] = 'zmpass' + + c.testConfig['portal'] = 'https://192.168.1.134/zm' + c.testConfig['user'] = 'admin' + c.testConfig['password'] = 'admin' + c.testConfig['use_auth'] = True c.testConfig['use_zm_auth'] = True c.testConfig['use_basic_auth'] = False - c.testConfig['screenshot_dir'] = './screenshots' - if not os.path.exists(c.testConfig['screenshot_dir']): + run_dir = strftime('%b-%d-%I_%M_%S%p', localtime()) + c.testConfig['screenshot_dir'] = './screenshots/'+run_dir + try: os.makedirs(c.testConfig['screenshot_dir']) - files = glob.glob(c.testConfig['screenshot_dir']+'/*') - for f in files: - os.remove(f) + except OSError as exc: + if exc.errno == errno.EEXIST and os.path.isdir(path): + pass + else: + raise + + + #files = glob.glob(c.testConfig['screenshot_dir']+'/*') + #for f in files: + # os.remove(f) self.wait_for_app_start() wizard.run_tests(self) |
