-
Notifications
You must be signed in to change notification settings - Fork 143
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
No file produced when test errors #97
Comments
I have the same problem with Chrome when trying to load a json file with errors in it |
Same problem here. It happens only if there's something like a syntax error while Karma is initially loading the .js files, before the tests begin. (This might be just a plain Karma problem, however, since I believe it has similar behavior even with the normal reporter when it encounters a problem while first loading the js files?) |
Just ran into this myself. The reason this is so troubling is that with The junit reporter should at least write this log to stderr instead of hiding it. |
The error message you'd like to see comes in through the reporter's this.adapters = [
function (msg) {
allMessages.push(msg)
}
] Later, it takes those collected messages and sticks them all in the XML: this.onBrowserComplete = function (browser) {
var suite = suites[browser.id]
var result = browser.lastResult
if (!suite || !result) {
return // don't die if browser didn't start
}
suite.att('tests', result.total ? result.total : 0)
suite.att('errors', result.disconnected || result.error ? 1 : 0)
suite.att('failures', result.failed ? result.failed : 0)
suite.att('time', (result.netTime || 0) / 1000)
suite.ele('system-out').dat(allMessages.join() + '\n')
suite.ele('system-err')
writeXmlForBrowser(browser)
// Release memory held by the test suite.
suites[browser.id] = null
} When things fail badly, Instead, if we do this, everything works as you might hope: this.onBrowserComplete = function (browser) {
var suite = suites[browser.id]
var result = browser.lastResult
if (!suite || !result) {
// Make sure we report any error messages to stdout if we are not going
// to create any XML.
process.stdout.write(allMessages.join() + '\n');
return // don't die if browser didn't start
}
// ... PR coming soon! |
I cannot reproduce this error with latest version of @joeyparrish can we create a minimal testcase to check this issue? |
We also have an issue with the result xml file not being generated for one of our 4 test runs. It just so happens that this one test run has way more tests than the other 3, and is more complex. The results file is generated on my local no problem, but when ran as part of a build process, the results file is not generated even though the tests run. |
We also have that same problem as @fallXone above Also this doesn't happen all the time.. |
i did create a new case here with full debug logging: #188 |
If I run a test in e.g. IE 11 via sauce labs and inadvertently include a backtick in my source code, the karma console will report something like
but no report file will be produced. As a result, any CI tools that rely on structured output (read: jenkins) will consider the build a success.
The text was updated successfully, but these errors were encountered: