Closed kumarvarun1252 closed 2 years ago
Please have a look at this section of the docs.
serenity-cli
is a wrapper around Serenity BDD jar, so you won't need the serenity-gradle-plugin
if you use it.
Let me know if this helps! Jan
If I understand this correctly, then I should be able to combine reports from Serenity-BDD projects as well? If this is the case how do I go about doing that? I have a Maven project which runs serenity using the Serenity Maven Plugin (latest version) and I have a Serenity-JS version. each of these can generate their reports separately but i am unsure as how to combine them?
What I am ultimately expecting to see is one test report with all tests tun (I have tagged the website as @application:Website
and the service as @application:Service
).
I have tried the following:
Generating .json
files only and combining into /target/site/serenity
and then running npm serenity run
.
Generating full reports for both and combining into the /target/site/serenity
and then running npm serenity run
.
please can you give me some direction, if this is even possible?
Serenity versions in maven are all latest (1.7.0 plugin is 1.6.9) npm Serenity v 5.4.3
@BlacktoBlue - the reporting process works like this:
.json
reports and screenshots.json
reports but also scans the directory structure of where your feature files are stored in order to understand the names of the capabilities (the sub-directories in which the .feature
files live). That means that you need to have access to the original feature files when the .html
report is generatedWhat's your project structure like? Do the JS and Java projects live in the same repository or separate one? Where do the feature files live?
J
@jan-molak currently the Serenity/JS tests sit within their own functional test repository, and the Serenity BDD (For services) lives within the project repository and the feature files live within those repos.
My ultimate Aim is to be able to have several pipelines for different products, which all have their own Serenity report, but they also generate a single report for all products.
@jan-molak right now, if I have 4 scenarios, I am seeing 4 separate json files. I am looking for one consolidated json file with all the executed scenarios. Is it possible? I see the consolidated html report, but to integrate my project in our CI/CD process, I will have to provide them a consolidated json report file which includes the test execution report of all the scenarios. Thanks.
You found any solution to consolidate all json file ?
Hey @kumarvarun1252, @BlacktoBlue, @JeffGaly! Apologies for taking long to respond, but I was focusing on Serenity/JS 2.0.
@kumarvarun1252 - to integrate my project in our CI/CD process, I will have to provide them a consolidated json report file which includes the test execution report of all the scenarios. Thanks.
I'd like to better understand the use case for the consolidated JSON report. Could you please elaborate a bit further on the format of the report your CI/CD system requires?
My ultimate Aim is to be able to have several pipelines for different products, which all have their own Serenity report, but they also generate a single report for all products.
@BlacktoBlue - that's doable, but you'd need to introduce some additional processing steps to your pipeline. Since Serenity BDD requires both the .feature
files and the .json
reports, you'd need some sort of an aggregation step that copies (merges) both the .feature
files and .json
test reports across your products into a single directory structure and then generate the HTML report in there.
Hi @kumarvarun1252, @BlacktoBlue, @JeffGaly - I am trying to solve a similar problem with multiple java maven modules generating their own reports correctly . I want parent module ( or a separate project ) consolidate the reports . Is that possible ? Or if there is a workaround I can do.
Hi, this one is quite old. Has someone a solution for this?
As far as I know, there is no build-in way to generate consolidated json report file with Serenity/JS. What I do as workaround is to configure the Artifact Archiver to store all artifacts into a separate 'results' directory.
Then I pass this directory as source to the SerenityBDD cli. I let the client generate the Serenity BDD report into a different destination directory, as well.
The original json results files stay untouched. Given the fact, we are using javascript or typescript, I wrote my own script which will parse the all the *.json
result files and convert them into whatever format is necessary.
Though, I do not have the need to combine the json files on my own. But I could imagine, that there are more solutions like this out there. You then can simply call your custom js/ts script via npm scripts after you're tests have been finished.
Hi,
I am trying to get a consolidate JSON report for my protractor-cucumber framework with serenity reports and node-js. I see there is a
serenity-gradle-plugin
, how can I use it in my framework?Can I add
serenity-gradle-plugin
as a dependency in my package.json? My package.json looks like this