-
Notifications
You must be signed in to change notification settings - Fork 180
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
JUnitXmlReporter #54
Comments
Can you successful run your testcases via the command line and get a xml file with the results? Running from within Eclipse isn't a use case that has been tested. |
I havnt tried running those test cases from commandline |
but yes they run successfully from eclipse.But i dont find any xml file being created. |
I use Protractor with configuration from: https://github.com/angular/protractor/blob/master/spec/junitOutputConf.js It used to generate the file but it doesn't currently. I'm on newest Protractor & jasmine-reporters. |
It works for me in jasmine-reporters 0.2.1, doesn't work in any newer version. |
I just confirmed that. If you take a look at the history of The problem seems to be that you don't have a directory named If you create an |
@bloveridge Why does it work with jasmine-reporters until 0.2.1 then? Also, my function onPrepare() {
// The require statement must be down here, since jasmine-reporters
// needs jasmine to be in the global and protractor does not guarantee
// this until inside the onPrepare function.
require('jasmine-reporters');
jasmine.getEnv().addReporter(
new jasmine.JUnitXmlReporter('test-results.protractor-chrome.xml', true, true));
_onPrepare.apply(this, arguments);
} which means no directiories are supposed to be created, only the single file. |
Man, 0.2.1 was released ages ago... two years? Really? I'll spend some more time looking for what changed since 0.2.1, but you can still work around the issue by creating an |
OK, then something must have changed in other projects as well since it was working for me a few months ago. I don't understand why I should create an EDIT: months ago, not years, oops. EDIT 2: actually, a few months ago 0.2.1 was the newest version so the cause seems to still exist in this project. EDIT 3: OK, the change seems to be that older versions were just creating a file if I provided a name ending with |
In that case, pass Previous versions of jasmine-reporters used Now it is treated as a path not including filename. It looks for a directory with that name and tries to write files into that directory with names generated by reading your spec file. If you don't have the directory, it doesn't write the files. If you use a path of Here's the protractor config I use which appropriately writes files to the current directory:
The resulting filenames are something like |
@bloveridge Great, thanks! |
@jitendrasbhati Please check your configuration for similar issues and let me know if it solves your problem. Sorry all for this apparently-breaking change (at least in some cases like yours). |
JUnitXmlReporter is not generating any output file after the test run.
The test runs successfully.
And i am running my testcases from eclipse
but while debugging i realized that it is not able to interpret the java code to write data to the file.How do i resolve this issue
?
The text was updated successfully, but these errors were encountered: