Skip to content

Commit

Permalink
Merge pull request #557 from launchableinc/fix-nunit-plugin-check-skip
Browse files Browse the repository at this point in the history
fix to check skip status
  • Loading branch information
Konboi authored May 1, 2023
2 parents 7f2f3e2 + ccd2793 commit bc60166
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion launchable/test_runners/nunit.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,17 @@ def parse_func(report: str):
def on_element(e: Element):
build_path(e)
if e.name == "test-case":
result = e.attrs.get('result')
status = CaseEvent.TEST_FAILED
if result == 'Passed':
status = CaseEvent.TEST_PASSED
elif result == 'Skipped':
status = CaseEvent.TEST_SKIPPED

events.append(CaseEvent.create(
_replace_fixture_to_suite(e.tags['path']), # type: ignore
float(e.attrs['duration']),
CaseEvent.TEST_PASSED if e.attrs['result'] == 'Passed' else CaseEvent.TEST_FAILED,
status,
timestamp=str(e.tags['startTime']))) # timestamp is already iso-8601 formatted

# the 'start-time' attribute is normally on <test-case> but apparently not always,
Expand Down

0 comments on commit bc60166

Please sign in to comment.