3 from os.path
import abspath, dirname, normpath, join
8 LOG =
normpath(join(BASEDIR,
'..',
'log.html'))
9 TESTDATA = join(BASEDIR,
'dir.suite')
10 OUTPUT = join(BASEDIR,
'output.xml')
11 TARGET = join(BASEDIR,
'data.js')
12 SRC =
normpath(join(BASEDIR,
'..',
'..',
'..'))
14 sys.path.insert(0, SRC)
24 run(testdata, loglevel=
'DEBUG', output=outxml, log=
None, report=
None)
29 'name':
'<Suite.Name>',
31 'noncritical': [
'*kek*kone*'],
32 'tagstatlink': [
'force:http://google.com:<kuukkeli>',
33 'i*:http://%1/?foo=bar&zap=%1:Title of i%1',
34 '?1:http://%1/<&>:Title',
35 '</script>:<url>:<title>'],
36 'tagdoc': [
'test:this_is_*my_bold*_test',
37 'IX:*Combined* and escaped << tag doc',
38 'i*:Me, myself, and I.',
40 'tagstatcombine': [
'fooANDi*:No Match',
45 result =
Results(settings, outxml).js_result
46 config = {
'logURL':
'log.html',
47 'title':
'This is a long long title. A very long title indeed. '
48 'And it even contains some stuff to <esc&ape>. '
49 'Yet it should still look good.',
51 'defaultLevel':
'DEBUG',
52 'reportURL':
'report.html',
53 'background': {
'fail':
'DeepPink'}}
56 writer.write(result, config)
57 print(
'Log: ',
normpath(join(BASEDIR,
'..',
'rebot',
'log.html')))
58 print(
'Report: ',
normpath(join(BASEDIR,
'..',
'rebot',
'report.html')))
61 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, usage=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.