-
Notifications
You must be signed in to change notification settings - Fork 20
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
Adjust NUnit test results #56
base: master
Are you sure you want to change the base?
Conversation
@@ -299,20 +300,23 @@ class NUnit extends ConventionTask { | |||
if (env) | |||
environment env | |||
commandLine = commandLineExec | |||
ignoreExitValue = ignoreFailures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why hardcode the setting instead of using the argument?
//failed tests but no error | ||
if (!ignoreFailures) { | ||
throw new GradleException("There are failing tests (exitCode = ${mbr.exitValue})") | ||
} | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exitValue != 0 ?
def xmlFile = new XmlParser().parse(testResultsFile) | ||
|
||
if (!isNumberOfFailedTestsConsistentWithOverallResult(xmlFile)) { | ||
logger.info("The overall result of the Test Results is not consistent with the number of failed tests. Adjusting test results...") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warn?
return isFailedResult | ||
} | ||
|
||
private static String getFailingTestCase() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what is this
|
||
private static String getFailingTestCase() { | ||
return ''' | ||
<test-suite type="TestSuite" id="9999-9996" name="Ullink" fullname="Ullink.Test" runstate="Runnable" testcasecount="1" result="Failed" site="Child" start-time="2019-05-06 07:10:49Z" end-time="2019-05-06 07:10:49Z" duration="0.100747" total="1" passed="0" failed="1" warnings="0" inconclusive="0" skipped="0" asserts="1"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the harcoded values could cause issues, like id, start-time etc.
No description provided.