Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testsuite tag not created in junit.xml file after executing a robotframework file #4

Open
JoelDelumen opened this issue Mar 1, 2023 · 0 comments

Comments

@JoelDelumen
Copy link

After running a robotframework file, when I check on the generated junit xml file, I dont see another <testsuite> tag created. Based from the sample file from this repository, there should be 2 <testsuite> tags.

This results to having an error with the <failure> tag.
TypeError: object of type 'Failure' has no len()

Below is from the sample file of this repository:

<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="Tests" tests="3" errors="0" failures="1" skipped="0" time="23.210" timestamp="2022-06-13T11:57:04.700000">
<testsuite name="Homepage-Links" tests="3" errors="0" failures="1" skipped="0" time="23.188" timestamp="2022-06-13T11:57:04.717000">
<testcase classname="Tests.Homepage-Links" name="Go To My Account Page" time="8.101">
</testcase>
<testcase classname="Tests.Homepage-Links" name="Go To Demo Request Page" time="8.411">
</testcase>
<testcase classname="Tests.Homepage-Links" name="Go To Trial Request Page" time="6.510">
<failure message="Page should have contained text 'Hey, this is the wrong text!' but did not." type="AssertionError"/>
</testcase>
<properties>
<property name="Documentation" value="Simple homepage links tests"/>
</properties>
</testsuite>
</testsuite>

While below is after running a robot command. robot -d automation-frameworks-integration-main/samples/robotframework/sample_reports -x automation-frameworks-integration-main/samples/robotframework/sample_reports/junit-report.xml samples/robotframework/tests/homepage-links.robot

<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="Homepage-Links" tests="3" errors="0" failures="1" skipped="0" time="23.188" timestamp="2022-06-13T11:57:04.717000">
<testcase classname="Tests.Homepage-Links" name="Go To My Account Page" time="8.101">
</testcase>
<testcase classname="Tests.Homepage-Links" name="Go To Demo Request Page" time="8.411">
</testcase>
<testcase classname="Tests.Homepage-Links" name="Go To Trial Request Page" time="6.510">
<failure message="Page should have contained text 'Hey, this is the wrong text!' but did not." type="AssertionError"/>
</testcase>
<properties>
<property name="Documentation" value="Simple homepage links tests"/>
</properties>
</testsuite>

Above is just an example but I hope you get the point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant