-
Notifications
You must be signed in to change notification settings - Fork 51
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
Work with jasmine-reporters output #15
Comments
Looks like this is due to a difference in output from
Which does not pass our simplistic regex. We should try to include this format as well. |
I haven't had much time to dig into this, but a very gross workaround would be to a console reporter in addition to the junit reporter in protractor's {
framework: 'jasmine2',
onPrepare: function () {
var jasmineReporters = require('jasmine-reporters');
jasmine.getEnv().addReporter(new jasmineReporters.JUnitXmlReporter({
consolidateAll: true,
savePath: 'testresults',
filePrefix: 'xmloutput'
}));
jasmine.getEnv().addReporter(new jasmine.ConsoleReporter({print: console.log}));
}
} Which would spit the proper output out to the console as well as write the junit file. |
Hi Nick, I have tried all possible test scenarios by placing the above code in onPrepare: method. Still having the same issue, Along with failed test passed tests are also being executed. |
After doing some digging with the sample you provided (via email) it turns out that there's a different stack trace for errors within a promise: E.g. expect(element(By.binding("person.name")).getText()).toEqual('My Name') Would output a stack formatted the way protractor-flake wants (
but putting the expectation inside the promise does not
Would output:
We could try to get around this by creating a custom reporter that looks for a filename, but |
I have same problem, and resolved it like below. First, I flagged shardTestFiles to true. exports.config = {
capabilities: {
shardTestFiles: true,
... Then protoractor's stdout like below.
And then, the result of all the tests will be as follows.
So, parse test IDs from It works well, either inside or outside *my parser is here. |
I'm going to go ahead and close this since we now have custom parsing support. This should allow users to tailor a parser to their specific output. Commit: 9791183 |
We've had a lot of questions about usage with reporters like jasmine Junit and others. We should verify and document some use cases in the README or an examples folder.
The text was updated successfully, but these errors were encountered: