Antontelesh / mochawesome-merge

Merge several Mochawesome JSON reports
MIT License
85 stars 16 forks source link

[Feature Request] Ability to merge suites from multiple reports into one suite during 'mochawesome-merge' if their UUIDs match #94

Open Vahan-Koloyan-Netris opened 1 year ago

Vahan-Koloyan-Netris commented 1 year ago

Hello,

Wondering if it is possible to acheive this with current implementation, but I have a use case where I generate reports on various hosts using the same Title and UUID for the suits.title and suits.uuid fileds respectivly for all the reports (test names and UUIDs are unique), with the intention that when I gather all the various reports from the hosts into one folder and run npx mochawesome-merge json_reports/*.json > mochareports/report-$(date +"%Y%m%d-%H%M%S").json that the merged report will combine the suites into one if they have matching Titles and UUIDs. Curently it creates seperate suites and increases the suite count, even when they have matching Titles and UUIDs, with the final marge report showing different suites with the same name.

If you were to implement this, possibly it could be invoked by using some flag along with the `npx mochawesome-merge' command to dictate behavior, i.e Merge same UUIDs into one Suite or Not

Thanks for reading

Antontelesh commented 1 year ago

Hi @Vahan-Koloyan-Netris, this is an interesting use-case. I need to think about a potential interface. If you have any ideas, please let me know