Commit bc2055b0 authored by Roque Porchetto's avatar Roque Porchetto

New test suite for scalability tests moved to new folder 'scalability_test'

parent e68bee3a
import os.path
class WendelinERP5_scalability(_ERP5):
def getTestList(self):
return ['createPerson']
def getTestPath(self):
return 'examples/'
def getUsersFilePath(self):
return 'examples/scalabilityUsers'
def getUserNumber(self, test_number):
return 1
return [45, 135, 170, 220, 250][test_number]
# Test duration in seconds
def getTestDuration(self, test_number):
return 60*10
def getTestRepetition(self, test_number):
return 1
return 3
......@@ -26,81 +26,3 @@ class MasterWendelinERP5(ERP5TypeTestSuite):
BT5, '*', '*', '*', 'test.erp5.wendelin.test*.py'))]]
class _ERP5(ERP5TypeTestSuite):
realtime_output = False
enabled_product_list = ('CMFActivity', 'CMFCategory', 'ERP5', 'ERP5Catalog',
'ERP5eGovSecurity', 'ERP5Form',
'ERP5OOo', 'ERP5Security', 'ERP5SyncML', 'ERP5Type',
'ERP5VCS', 'ERP5Wizard', 'Formulator', 'ERP5Workflow',
'ERP5Configurator','HBTreeFolder2', 'MailTemplates',
'PortalTransforms', 'TimerService', 'ZLDAPConnection',
'ZLDAPMethods', 'ZMySQLDA', 'ZSQLCatalog', 'Zelenium')
def enableProducts(self):
product_set = set(self.enabled_product_list)
try:
dir_set = set(os.walk('Products').next()[1])
for product in dir_set - product_set:
os.unlink(os.path.join('Products', product))
product_set -= dir_set
except StopIteration:
os.mkdir('Products')
for product in product_set:
os.symlink(os.path.join('..', 'products', product),
os.path.join('Products', product))
def _getAllTestList(self):
test_list = []
path = sys.path[0]
component_re = re.compile(".*/([^/]+)/TestTemplateItem/portal_components"
"/test\.[^.]+\.([^.]+).py$")
for test_path in (
glob('%s/product/*/tests/test*.py' % path) +
glob('%s/bt5/*/TestTemplateItem/test*.py' % path) +
glob('%s/bt5/*/TestTemplateItem/portal_components/test.*.test*.py' % path)):
component_re_match = component_re.match(test_path)
if component_re_match is not None:
test_case = "%s:%s" % (component_re_match.group(1),
component_re_match.group(2))
else:
test_case = test_path.split(os.sep)[-1][:-3] # remove .py
product = test_path.split(os.sep)[-3]
# don't test 3rd party products
if product in ('PortalTransforms', 'MailTemplates', 'Zelenium'):
continue
# ERP5TioSafe is disabled for now because it requires external programs
# such as php and it has not been updated for Zope >= 2.12
if product == 'ERP5TioSafe':
continue
test_list.append(test_case)
return test_list
def update(self):
self.checkout('products', 'bt5')
self.enableProducts()
class WendelinERP5_scalability(_ERP5):
def getTestList(self):
return ['createPerson']
def getTestPath(self):
return 'examples/'
def getUsersFilePath(self):
return 'examples/scalabilityUsers'
def getUserNumber(self, test_number):
return 1
return [45, 135, 170, 220, 250][test_number]
# Test duration in seconds
def getTestDuration(self, test_number):
return 60*10
def getTestRepetition(self, test_number):
return 1
return 3
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment