robotframework-2.7.7.atest.robot.rebot.xunit.txt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of robotframework Show documentation
Show all versions of robotframework Show documentation
High level test automation framework
The newest version!
*** Settings ***
Default Tags regression jybot pybot
Suite Setup Create Input File
Test Setup Empty Directory ${MYOUTDIR}
Suite Teardown Remove Temps
Resource rebot_resource.txt
Variables unicode_vars.py
*** Variables ***
${TESTDATA_TEST} misc${/}unicode.txt
${TESTDATA_SUITES} misc${/}suites
${MYOUTDIR} %{TEMPDIR}${/}robot-test-xunit
${INPUT FILE} %{TEMPDIR}${/}robot-test-xunit-file.xml
${INVALID} %{TEMPDIR}${/}ïnvälïd-xünït.xml
*** Test Cases ***
No XUnit Option Given
Run Rebot ${EMPTY} ${INPUT FILE}
Stderr Should Be Empty
Check Stdout Does Not Contain XUnit
XUnit Option Given
Run Rebot --xunitfile xunit.xml --log log.html ${INPUT FILE}
Stderr Should Be Empty
Check Stdout Contains XUnit
File Should Exist ${OUTDIR}/xunit.xml
File Should Exist ${OUTDIR}/log.html
${root} = Parse XML ${OUTDIR}/xunit.xml
Should Be Equal ${root.tag} testsuite
${tests} = Get Elements ${root} testcase
Length Should Be ${tests} 18
Should Be Equal ${tests[7].attrib['name']} Ünïcödë Tëst änd Këywörd Nämës
${failures} = Get Elements ${root} testcase/failure
Length Should Be ${failures} 5
Should Be Equal ${failures[0].attrib['message']} ${MESSAGES}
Invalid XUnit File
Create Directory ${INVALID}
Run Rebot -x ${INVALID} -l log.html ${INPUT FILE}
File Should Not Exist ${INVALID}
File Should Exist ${OUTDIR}/log.html
${path} = Regexp Escape ${INVALID}
Check Stderr Matches Regexp
... \\[ ERROR \\] Writing xunit file '${path}' failed: .*
*** Keywords ***
Create Input File
Create Output With Robot ${INPUT FILE} ${EMPTY} ${TESTDATA_TEST} ${TESTDATA_SUITES}
Create Directory ${MYOUTDIR}
Remove Temps
Remove Directory ${MYOUTDIR} recursive
Remove File ${INPUT FILE}