Writing json/xml to cucumber-serenity reports

382 views
Skip to first unread message

shrey awasthi

unread,
Jun 24, 2016, 6:20:28 AM6/24/16
to Serenity BDD Users Group
Hi,
    Have just migrated a project from cucumber to Serenity-cucumber, the cucumber tests writes json/xmls messages in reports
using scenario.write, however after moving to Serenity I am no longer seeing the json and xml messages and there is no error in the test
execution as well.
Can someone please help here, is there a way to write custom information like xml/jsons to Serenity reports or any work around on how to log
messages written from scenario.write to Serenity reports.

Thanks

John Ferguson SmartSmart

unread,
Jun 24, 2016, 6:28:59 AM6/24/16
to shrey awasthi, Serenity BDD Users Group
Hi Shrey,

Support for scenario.write() should be added in the next version of serenity-cucumber.


___________________________________________________
John Smart | Wakaleo Consulting  |  +44 7398 832273
Making smart teams collaborate better

http://johnfergusonsmart.com  | rea...@johnfergusonsmart.com
___________________________________________________

--
You received this message because you are subscribed to the Google Groups "Serenity BDD Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thucydides-use...@googlegroups.com.
To post to this group, send email to thucydid...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

shrey awasthi

unread,
Jun 24, 2016, 6:37:58 AM6/24/16
to Serenity BDD Users Group, shrey....@gmail.com
Thanks for quick update John, any rough time-lines on when can this feature be included.

Regards

John Ferguson SmartSmart

unread,
Jun 24, 2016, 6:38:49 AM6/24/16
to shrey awasthi, Serenity BDD Users Group
Within the next week or so.

___________________________________________________
John Smart | Wakaleo Consulting  |  +44 7398 832273
Making smart teams collaborate better

http://johnfergusonsmart.com  | rea...@johnfergusonsmart.com
___________________________________________________


John Ferguson SmartSmart

unread,
Jun 24, 2016, 7:52:04 AM6/24/16
to shrey awasthi, Serenity BDD Users Group
Could you post a code sample showing how you use this method in your tests?

___________________________________________________
John Smart | Wakaleo Consulting  |  +44 7398 832273
Making smart teams collaborate better

http://johnfergusonsmart.com  | rea...@johnfergusonsmart.com
___________________________________________________


shrey awasthi

unread,
Jun 24, 2016, 3:05:19 PM6/24/16
to John Ferguson SmartSmart, Serenity BDD Users Group
Below link provides good overview of this:


Thanks,

John Ferguson SmartSmart

unread,
Jun 24, 2016, 3:07:00 PM6/24/16
to shrey awasthi, Serenity BDD Users Group
Thanks. A simple implementation will just add a nested step with the message. A better solution would create a dedicated text area for steps with this data.

___________________________________________________
John Smart | Wakaleo Consulting  |  +44 7398 832273
Making smart teams collaborate better

http://johnfergusonsmart.com  | rea...@johnfergusonsmart.com
___________________________________________________


shrey awasthi

unread,
Jun 24, 2016, 6:16:27 PM6/24/16
to John Ferguson SmartSmart, Serenity BDD Users Group
Forgot to mention that we also use scenario.write to write html tables in cucumber reports, 
for instance if the test is setting up some important configuration, example new products in product catalog,
we write details to the new product in report as a html table (converting html table to String).

So it would be helpful to be able to specify formatting of texts as well, simple text, json/xml or html table etc.
while writing to Serenity reports.

John Ferguson SmartSmart

unread,
Jun 25, 2016, 1:05:32 AM6/25/16
to shrey awasthi, Serenity BDD Users Group
Hi Shrey,

I can see that being useful, I will see what we can do.

___________________________________________________
John Smart | Wakaleo Consulting  |  +44 7398 832273
Making smart teams collaborate better

http://johnfergusonsmart.com  | rea...@johnfergusonsmart.com
___________________________________________________


shrey awasthi

unread,
Jul 5, 2016, 8:56:23 AM7/5/16
to Serenity BDD Users Group, shrey....@gmail.com
Hi John,
            Please let me know when this feature is available, happy to contribute code if you need a hand, let me know.

Thanks,

Yaroslav Yasynskyy

unread,
Dec 16, 2016, 12:24:36 PM12/16/16
to Serenity BDD Users Group, shrey....@gmail.com
Hello,

Any news whether this was implemented in serenity bdd?

Thanks,
Yaroslav
Reply all
Reply to author
Forward
0 new messages