On Tue, May 26, 2015 at 6:11 AM, AutomationQA
<
shobhitg...@gmail.com> wrote:
> Firstly I have to extract the information like duration after each scenario
> is executed. Also I am trying to avoid publishing the whole Assertion error
> stack trace in the JSON file as we have to share the reports with the BA ,
> so don't want to publish any technical details in the report. Instead of
> using assertion , I want to mark the step as failed based on some flag which
> I believe can be done by changing the node result - > status as "Failed"
>
> I am using Masterthought plugin which reads this json file to create its
> interactive reports.
You could add a post-processing step (in Jenkins?) to filter the JSON
report before you feed it to Masterthought. This is the easiest way I
see to remove stack traces from the result.
On a side note...
I understand BAs not being interested in stack traces but failing
tests cannot possibly be part of your definition of done! In my world
BAs are involved at the beginning of a card (three amigos) and at the
end before the card is moved into the done column. Why would they need
to look at failing tests?
Regarding changing the step results, I suppose BAs are smart enough to
understand the difference between successful, failed, skipped and
pending. Did this requirement come from them?
> On Tuesday, 26 May 2015 01:06:21 UTC+5:30, Paolo Ambrosio wrote:
>>
>> On Mon, May 25, 2015 at 7:11 PM, AutomationQA
>> <
shobhitg...@gmail.com> wrote:
>> > Hi All,
>> >
>> > I am using Cucumber JVM with JUnit having following plugin options
>> >
>> > plugin = {"html:target/cucumber" , "json:target/cucumber.json" },
>> >
>> > The cucumber.json file is created after the execution is completed
>> > whereas I
>> > need to update this json file at runtime to change the node values such
>> > as
>> > status and error description.
>> >
>> > Please let me know how can I access and modify this json file at
>> > runtime.
>>
>> Why you need to do it at runtime? It would be so much easier to
>> convert the json afterwards.
>>
>> If there is nothing you can do to avoid it, I suppose you could write
>> your own formatter. You can try and understand how they work by
>> looking at the existing formatters:
>>
>>
>>
https://github.com/cucumber/cucumber-jvm/tree/master/core/src/main/java/cucumber/runtime/formatter
>>
>> > Thanks in advance.
>> >
>> > Regards
>> > Shobhit
>
> --
> Posting rules:
http://cukes.info/posting-rules.html
> ---
> You received this message because you are subscribed to the Google Groups
> "Cukes" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
cukes+un...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.