Merge pull request #232 from lonnblad/bugfix/junit-time-format
Fixed a bug regarding JUnit time field
Этот коммит содержится в:
коммит
b87fa072fc
5 изменённых файлов: 153 добавлений и 148 удалений
|
@ -14,9 +14,9 @@ Feature: JUnit XML formatter
|
|||
Then the rendered xml will be as follows:
|
||||
""" application/xml
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuites name="godog" tests="1" skipped="0" failures="0" errors="0" time="0s">
|
||||
<testsuite name="simple feature" tests="1" skipped="0" failures="0" errors="0" time="0s">
|
||||
<testcase name="simple scenario" status="" time="0s"></testcase>
|
||||
<testsuites name="godog" tests="1" skipped="0" failures="0" errors="0" time="0">
|
||||
<testsuite name="simple feature" tests="1" skipped="0" failures="0" errors="0" time="0">
|
||||
<testcase name="simple scenario" status="" time="0"></testcase>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
"""
|
||||
|
@ -35,9 +35,9 @@ Feature: JUnit XML formatter
|
|||
Then the rendered xml will be as follows:
|
||||
""" application/xml
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuites name="godog" tests="1" skipped="0" failures="0" errors="0" time="0s">
|
||||
<testsuite name="simple feature" tests="1" skipped="0" failures="0" errors="0" time="0s">
|
||||
<testcase name="simple scenario" status="" time="0s"></testcase>
|
||||
<testsuites name="godog" tests="1" skipped="0" failures="0" errors="0" time="0">
|
||||
<testsuite name="simple feature" tests="1" skipped="0" failures="0" errors="0" time="0">
|
||||
<testcase name="simple scenario" status="" time="0"></testcase>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
"""
|
||||
|
@ -59,10 +59,10 @@ Feature: JUnit XML formatter
|
|||
Then the rendered xml will be as follows:
|
||||
""" application/xml
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuites name="godog" tests="2" skipped="0" failures="0" errors="0" time="0s">
|
||||
<testsuite name="simple feature" tests="2" skipped="0" failures="0" errors="0" time="0s">
|
||||
<testcase name="simple scenario #1" status="" time="0s"></testcase>
|
||||
<testcase name="simple scenario #2" status="" time="0s"></testcase>
|
||||
<testsuites name="godog" tests="2" skipped="0" failures="0" errors="0" time="0">
|
||||
<testsuite name="simple feature" tests="2" skipped="0" failures="0" errors="0" time="0">
|
||||
<testcase name="simple scenario #1" status="" time="0"></testcase>
|
||||
<testcase name="simple scenario #2" status="" time="0"></testcase>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
"""
|
||||
|
@ -88,10 +88,10 @@ Feature: JUnit XML formatter
|
|||
Then the rendered xml will be as follows:
|
||||
""" application/xml
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuites name="godog" tests="2" skipped="0" failures="0" errors="0" time="0s">
|
||||
<testsuite name="simple feature" tests="2" skipped="0" failures="0" errors="0" time="0s">
|
||||
<testcase name="simple scenario #1" status="" time="0s"></testcase>
|
||||
<testcase name="simple scenario #2" status="" time="0s"></testcase>
|
||||
<testsuites name="godog" tests="2" skipped="0" failures="0" errors="0" time="0">
|
||||
<testsuite name="simple feature" tests="2" skipped="0" failures="0" errors="0" time="0">
|
||||
<testcase name="simple scenario #1" status="" time="0"></testcase>
|
||||
<testcase name="simple scenario #2" status="" time="0"></testcase>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
"""
|
||||
|
@ -112,9 +112,9 @@ Feature: JUnit XML formatter
|
|||
Then the rendered xml will be as follows:
|
||||
""" application/xml
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuites name="godog" tests="1" skipped="0" failures="1" errors="0" time="0s">
|
||||
<testsuite name="simple feature" tests="1" skipped="0" failures="1" errors="0" time="0s">
|
||||
<testcase name="simple scenario" status="failed" time="0s">
|
||||
<testsuites name="godog" tests="1" skipped="0" failures="1" errors="0" time="0">
|
||||
<testsuite name="simple feature" tests="1" skipped="0" failures="1" errors="0" time="0">
|
||||
<testcase name="simple scenario" status="failed" time="0">
|
||||
<failure message="Step a failing step: intentional failure"></failure>
|
||||
</testcase>
|
||||
</testsuite>
|
||||
|
@ -141,10 +141,10 @@ Feature: JUnit XML formatter
|
|||
Then the rendered xml will be as follows:
|
||||
""" application/xml
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuites name="godog" tests="2" skipped="0" failures="1" errors="0" time="0s">
|
||||
<testsuite name="simple feature" tests="2" skipped="0" failures="1" errors="0" time="0s">
|
||||
<testcase name="simple scenario #1" status="passed" time="0s"></testcase>
|
||||
<testcase name="simple scenario #2" status="failed" time="0s">
|
||||
<testsuites name="godog" tests="2" skipped="0" failures="1" errors="0" time="0">
|
||||
<testsuite name="simple feature" tests="2" skipped="0" failures="1" errors="0" time="0">
|
||||
<testcase name="simple scenario #1" status="passed" time="0"></testcase>
|
||||
<testcase name="simple scenario #2" status="failed" time="0">
|
||||
<failure message="Step failing step: intentional failure"></failure>
|
||||
</testcase>
|
||||
</testsuite>
|
||||
|
@ -167,9 +167,9 @@ Feature: JUnit XML formatter
|
|||
Then the rendered xml will be as follows:
|
||||
""" application/xml
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuites name="godog" tests="1" skipped="0" failures="0" errors="0" time="0s">
|
||||
<testsuite name="simple feature" tests="1" skipped="0" failures="0" errors="0" time="0s">
|
||||
<testcase name="simple scenario" status="" time="0s"></testcase>
|
||||
<testsuites name="godog" tests="1" skipped="0" failures="0" errors="0" time="0">
|
||||
<testsuite name="simple feature" tests="1" skipped="0" failures="0" errors="0" time="0">
|
||||
<testcase name="simple scenario" status="" time="0"></testcase>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
"""
|
||||
|
@ -191,9 +191,9 @@ Feature: JUnit XML formatter
|
|||
Then the rendered xml will be as follows:
|
||||
""" application/xml
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuites name="godog" tests="1" skipped="0" failures="0" errors="0" time="0s">
|
||||
<testsuite name="simple feature" tests="1" skipped="0" failures="0" errors="0" time="0s">
|
||||
<testcase name="simple scenario" status="passed" time="0s"></testcase>
|
||||
<testsuites name="godog" tests="1" skipped="0" failures="0" errors="0" time="0">
|
||||
<testsuite name="simple feature" tests="1" skipped="0" failures="0" errors="0" time="0">
|
||||
<testcase name="simple scenario" status="passed" time="0"></testcase>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
"""
|
||||
|
@ -216,9 +216,9 @@ Feature: JUnit XML formatter
|
|||
Then the rendered xml will be as follows:
|
||||
""" application/xml
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuites name="godog" tests="1" skipped="0" failures="0" errors="1" time="0s">
|
||||
<testsuite name="simple feature" tests="1" skipped="0" failures="0" errors="1" time="0s">
|
||||
<testcase name="simple scenario" status="undefined" time="0s">
|
||||
<testsuites name="godog" tests="1" skipped="0" failures="0" errors="1" time="0">
|
||||
<testsuite name="simple feature" tests="1" skipped="0" failures="0" errors="1" time="0">
|
||||
<testcase name="simple scenario" status="undefined" time="0">
|
||||
<error message="Step pending step: TODO: write pending definition" type="pending"></error>
|
||||
<error message="Step undefined" type="undefined"></error>
|
||||
<error message="Step passing step" type="skipped"></error>
|
||||
|
|
|
@ -1624,7 +1624,7 @@
|
|||
"name": "the rendered xml will be as follows:",
|
||||
"line": 14,
|
||||
"doc_string": {
|
||||
"value": " \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n \u003ctestsuites name=\"godog\" tests=\"1\" skipped=\"0\" failures=\"0\" errors=\"0\" time=\"0s\"\u003e\n \u003ctestsuite name=\"simple feature\" tests=\"1\" skipped=\"0\" failures=\"0\" errors=\"0\" time=\"0s\"\u003e\n \u003ctestcase name=\"simple scenario\" status=\"\" time=\"0s\"\u003e\u003c/testcase\u003e\n \u003c/testsuite\u003e\n \u003c/testsuites\u003e",
|
||||
"value": " \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n \u003ctestsuites name=\"godog\" tests=\"1\" skipped=\"0\" failures=\"0\" errors=\"0\" time=\"0\"\u003e\n \u003ctestsuite name=\"simple feature\" tests=\"1\" skipped=\"0\" failures=\"0\" errors=\"0\" time=\"0\"\u003e\n \u003ctestcase name=\"simple scenario\" status=\"\" time=\"0\"\u003e\u003c/testcase\u003e\n \u003c/testsuite\u003e\n \u003c/testsuites\u003e",
|
||||
"content_type": "application/xml",
|
||||
"line": 15
|
||||
},
|
||||
|
@ -1680,7 +1680,7 @@
|
|||
"name": "the rendered xml will be as follows:",
|
||||
"line": 35,
|
||||
"doc_string": {
|
||||
"value": " \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n \u003ctestsuites name=\"godog\" tests=\"1\" skipped=\"0\" failures=\"0\" errors=\"0\" time=\"0s\"\u003e\n \u003ctestsuite name=\"simple feature\" tests=\"1\" skipped=\"0\" failures=\"0\" errors=\"0\" time=\"0s\"\u003e\n \u003ctestcase name=\"simple scenario\" status=\"\" time=\"0s\"\u003e\u003c/testcase\u003e\n \u003c/testsuite\u003e\n \u003c/testsuites\u003e",
|
||||
"value": " \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n \u003ctestsuites name=\"godog\" tests=\"1\" skipped=\"0\" failures=\"0\" errors=\"0\" time=\"0\"\u003e\n \u003ctestsuite name=\"simple feature\" tests=\"1\" skipped=\"0\" failures=\"0\" errors=\"0\" time=\"0\"\u003e\n \u003ctestcase name=\"simple scenario\" status=\"\" time=\"0\"\u003e\u003c/testcase\u003e\n \u003c/testsuite\u003e\n \u003c/testsuites\u003e",
|
||||
"content_type": "application/xml",
|
||||
"line": 36
|
||||
},
|
||||
|
@ -1736,7 +1736,7 @@
|
|||
"name": "the rendered xml will be as follows:",
|
||||
"line": 59,
|
||||
"doc_string": {
|
||||
"value": " \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n \u003ctestsuites name=\"godog\" tests=\"2\" skipped=\"0\" failures=\"0\" errors=\"0\" time=\"0s\"\u003e\n \u003ctestsuite name=\"simple feature\" tests=\"2\" skipped=\"0\" failures=\"0\" errors=\"0\" time=\"0s\"\u003e\n \u003ctestcase name=\"simple scenario #1\" status=\"\" time=\"0s\"\u003e\u003c/testcase\u003e\n \u003ctestcase name=\"simple scenario #2\" status=\"\" time=\"0s\"\u003e\u003c/testcase\u003e\n \u003c/testsuite\u003e\n \u003c/testsuites\u003e",
|
||||
"value": " \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n \u003ctestsuites name=\"godog\" tests=\"2\" skipped=\"0\" failures=\"0\" errors=\"0\" time=\"0\"\u003e\n \u003ctestsuite name=\"simple feature\" tests=\"2\" skipped=\"0\" failures=\"0\" errors=\"0\" time=\"0\"\u003e\n \u003ctestcase name=\"simple scenario #1\" status=\"\" time=\"0\"\u003e\u003c/testcase\u003e\n \u003ctestcase name=\"simple scenario #2\" status=\"\" time=\"0\"\u003e\u003c/testcase\u003e\n \u003c/testsuite\u003e\n \u003c/testsuites\u003e",
|
||||
"content_type": "application/xml",
|
||||
"line": 60
|
||||
},
|
||||
|
@ -1792,7 +1792,7 @@
|
|||
"name": "the rendered xml will be as follows:",
|
||||
"line": 88,
|
||||
"doc_string": {
|
||||
"value": " \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n \u003ctestsuites name=\"godog\" tests=\"2\" skipped=\"0\" failures=\"0\" errors=\"0\" time=\"0s\"\u003e\n \u003ctestsuite name=\"simple feature\" tests=\"2\" skipped=\"0\" failures=\"0\" errors=\"0\" time=\"0s\"\u003e\n \u003ctestcase name=\"simple scenario #1\" status=\"\" time=\"0s\"\u003e\u003c/testcase\u003e\n \u003ctestcase name=\"simple scenario #2\" status=\"\" time=\"0s\"\u003e\u003c/testcase\u003e\n \u003c/testsuite\u003e\n \u003c/testsuites\u003e",
|
||||
"value": " \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n \u003ctestsuites name=\"godog\" tests=\"2\" skipped=\"0\" failures=\"0\" errors=\"0\" time=\"0\"\u003e\n \u003ctestsuite name=\"simple feature\" tests=\"2\" skipped=\"0\" failures=\"0\" errors=\"0\" time=\"0\"\u003e\n \u003ctestcase name=\"simple scenario #1\" status=\"\" time=\"0\"\u003e\u003c/testcase\u003e\n \u003ctestcase name=\"simple scenario #2\" status=\"\" time=\"0\"\u003e\u003c/testcase\u003e\n \u003c/testsuite\u003e\n \u003c/testsuites\u003e",
|
||||
"content_type": "application/xml",
|
||||
"line": 89
|
||||
},
|
||||
|
@ -1848,7 +1848,7 @@
|
|||
"name": "the rendered xml will be as follows:",
|
||||
"line": 112,
|
||||
"doc_string": {
|
||||
"value": " \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n \u003ctestsuites name=\"godog\" tests=\"1\" skipped=\"0\" failures=\"1\" errors=\"0\" time=\"0s\"\u003e\n \u003ctestsuite name=\"simple feature\" tests=\"1\" skipped=\"0\" failures=\"1\" errors=\"0\" time=\"0s\"\u003e\n \u003ctestcase name=\"simple scenario\" status=\"failed\" time=\"0s\"\u003e\n \u003cfailure message=\"Step a failing step: intentional failure\"\u003e\u003c/failure\u003e\n \u003c/testcase\u003e\n \u003c/testsuite\u003e\n \u003c/testsuites\u003e",
|
||||
"value": " \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n \u003ctestsuites name=\"godog\" tests=\"1\" skipped=\"0\" failures=\"1\" errors=\"0\" time=\"0\"\u003e\n \u003ctestsuite name=\"simple feature\" tests=\"1\" skipped=\"0\" failures=\"1\" errors=\"0\" time=\"0\"\u003e\n \u003ctestcase name=\"simple scenario\" status=\"failed\" time=\"0\"\u003e\n \u003cfailure message=\"Step a failing step: intentional failure\"\u003e\u003c/failure\u003e\n \u003c/testcase\u003e\n \u003c/testsuite\u003e\n \u003c/testsuites\u003e",
|
||||
"content_type": "application/xml",
|
||||
"line": 113
|
||||
},
|
||||
|
@ -1904,7 +1904,7 @@
|
|||
"name": "the rendered xml will be as follows:",
|
||||
"line": 141,
|
||||
"doc_string": {
|
||||
"value": " \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n \u003ctestsuites name=\"godog\" tests=\"2\" skipped=\"0\" failures=\"1\" errors=\"0\" time=\"0s\"\u003e\n \u003ctestsuite name=\"simple feature\" tests=\"2\" skipped=\"0\" failures=\"1\" errors=\"0\" time=\"0s\"\u003e\n \u003ctestcase name=\"simple scenario #1\" status=\"passed\" time=\"0s\"\u003e\u003c/testcase\u003e\n \u003ctestcase name=\"simple scenario #2\" status=\"failed\" time=\"0s\"\u003e\n \u003cfailure message=\"Step failing step: intentional failure\"\u003e\u003c/failure\u003e\n \u003c/testcase\u003e\n \u003c/testsuite\u003e\n \u003c/testsuites\u003e",
|
||||
"value": " \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n \u003ctestsuites name=\"godog\" tests=\"2\" skipped=\"0\" failures=\"1\" errors=\"0\" time=\"0\"\u003e\n \u003ctestsuite name=\"simple feature\" tests=\"2\" skipped=\"0\" failures=\"1\" errors=\"0\" time=\"0\"\u003e\n \u003ctestcase name=\"simple scenario #1\" status=\"passed\" time=\"0\"\u003e\u003c/testcase\u003e\n \u003ctestcase name=\"simple scenario #2\" status=\"failed\" time=\"0\"\u003e\n \u003cfailure message=\"Step failing step: intentional failure\"\u003e\u003c/failure\u003e\n \u003c/testcase\u003e\n \u003c/testsuite\u003e\n \u003c/testsuites\u003e",
|
||||
"content_type": "application/xml",
|
||||
"line": 142
|
||||
},
|
||||
|
@ -1960,7 +1960,7 @@
|
|||
"name": "the rendered xml will be as follows:",
|
||||
"line": 167,
|
||||
"doc_string": {
|
||||
"value": " \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n \u003ctestsuites name=\"godog\" tests=\"1\" skipped=\"0\" failures=\"0\" errors=\"0\" time=\"0s\"\u003e\n \u003ctestsuite name=\"simple feature\" tests=\"1\" skipped=\"0\" failures=\"0\" errors=\"0\" time=\"0s\"\u003e\n \u003ctestcase name=\"simple scenario\" status=\"\" time=\"0s\"\u003e\u003c/testcase\u003e\n \u003c/testsuite\u003e\n \u003c/testsuites\u003e",
|
||||
"value": " \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n \u003ctestsuites name=\"godog\" tests=\"1\" skipped=\"0\" failures=\"0\" errors=\"0\" time=\"0\"\u003e\n \u003ctestsuite name=\"simple feature\" tests=\"1\" skipped=\"0\" failures=\"0\" errors=\"0\" time=\"0\"\u003e\n \u003ctestcase name=\"simple scenario\" status=\"\" time=\"0\"\u003e\u003c/testcase\u003e\n \u003c/testsuite\u003e\n \u003c/testsuites\u003e",
|
||||
"content_type": "application/xml",
|
||||
"line": 168
|
||||
},
|
||||
|
@ -2016,7 +2016,7 @@
|
|||
"name": "the rendered xml will be as follows:",
|
||||
"line": 191,
|
||||
"doc_string": {
|
||||
"value": " \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n \u003ctestsuites name=\"godog\" tests=\"1\" skipped=\"0\" failures=\"0\" errors=\"0\" time=\"0s\"\u003e\n \u003ctestsuite name=\"simple feature\" tests=\"1\" skipped=\"0\" failures=\"0\" errors=\"0\" time=\"0s\"\u003e\n \u003ctestcase name=\"simple scenario\" status=\"passed\" time=\"0s\"\u003e\u003c/testcase\u003e\n \u003c/testsuite\u003e\n \u003c/testsuites\u003e",
|
||||
"value": " \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n \u003ctestsuites name=\"godog\" tests=\"1\" skipped=\"0\" failures=\"0\" errors=\"0\" time=\"0\"\u003e\n \u003ctestsuite name=\"simple feature\" tests=\"1\" skipped=\"0\" failures=\"0\" errors=\"0\" time=\"0\"\u003e\n \u003ctestcase name=\"simple scenario\" status=\"passed\" time=\"0\"\u003e\u003c/testcase\u003e\n \u003c/testsuite\u003e\n \u003c/testsuites\u003e",
|
||||
"content_type": "application/xml",
|
||||
"line": 192
|
||||
},
|
||||
|
@ -2072,7 +2072,7 @@
|
|||
"name": "the rendered xml will be as follows:",
|
||||
"line": 216,
|
||||
"doc_string": {
|
||||
"value": " \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n \u003ctestsuites name=\"godog\" tests=\"1\" skipped=\"0\" failures=\"0\" errors=\"1\" time=\"0s\"\u003e\n \u003ctestsuite name=\"simple feature\" tests=\"1\" skipped=\"0\" failures=\"0\" errors=\"1\" time=\"0s\"\u003e\n \u003ctestcase name=\"simple scenario\" status=\"undefined\" time=\"0s\"\u003e\n \u003cerror message=\"Step pending step: TODO: write pending definition\" type=\"pending\"\u003e\u003c/error\u003e\n \u003cerror message=\"Step undefined\" type=\"undefined\"\u003e\u003c/error\u003e\n \u003cerror message=\"Step passing step\" type=\"skipped\"\u003e\u003c/error\u003e\n \u003c/testcase\u003e\n \u003c/testsuite\u003e\n \u003c/testsuites\u003e",
|
||||
"value": " \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n \u003ctestsuites name=\"godog\" tests=\"1\" skipped=\"0\" failures=\"0\" errors=\"1\" time=\"0\"\u003e\n \u003ctestsuite name=\"simple feature\" tests=\"1\" skipped=\"0\" failures=\"0\" errors=\"1\" time=\"0\"\u003e\n \u003ctestcase name=\"simple scenario\" status=\"undefined\" time=\"0\"\u003e\n \u003cerror message=\"Step pending step: TODO: write pending definition\" type=\"pending\"\u003e\u003c/error\u003e\n \u003cerror message=\"Step undefined\" type=\"undefined\"\u003e\u003c/error\u003e\n \u003cerror message=\"Step passing step\" type=\"skipped\"\u003e\u003c/error\u003e\n \u003c/testcase\u003e\n \u003c/testsuite\u003e\n \u003c/testsuites\u003e",
|
||||
"content_type": "application/xml",
|
||||
"line": 217
|
||||
},
|
||||
|
|
|
@ -1,107 +1,107 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuites name="succeed" tests="78" skipped="0" failures="0" errors="0" time="0s">
|
||||
<testsuite name="JUnit XML formatter" tests="9" skipped="0" failures="0" errors="0" time="0s">
|
||||
<testcase name="Support of Feature Plus Scenario Node" status="passed" time="0s"></testcase>
|
||||
<testcase name="Support of Feature Plus Scenario Node With Tags" status="passed" time="0s"></testcase>
|
||||
<testcase name="Support of Feature Plus Scenario Outline" status="passed" time="0s"></testcase>
|
||||
<testcase name="Support of Feature Plus Scenario Outline With Tags" status="passed" time="0s"></testcase>
|
||||
<testcase name="Support of Feature Plus Scenario With Steps" status="passed" time="0s"></testcase>
|
||||
<testcase name="Support of Feature Plus Scenario Outline With Steps" status="passed" time="0s"></testcase>
|
||||
<testcase name="Support of Comments" status="passed" time="0s"></testcase>
|
||||
<testcase name="Support of Docstrings" status="passed" time="0s"></testcase>
|
||||
<testcase name="Support of Undefined, Pending and Skipped status" status="passed" time="0s"></testcase>
|
||||
<testsuites name="succeed" tests="78" skipped="0" failures="0" errors="0" time="0">
|
||||
<testsuite name="JUnit XML formatter" tests="9" skipped="0" failures="0" errors="0" time="0">
|
||||
<testcase name="Support of Feature Plus Scenario Node" status="passed" time="0"></testcase>
|
||||
<testcase name="Support of Feature Plus Scenario Node With Tags" status="passed" time="0"></testcase>
|
||||
<testcase name="Support of Feature Plus Scenario Outline" status="passed" time="0"></testcase>
|
||||
<testcase name="Support of Feature Plus Scenario Outline With Tags" status="passed" time="0"></testcase>
|
||||
<testcase name="Support of Feature Plus Scenario With Steps" status="passed" time="0"></testcase>
|
||||
<testcase name="Support of Feature Plus Scenario Outline With Steps" status="passed" time="0"></testcase>
|
||||
<testcase name="Support of Comments" status="passed" time="0"></testcase>
|
||||
<testcase name="Support of Docstrings" status="passed" time="0"></testcase>
|
||||
<testcase name="Support of Undefined, Pending and Skipped status" status="passed" time="0"></testcase>
|
||||
</testsuite>
|
||||
<testsuite name="cucumber json formatter" tests="9" skipped="0" failures="0" errors="0" time="0s">
|
||||
<testcase name="Support of Feature Plus Scenario Node" status="passed" time="0s"></testcase>
|
||||
<testcase name="Support of Feature Plus Scenario Node With Tags" status="passed" time="0s"></testcase>
|
||||
<testcase name="Support of Feature Plus Scenario Outline" status="passed" time="0s"></testcase>
|
||||
<testcase name="Support of Feature Plus Scenario Outline With Tags" status="passed" time="0s"></testcase>
|
||||
<testcase name="Support of Feature Plus Scenario With Steps" status="passed" time="0s"></testcase>
|
||||
<testcase name="Support of Feature Plus Scenario Outline With Steps" status="passed" time="0s"></testcase>
|
||||
<testcase name="Support of Comments" status="passed" time="0s"></testcase>
|
||||
<testcase name="Support of Docstrings" status="passed" time="0s"></testcase>
|
||||
<testcase name="Support of Undefined, Pending and Skipped status" status="passed" time="0s"></testcase>
|
||||
<testsuite name="cucumber json formatter" tests="9" skipped="0" failures="0" errors="0" time="0">
|
||||
<testcase name="Support of Feature Plus Scenario Node" status="passed" time="0"></testcase>
|
||||
<testcase name="Support of Feature Plus Scenario Node With Tags" status="passed" time="0"></testcase>
|
||||
<testcase name="Support of Feature Plus Scenario Outline" status="passed" time="0"></testcase>
|
||||
<testcase name="Support of Feature Plus Scenario Outline With Tags" status="passed" time="0"></testcase>
|
||||
<testcase name="Support of Feature Plus Scenario With Steps" status="passed" time="0"></testcase>
|
||||
<testcase name="Support of Feature Plus Scenario Outline With Steps" status="passed" time="0"></testcase>
|
||||
<testcase name="Support of Comments" status="passed" time="0"></testcase>
|
||||
<testcase name="Support of Docstrings" status="passed" time="0"></testcase>
|
||||
<testcase name="Support of Undefined, Pending and Skipped status" status="passed" time="0"></testcase>
|
||||
</testsuite>
|
||||
<testsuite name="event stream formatter" tests="3" skipped="0" failures="0" errors="0" time="0s">
|
||||
<testcase name="should fire only suite events without any scenario" status="passed" time="0s"></testcase>
|
||||
<testcase name="should process simple scenario" status="passed" time="0s"></testcase>
|
||||
<testcase name="should process outline scenario" status="passed" time="0s"></testcase>
|
||||
<testsuite name="event stream formatter" tests="3" skipped="0" failures="0" errors="0" time="0">
|
||||
<testcase name="should fire only suite events without any scenario" status="passed" time="0"></testcase>
|
||||
<testcase name="should process simple scenario" status="passed" time="0"></testcase>
|
||||
<testcase name="should process outline scenario" status="passed" time="0"></testcase>
|
||||
</testsuite>
|
||||
<testsuite name="load features" tests="6" skipped="0" failures="0" errors="0" time="0s">
|
||||
<testcase name="load features within path" status="passed" time="0s"></testcase>
|
||||
<testcase name="load a specific feature file" status="passed" time="0s"></testcase>
|
||||
<testcase name="loaded feature should have a number of scenarios #1" status="passed" time="0s"></testcase>
|
||||
<testcase name="loaded feature should have a number of scenarios #2" status="passed" time="0s"></testcase>
|
||||
<testcase name="loaded feature should have a number of scenarios #3" status="passed" time="0s"></testcase>
|
||||
<testcase name="load a number of feature files" status="passed" time="0s"></testcase>
|
||||
<testsuite name="load features" tests="6" skipped="0" failures="0" errors="0" time="0">
|
||||
<testcase name="load features within path" status="passed" time="0"></testcase>
|
||||
<testcase name="load a specific feature file" status="passed" time="0"></testcase>
|
||||
<testcase name="loaded feature should have a number of scenarios #1" status="passed" time="0"></testcase>
|
||||
<testcase name="loaded feature should have a number of scenarios #2" status="passed" time="0"></testcase>
|
||||
<testcase name="loaded feature should have a number of scenarios #3" status="passed" time="0"></testcase>
|
||||
<testcase name="load a number of feature files" status="passed" time="0"></testcase>
|
||||
</testsuite>
|
||||
<testsuite name="pretty formatter" tests="9" skipped="0" failures="0" errors="0" time="0s">
|
||||
<testcase name="Support of Feature Plus Scenario Node" status="passed" time="0s"></testcase>
|
||||
<testcase name="Support of Feature Plus Scenario Node With Tags" status="passed" time="0s"></testcase>
|
||||
<testcase name="Support of Feature Plus Scenario Outline" status="passed" time="0s"></testcase>
|
||||
<testcase name="Support of Feature Plus Scenario Outline With Tags" status="passed" time="0s"></testcase>
|
||||
<testcase name="Support of Feature Plus Scenario With Steps" status="passed" time="0s"></testcase>
|
||||
<testcase name="Support of Feature Plus Scenario Outline With Steps" status="passed" time="0s"></testcase>
|
||||
<testcase name="Support of Comments" status="passed" time="0s"></testcase>
|
||||
<testcase name="Support of Docstrings" status="passed" time="0s"></testcase>
|
||||
<testcase name="Support of Undefined, Pending and Skipped status" status="passed" time="0s"></testcase>
|
||||
<testsuite name="pretty formatter" tests="9" skipped="0" failures="0" errors="0" time="0">
|
||||
<testcase name="Support of Feature Plus Scenario Node" status="passed" time="0"></testcase>
|
||||
<testcase name="Support of Feature Plus Scenario Node With Tags" status="passed" time="0"></testcase>
|
||||
<testcase name="Support of Feature Plus Scenario Outline" status="passed" time="0"></testcase>
|
||||
<testcase name="Support of Feature Plus Scenario Outline With Tags" status="passed" time="0"></testcase>
|
||||
<testcase name="Support of Feature Plus Scenario With Steps" status="passed" time="0"></testcase>
|
||||
<testcase name="Support of Feature Plus Scenario Outline With Steps" status="passed" time="0"></testcase>
|
||||
<testcase name="Support of Comments" status="passed" time="0"></testcase>
|
||||
<testcase name="Support of Docstrings" status="passed" time="0"></testcase>
|
||||
<testcase name="Support of Undefined, Pending and Skipped status" status="passed" time="0"></testcase>
|
||||
</testsuite>
|
||||
<testsuite name="run background" tests="3" skipped="0" failures="0" errors="0" time="0s">
|
||||
<testcase name="should run background steps" status="passed" time="0s"></testcase>
|
||||
<testcase name="should skip all consequent steps on failure" status="passed" time="0s"></testcase>
|
||||
<testcase name="should continue undefined steps" status="passed" time="0s"></testcase>
|
||||
<testsuite name="run background" tests="3" skipped="0" failures="0" errors="0" time="0">
|
||||
<testcase name="should run background steps" status="passed" time="0"></testcase>
|
||||
<testcase name="should skip all consequent steps on failure" status="passed" time="0"></testcase>
|
||||
<testcase name="should continue undefined steps" status="passed" time="0"></testcase>
|
||||
</testsuite>
|
||||
<testsuite name="run features" tests="11" skipped="0" failures="0" errors="0" time="0s">
|
||||
<testcase name="should run a normal feature" status="passed" time="0s"></testcase>
|
||||
<testcase name="should skip steps after failure" status="passed" time="0s"></testcase>
|
||||
<testcase name="should skip all scenarios if background fails" status="passed" time="0s"></testcase>
|
||||
<testcase name="should skip steps after undefined" status="passed" time="0s"></testcase>
|
||||
<testcase name="should match undefined steps in a row" status="passed" time="0s"></testcase>
|
||||
<testcase name="should skip steps on pending" status="passed" time="0s"></testcase>
|
||||
<testcase name="should handle pending step" status="passed" time="0s"></testcase>
|
||||
<testcase name="should mark undefined steps after pending" status="passed" time="0s"></testcase>
|
||||
<testcase name="should fail suite if undefined steps follow after the failure" status="passed" time="0s"></testcase>
|
||||
<testcase name="should fail suite and skip pending step after failed step" status="passed" time="0s"></testcase>
|
||||
<testcase name="should fail suite and skip next step after failed step" status="passed" time="0s"></testcase>
|
||||
<testsuite name="run features" tests="11" skipped="0" failures="0" errors="0" time="0">
|
||||
<testcase name="should run a normal feature" status="passed" time="0"></testcase>
|
||||
<testcase name="should skip steps after failure" status="passed" time="0"></testcase>
|
||||
<testcase name="should skip all scenarios if background fails" status="passed" time="0"></testcase>
|
||||
<testcase name="should skip steps after undefined" status="passed" time="0"></testcase>
|
||||
<testcase name="should match undefined steps in a row" status="passed" time="0"></testcase>
|
||||
<testcase name="should skip steps on pending" status="passed" time="0"></testcase>
|
||||
<testcase name="should handle pending step" status="passed" time="0"></testcase>
|
||||
<testcase name="should mark undefined steps after pending" status="passed" time="0"></testcase>
|
||||
<testcase name="should fail suite if undefined steps follow after the failure" status="passed" time="0"></testcase>
|
||||
<testcase name="should fail suite and skip pending step after failed step" status="passed" time="0"></testcase>
|
||||
<testcase name="should fail suite and skip next step after failed step" status="passed" time="0"></testcase>
|
||||
</testsuite>
|
||||
<testsuite name="run features with nested steps" tests="6" skipped="0" failures="0" errors="0" time="0s">
|
||||
<testcase name="should run passing multistep successfully" status="passed" time="0s"></testcase>
|
||||
<testcase name="should fail multistep" status="passed" time="0s"></testcase>
|
||||
<testcase name="should fail nested multistep" status="passed" time="0s"></testcase>
|
||||
<testcase name="should skip steps after undefined multistep" status="passed" time="0s"></testcase>
|
||||
<testcase name="should match undefined steps in a row" status="passed" time="0s"></testcase>
|
||||
<testcase name="should mark undefined steps after pending" status="passed" time="0s"></testcase>
|
||||
<testsuite name="run features with nested steps" tests="6" skipped="0" failures="0" errors="0" time="0">
|
||||
<testcase name="should run passing multistep successfully" status="passed" time="0"></testcase>
|
||||
<testcase name="should fail multistep" status="passed" time="0"></testcase>
|
||||
<testcase name="should fail nested multistep" status="passed" time="0"></testcase>
|
||||
<testcase name="should skip steps after undefined multistep" status="passed" time="0"></testcase>
|
||||
<testcase name="should match undefined steps in a row" status="passed" time="0"></testcase>
|
||||
<testcase name="should mark undefined steps after pending" status="passed" time="0"></testcase>
|
||||
</testsuite>
|
||||
<testsuite name="run outline" tests="6" skipped="0" failures="0" errors="0" time="0s">
|
||||
<testcase name="should run a normal outline" status="passed" time="0s"></testcase>
|
||||
<testcase name="should continue through examples on failure" status="passed" time="0s"></testcase>
|
||||
<testcase name="should skip examples on background failure" status="passed" time="0s"></testcase>
|
||||
<testcase name="should translate step table body" status="passed" time="0s"></testcase>
|
||||
<testcase name="should translate step doc string argument #1" status="passed" time="0s"></testcase>
|
||||
<testcase name="should translate step doc string argument #2" status="passed" time="0s"></testcase>
|
||||
<testsuite name="run outline" tests="6" skipped="0" failures="0" errors="0" time="0">
|
||||
<testcase name="should run a normal outline" status="passed" time="0"></testcase>
|
||||
<testcase name="should continue through examples on failure" status="passed" time="0"></testcase>
|
||||
<testcase name="should skip examples on background failure" status="passed" time="0"></testcase>
|
||||
<testcase name="should translate step table body" status="passed" time="0"></testcase>
|
||||
<testcase name="should translate step doc string argument #1" status="passed" time="0"></testcase>
|
||||
<testcase name="should translate step doc string argument #2" status="passed" time="0"></testcase>
|
||||
</testsuite>
|
||||
<testsuite name="suite events" tests="6" skipped="0" failures="0" errors="0" time="0s">
|
||||
<testcase name="triggers before scenario event" status="passed" time="0s"></testcase>
|
||||
<testcase name="triggers appropriate events for a single scenario" status="passed" time="0s"></testcase>
|
||||
<testcase name="triggers appropriate events whole feature" status="passed" time="0s"></testcase>
|
||||
<testcase name="triggers appropriate events for two feature files" status="passed" time="0s"></testcase>
|
||||
<testcase name="should not trigger events on empty feature" status="passed" time="0s"></testcase>
|
||||
<testcase name="should not trigger events on empty scenarios" status="passed" time="0s"></testcase>
|
||||
<testsuite name="suite events" tests="6" skipped="0" failures="0" errors="0" time="0">
|
||||
<testcase name="triggers before scenario event" status="passed" time="0"></testcase>
|
||||
<testcase name="triggers appropriate events for a single scenario" status="passed" time="0"></testcase>
|
||||
<testcase name="triggers appropriate events whole feature" status="passed" time="0"></testcase>
|
||||
<testcase name="triggers appropriate events for two feature files" status="passed" time="0"></testcase>
|
||||
<testcase name="should not trigger events on empty feature" status="passed" time="0"></testcase>
|
||||
<testcase name="should not trigger events on empty scenarios" status="passed" time="0"></testcase>
|
||||
</testsuite>
|
||||
<testsuite name="tag filters" tests="4" skipped="0" failures="0" errors="0" time="0s">
|
||||
<testcase name="should filter outline examples by tags" status="passed" time="0s"></testcase>
|
||||
<testcase name="should filter scenarios by X tag" status="passed" time="0s"></testcase>
|
||||
<testcase name="should filter scenarios by X tag not having Y" status="passed" time="0s"></testcase>
|
||||
<testcase name="should filter scenarios having Y and Z tags" status="passed" time="0s"></testcase>
|
||||
<testsuite name="tag filters" tests="4" skipped="0" failures="0" errors="0" time="0">
|
||||
<testcase name="should filter outline examples by tags" status="passed" time="0"></testcase>
|
||||
<testcase name="should filter scenarios by X tag" status="passed" time="0"></testcase>
|
||||
<testcase name="should filter scenarios by X tag not having Y" status="passed" time="0"></testcase>
|
||||
<testcase name="should filter scenarios having Y and Z tags" status="passed" time="0"></testcase>
|
||||
</testsuite>
|
||||
<testsuite name="undefined step snippets" tests="5" skipped="0" failures="0" errors="0" time="0s">
|
||||
<testcase name="should generate snippets" status="passed" time="0s"></testcase>
|
||||
<testcase name="should generate snippets with more arguments" status="passed" time="0s"></testcase>
|
||||
<testcase name="should handle escaped symbols" status="passed" time="0s"></testcase>
|
||||
<testcase name="should handle string argument followed by comma" status="passed" time="0s"></testcase>
|
||||
<testcase name="should handle arguments in the beggining or end of the step" status="passed" time="0s"></testcase>
|
||||
<testsuite name="undefined step snippets" tests="5" skipped="0" failures="0" errors="0" time="0">
|
||||
<testcase name="should generate snippets" status="passed" time="0"></testcase>
|
||||
<testcase name="should generate snippets with more arguments" status="passed" time="0"></testcase>
|
||||
<testcase name="should handle escaped symbols" status="passed" time="0"></testcase>
|
||||
<testcase name="should handle string argument followed by comma" status="passed" time="0"></testcase>
|
||||
<testcase name="should handle arguments in the beggining or end of the step" status="passed" time="0"></testcase>
|
||||
</testsuite>
|
||||
<testsuite name="užkrauti savybes" tests="1" skipped="0" failures="0" errors="0" time="0s">
|
||||
<testcase name="savybių užkrovimas iš aplanko" status="passed" time="0s"></testcase>
|
||||
<testsuite name="užkrauti savybes" tests="1" skipped="0" failures="0" errors="0" time="0">
|
||||
<testcase name="savybių užkrovimas iš aplanko" status="passed" time="0"></testcase>
|
||||
</testsuite>
|
||||
</testsuites>
|
16
fmt_junit.go
16
fmt_junit.go
|
@ -6,6 +6,7 @@ import (
|
|||
"io"
|
||||
"os"
|
||||
"sort"
|
||||
"strconv"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
|
@ -119,11 +120,15 @@ func (f *junitFormatter) Copy(cf ConcurrentFormatter) {
|
|||
}
|
||||
}
|
||||
|
||||
func junitTimeDuration(from, to time.Time) string {
|
||||
return strconv.FormatFloat(to.Sub(from).Seconds(), 'f', -1, 64)
|
||||
}
|
||||
|
||||
func buildJUNITPackageSuite(suiteName string, startedAt time.Time, features []*feature) junitPackageSuite {
|
||||
suite := junitPackageSuite{
|
||||
Name: suiteName,
|
||||
TestSuites: make([]*junitTestSuite, len(features)),
|
||||
Time: timeNowFunc().Sub(startedAt).String(),
|
||||
Time: junitTimeDuration(startedAt, timeNowFunc()),
|
||||
}
|
||||
|
||||
sort.Sort(sortByName(features))
|
||||
|
@ -131,14 +136,15 @@ func buildJUNITPackageSuite(suiteName string, startedAt time.Time, features []*f
|
|||
for idx, feat := range features {
|
||||
ts := junitTestSuite{
|
||||
Name: feat.Name,
|
||||
Time: feat.finishedAt().Sub(feat.startedAt()).String(),
|
||||
Time: junitTimeDuration(feat.startedAt(), feat.finishedAt()),
|
||||
TestCases: make([]*junitTestCase, len(feat.Scenarios)),
|
||||
}
|
||||
|
||||
for idx, scenario := range feat.Scenarios {
|
||||
tc := junitTestCase{}
|
||||
tc.Name = scenario.Name
|
||||
tc.Time = scenario.finishedAt().Sub(scenario.startedAt()).String()
|
||||
tc := junitTestCase{
|
||||
Name: scenario.Name,
|
||||
Time: junitTimeDuration(scenario.startedAt(), scenario.finishedAt()),
|
||||
}
|
||||
|
||||
ts.Tests++
|
||||
suite.Tests++
|
||||
|
|
|
@ -7,7 +7,6 @@ import (
|
|||
"io"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/cucumber/godog/colors"
|
||||
"github.com/cucumber/godog/gherkin"
|
||||
|
@ -70,31 +69,31 @@ func TestJUnitFormatterOutput(t *testing.T) {
|
|||
s.Step(`^failing$`, func() error { return fmt.Errorf("errored") })
|
||||
s.Step(`^pending$`, func() error { return ErrPending })
|
||||
|
||||
var zeroDuration time.Duration
|
||||
const zeroDuration = "0"
|
||||
expected := junitPackageSuite{
|
||||
Name: "junit",
|
||||
Tests: 8,
|
||||
Skipped: 0,
|
||||
Failures: 2,
|
||||
Errors: 4,
|
||||
Time: zeroDuration.String(),
|
||||
Time: zeroDuration,
|
||||
TestSuites: []*junitTestSuite{{
|
||||
Name: "junit formatter",
|
||||
Tests: 8,
|
||||
Skipped: 0,
|
||||
Failures: 2,
|
||||
Errors: 4,
|
||||
Time: zeroDuration.String(),
|
||||
Time: zeroDuration,
|
||||
TestCases: []*junitTestCase{
|
||||
{
|
||||
Name: "passing scenario",
|
||||
Status: "passed",
|
||||
Time: zeroDuration.String(),
|
||||
Time: zeroDuration,
|
||||
},
|
||||
{
|
||||
Name: "failing scenario",
|
||||
Status: "failed",
|
||||
Time: zeroDuration.String(),
|
||||
Time: zeroDuration,
|
||||
Failure: &junitFailure{
|
||||
Message: "Step failing: errored",
|
||||
},
|
||||
|
@ -105,7 +104,7 @@ func TestJUnitFormatterOutput(t *testing.T) {
|
|||
{
|
||||
Name: "pending scenario",
|
||||
Status: "pending",
|
||||
Time: zeroDuration.String(),
|
||||
Time: zeroDuration,
|
||||
Error: []*junitError{
|
||||
{Message: "Step pending: TODO: write pending definition", Type: "pending"},
|
||||
{Message: "Step passing", Type: "skipped"},
|
||||
|
@ -114,7 +113,7 @@ func TestJUnitFormatterOutput(t *testing.T) {
|
|||
{
|
||||
Name: "undefined scenario",
|
||||
Status: "undefined",
|
||||
Time: zeroDuration.String(),
|
||||
Time: zeroDuration,
|
||||
Error: []*junitError{
|
||||
{Message: "Step undefined", Type: "undefined"},
|
||||
{Message: "Step next undefined", Type: "undefined"},
|
||||
|
@ -123,12 +122,12 @@ func TestJUnitFormatterOutput(t *testing.T) {
|
|||
{
|
||||
Name: "outline #1",
|
||||
Status: "passed",
|
||||
Time: zeroDuration.String(),
|
||||
Time: zeroDuration,
|
||||
},
|
||||
{
|
||||
Name: "outline #2",
|
||||
Status: "failed",
|
||||
Time: zeroDuration.String(),
|
||||
Time: zeroDuration,
|
||||
Failure: &junitFailure{
|
||||
Message: "Step failing: errored",
|
||||
},
|
||||
|
@ -136,7 +135,7 @@ func TestJUnitFormatterOutput(t *testing.T) {
|
|||
{
|
||||
Name: "outline #3",
|
||||
Status: "pending",
|
||||
Time: zeroDuration.String(),
|
||||
Time: zeroDuration,
|
||||
Error: []*junitError{
|
||||
{Message: "Step pending: TODO: write pending definition", Type: "pending"},
|
||||
},
|
||||
|
@ -144,7 +143,7 @@ func TestJUnitFormatterOutput(t *testing.T) {
|
|||
{
|
||||
Name: "outline #4",
|
||||
Status: "undefined",
|
||||
Time: zeroDuration.String(),
|
||||
Time: zeroDuration,
|
||||
Error: []*junitError{
|
||||
{Message: "Step undefined", Type: "undefined"},
|
||||
},
|
||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче