-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Feature: Distinct Junit-Results with multiCapabilities #1195
Comments
I am facing the same problem. chrome: {
options: {
configFile: "configs/chromeConf.js",
args: {
params: 'chrome_24'
}
}
}, Then I was using provided param to name report file. It was complicated. Now I am glad I can use multiCapabilities and send test to the Grid in simple way, but there is a problem with getting reports for each browser. Is there any chance that Protractor will take care about that on its own? Btw. @zakrhol thanks for the tip, I will try this ;) |
+1 This would be really good to have. |
Any progress on this in the past 9 months? I'd be cool with one XML file per browser. |
I provided a pull-request for the jasmine-reporters package larrymyers/jasmine-reporters#101 With this it is possible to use the current capability properties to define a unique suite name that will also be reflected as a filename. So the result is one xml per capability. |
Is this still outstanding? or has this capability been added? Can this issue be closed now? |
I'm not sure there's a concrete request for Protractor here, so closing this issue. Please open up a new one if there's something specific and in-scope for Protractor to add. |
When setting up multiCapabilities and adding a jasmine-junitReporter, then specs running for all capabilities produces the same junit-result.xml file, where one replaces the other.
I have read in #60 that it is possible to change the filename of the result for each capability. But as far as I have tried, that is not always sufficient.
browser.getCapabilities();
does not contain something useful (and readable) to distinguish the capabilities.To get it working properly I made the following changes and I want to ask whether that makes sense or can be solved better.
I give each capability a name. To access the capabilities in the
onPrepare
function (browser.getCapabilities();
only has driver/browser stuff), I changed runner.jsto
In the
onPrepare
the capability-name is appended to the suite and spec name and also the junit.xml filename.My config.js now looks like this (simplified):
This automatically solves the same issue with the failure-screenshot's filename, where also one replaces the other. (because the junit-reporter changes the specs description permanently - not sure if this has other impacts)
Having the config_ (capability&spec) available in onprepare might also be helpful in other use-cases, wouldn't it?
I think there could be a build-in way protractor provides to create unique test-results - or am I missing some better way?
The text was updated successfully, but these errors were encountered: