def __init__(self, section, xunit=True, engine='phantomjs', url=None): iptestcontroller.TestController.__init__(self) self.engine = engine self.section = section self.xunit = xunit self.url = url self.slimer_failure = re.compile('^FAIL.*', flags=re.MULTILINE) js_test_dir = iptestcontroller.get_js_test_dir() includes = '--includes=' + os.path.join(js_test_dir, 'util.js') # Only differs from the base class ctor at the following line: test_cases = ' '.join(glob.glob(os.path.join(test_root, 'test_*.js'))) self.cmd = ['casperjs', 'test', includes, test_cases, '--engine=%s' % self.engine]
def __init__(self, *args, **kwargs): ''' Create new test runner. ''' super(JSController, self).__init__(*args, **kwargs) # get the test dir for utils ip_test_dir = iptestcontroller.get_js_test_dir() extras = [ '--includes=%s' % join(ip_test_dir, 'util.js'), '--engine=%s' % self.engine ] self.cmd = ['casperjs', 'test'] + extras + TESTS
def __init__(self, section, xunit=True, engine='phantomjs'): """Create new test runner.""" iptestcontroller.TestController.__init__(self) self.engine = engine self.section = section self.xunit = xunit self.slimer_failure = re.compile('^FAIL.*', flags=re.MULTILINE) ip_test_dir = iptestcontroller.get_js_test_dir() extras = [ '--includes=' + os.path.join(ip_test_dir, 'util.js'), '--engine=%s' % self.engine ] self.cmd = ['casperjs', 'test'] + extras + tests
def __init__(self, section, xunit=True, engine='phantomjs', url=None): '''Create new test runner.''' iptestcontroller.TestController.__init__(self) self.engine = engine self.section = section self.xunit = xunit self.url = url self.slimer_failure = re.compile('^FAIL.*', flags=re.MULTILINE) ip_test_dir = iptestcontroller.get_js_test_dir() extras = [ '--includes=' + join(ip_test_dir, 'util.js'), '--engine=%s' % self.engine ] self.cmd = ['./node_modules/.bin/casperjs', 'test'] + extras + tests