Fixing test framework

This commit is contained in:
axl89 2016-08-19 16:04:28 +02:00
parent f8ec880e2a
commit c97c8d0868
10 changed files with 12 additions and 9 deletions

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from include.common_classes_60 import PandoraWebDriverTestCase from include.common_classes_60 import PandoraWebDriverTestCase
from include.common_functions_60 import login, is_element_present, click_menu_element, detect_and_pass_all_wizards, logout, gen_random_string, is_enterprise from include.common_functions_60 import is_element_present, click_menu_element, detect_and_pass_all_wizards, gen_random_string, is_enterprise
from include.agent_functions import create_agent, search_agent, create_agent_group from include.agent_functions import create_agent, search_agent, create_agent_group
from include.user_functions import create_user, create_user_profile from include.user_functions import create_user, create_user_profile
from include.module_functions import create_module from include.module_functions import create_module

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from include.common_classes_60 import PandoraWebDriverTestCase from include.common_classes_60 import PandoraWebDriverTestCase
from include.common_functions_60 import login, click_menu_element, detect_and_pass_all_wizards from include.common_functions_60 import click_menu_element, detect_and_pass_all_wizards
from include.agent_functions import create_agent from include.agent_functions import create_agent
from selenium import webdriver from selenium import webdriver
from selenium.webdriver.common.by import By from selenium.webdriver.common.by import By

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from include.common_classes_60 import PandoraWebDriverTestCase from include.common_classes_60 import PandoraWebDriverTestCase
from include.common_functions_60 import login, click_menu_element, refresh_N_times_until_find_element, detect_and_pass_all_wizards, is_element_present, logout from include.common_functions_60 import click_menu_element, refresh_N_times_until_find_element, detect_and_pass_all_wizards, is_element_present
from include.reports_functions import create_report, delete_report from include.reports_functions import create_report, delete_report
from include.user_functions import create_user from include.user_functions import create_user
from include.agent_functions import create_agent from include.agent_functions import create_agent

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from include.common_classes_60 import PandoraWebDriverTestCase from include.common_classes_60 import PandoraWebDriverTestCase
from include.common_functions_60 import login, click_menu_element, detect_and_pass_all_wizards, logout, gen_random_string, refresh_N_times_until_find_element from include.common_functions_60 import click_menu_element, detect_and_pass_all_wizards, gen_random_string, refresh_N_times_until_find_element
from include.planned_downtime_functions import * from include.planned_downtime_functions import *
from include.alert_functions import * from include.alert_functions import *
from include.module_functions import * from include.module_functions import *

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from include.common_classes_60 import PandoraWebDriverTestCase from include.common_classes_60 import PandoraWebDriverTestCase
from include.common_functions_60 import login, detect_and_pass_all_wizards, gen_random_string, is_enterprise from include.common_functions_60 import detect_and_pass_all_wizards, gen_random_string, is_enterprise
from include.policy_functions import * from include.policy_functions import *
from include.agent_functions import * from include.agent_functions import *
from include.collection_functions import * from include.collection_functions import *

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from include.common_classes_60 import PandoraWebDriverTestCase from include.common_classes_60 import PandoraWebDriverTestCase
from include.common_functions_60 import login, click_menu_element, detect_and_pass_all_wizards, logout, gen_random_string from include.common_functions_60 import click_menu_element, detect_and_pass_all_wizards, gen_random_string
from include.planned_downtime_functions import * from include.planned_downtime_functions import *
from include.alert_functions import * from include.alert_functions import *
from include.module_functions import * from include.module_functions import *

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from include.common_classes_60 import PandoraWebDriverTestCase from include.common_classes_60 import PandoraWebDriverTestCase
from include.common_functions_60 import login, logout, click_menu_element, detect_and_pass_all_wizards, activate_home_screen from include.common_functions_60 import click_menu_element, detect_and_pass_all_wizards, activate_home_screen
from selenium import webdriver from selenium import webdriver
from selenium.webdriver.common.by import By from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.keys import Keys

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from include.common_classes_60 import PandoraWebDriverTestCase from include.common_classes_60 import PandoraWebDriverTestCase
from include.common_functions_60 import login, click_menu_element, refresh_N_times_until_find_element, detect_and_pass_all_wizards, gen_random_string from include.common_functions_60 import click_menu_element, refresh_N_times_until_find_element, detect_and_pass_all_wizards, gen_random_string
from include.agent_functions import create_agent from include.agent_functions import create_agent
from selenium import webdriver from selenium import webdriver
from selenium.webdriver.common.by import By from selenium.webdriver.common.by import By

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from common_classes_60 import PandoraWebDriverTestCase from common_classes_60 import PandoraWebDriverTestCase
from common_functions_60 import login, click_menu_element, detect_and_pass_all_wizards, logout from common_functions_60 import click_menu_element, detect_and_pass_all_wizards
from selenium import webdriver from selenium import webdriver
from selenium.webdriver.common.by import By from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.keys import Keys

View File

@ -75,6 +75,8 @@ class TracingStreamResult(testtools.StreamResult):
self.skipped.append('test_id') self.skipped.append('test_id')
is_enterprise = '1' == getenv('ENTERPRISE', False) is_enterprise = '1' == getenv('ENTERPRISE', False)
num_threads = 0
if is_enterprise: if is_enterprise:
num_threads = 2 num_threads = 2
else: else:
@ -85,6 +87,7 @@ a = ArticaTestLoader()
tests = a.discover(start_dir='console',pattern='*.py') tests = a.discover(start_dir='console',pattern='*.py')
print str(tests.countTestCases())+" tests found" print str(tests.countTestCases())+" tests found"
print "Using "+str(num_threads)+" threads"
concurrent_suite = testtools.ConcurrentStreamTestSuite(lambda: (split_suite_into_chunks(num_threads, tests))) concurrent_suite = testtools.ConcurrentStreamTestSuite(lambda: (split_suite_into_chunks(num_threads, tests)))
result = TracingStreamResult() result = TracingStreamResult()