serenity-js / serenity-js Public
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
Is there a way to set context tags for multi-browser testing? #455
Comments
@robin-weller Not only that, for multi-browser tests, all the browsers will be listed down here. Most important thing is, before each test case, it shows the icon in which browser tests are executed. Can you share your protractor.conf and the report you are getting. It will ravel a broader picture. |
That is what I see using the Java version. I am using v2 though. protractor.conf.js:
Edit: In the java version, I set |
@jan-molak Is it related to old serenity CLI jar? |
Hi @robin-weller, it's great to hear from you again! @abhinaba1080 - your instincts are right, it is partially related to the old Serenity CLI jar. The upcoming 2.1.10 release of the jar will come with serenity-bdd/serenity-core#1860, which enables both browser and OS icons to be rendered for every test scenario. I was waiting for that jar to be published to add both the browser/os tagging as well as the icons (#132) all in one go. But, having thought about it some more, I decided to implement the tagging first and the icons whenever the jar arrives. Enjoy Serenity/JS v 2.1.0 with OS and browser tags Support for icons is coming soon ;-) You can now sponsor my work on Serenity/JS on Github |
Thanks @jan-molak - good to hear from you too! I am seeing the OS and browser tags in the report, however, there is an issue generating the report from firefox runs. so it is only showing chrome. I see the following error when it is generating reports from firefox runs: I am seeing the chrome icon though! |
Cool, so we're making progress :-) Would you mind posting the offending |
Of course:
|
The difference I am seeing between the Chome and Firefox JSON files is there is no recorded One final thing:
Firefox:
There is a space on the firefox name one? |
Thanks, and what version of Firefox are you running? Could you please also add the following section to your onPrepare: () => {
return require('protractor').protractor.browser.getCapabilities()
.then(capabilities => {
console.log('capabilities', capabilities);
});
}, I think I know what the issue is... |
Hey @robin-weller, can you check out the As always, thoughts and feedback welcome! |
seems like I created an issue about the same root cause in #456 I will test the latest version and see if the problem goes away |
Thanks @ctaepper - yeah, my original solution was a tad bit optimistic. I then ran a test against 14 different browser/platform combinations and recorded my findings in this unit test. If there's anything I missed, please feel free to extend it! |
Thanks @jan-molak, Something I am seeing a difference in though is the platform tagging. Chrome:
Firefox:
Currently running Mac OS X 10.15.3 so it looks as though the Firefox run is picking up the Darwin version instead of the OS X version? |
Hey @robin-weller - Different browsers describe the platform they run on differently, and to a different degree of fidelity. If I was to make the reporting consistent, I'd have to go either with the lowest common denominator or introduce another, higher-level tag ( So either:
or:
Not sure which one is better. Thoughts? |
I guess it's not going to be perfect either way. If you run one instance of Chrome on Catalina and one on Mohave, you won't see any difference. However, running Firefox would give you a bit more to go on, albeit a Darwin version number. Having both |
This functionality has been introduced in It also generates icons for the recognised browsers and platforms: If Serenity/JS has made your life easier, please consider becoming a sponsor and buying us a coffee every once in a while |
Hi Jan,
With the Java Serenity version, you can provide a context for each browser so that the report shows which browser the test has run on. I have found an old example on John Smart's blog and it still works with the latest version.
Is this something that can easily be done with Serenity/JS?
I am able to run the tests in multiple browsers but there is no distinction in the report to show which browser the test run on.
The text was updated successfully, but these errors were encountered: