3 from __future__
import print_function
5 from os.path
import abspath, dirname, normpath, join
10 LOG =
normpath(join(BASEDIR,
'..',
'log.html'))
11 TESTDATA = join(BASEDIR,
'dir.suite')
12 OUTPUT = join(BASEDIR,
'output.xml')
13 TARGET = join(BASEDIR,
'data.js')
14 SRC =
normpath(join(BASEDIR,
'..',
'..',
'..'))
16 sys.path.insert(0, SRC)
26 run(testdata, loglevel=
'DEBUG', output=outxml, log=
None, report=
None)
31 'name':
'<Suite.Name>',
33 'noncritical': [
'*kek*kone*'],
34 'tagstatlink': [
'force:http://google.com:<kuukkeli>',
35 'i*:http://%1/?foo=bar&zap=%1:Title of i%1',
36 '?1:http://%1/<&>:Title',
37 '</script>:<url>:<title>'],
38 'tagdoc': [
'test:this_is_*my_bold*_test',
39 'IX:*Combined* and escaped << tag doc',
40 'i*:Me, myself, and I.',
42 'tagstatcombine': [
'fooANDi*:No Match',
47 result =
Results(settings, outxml).js_result
48 config = {
'logURL':
'log.html',
49 'title':
'This is a long long title. A very long title indeed. '
50 'And it even contains some stuff to <esc&ape>. '
51 'Yet it should still look good.',
53 'defaultLevel':
'DEBUG',
54 'reportURL':
'report.html',
55 'background': {
'fail':
'DeepPink'}}
58 writer.write(result, config)
59 print(
'Log: ',
normpath(join(BASEDIR,
'..',
'rebot',
'log.html')))
60 print(
'Report: ',
normpath(join(BASEDIR,
'..',
'rebot',
'report.html')))
63 if __name__ ==
'__main__':
def create_jsdata(outxml, target)
def run_robot(testdata, outxml)
def run(*tests, **options)
Programmatic entry point for running tests.
def file_writer(path=None, encoding='UTF-8', newline=None)
def abspath(path, case_normalize=False)
Replacement for os.path.abspath with some enhancements and bug fixes.
def normpath(path, case_normalize=False)
Replacement for os.path.normpath with some enhancements.