Reputation: 65
We are using protractor-flake to re-run any failed tests. We are moving from Jenkins to TeamCity and the test reporting doesn't work as expected when tests pass during the re-run.
In Jenkins we were using jasmineReporters.JUnitXmlReporter, which showed the correct results as the failed test xml would be overwritten by the successful one. When Jenkins processes the xml files to report, it is using the most recent ones.
In TeamCity, we are trying the jasmineReporters.TeamCityReporter, which seems to be reporting a test failure as soon as it occurs and does not update if the test passes on re-run. I'm assuming that this also means that if a test failed upon re-run, TeamCity would report two failures. Looking at teamcity_reporter.js, this appears to be as designed due to a requirement from TeamCity.
// TeamCity specifies there should only be a single `testFailed`
// message, so we'll only grab the first failedExpectation
if (isFailed(spec) && spec.failedExpectations.length) {
var failure = spec.failedExpectations[0];
tclog("testFailed", {
name: spec.description,
message: failure.message,
details: failure.stack
});
}
Has anyone come up with solutions around this?
Upvotes: 1
Views: 197