cucumber-reporting icon indicating copy to clipboard operation
cucumber-reporting copied to clipboard

Not an issue ... wish for report with use of SoftAssertion

Open Bokatbo opened this issue 5 years ago • 4 comments

I have used your cucumber-report since juni 2019. Great job. I have a wish that the reporting tool could handle the SoftAssertion failure.

  • overview-features.html --> count the soft-assert failure
  • overview-failures.html ---> failures that are in the Hook @before or @after Steps are not reported.

In many of the test-cases (feature), I choose to use JAssert SoftAssertion, and then report the failure after the test-case to not interrupt the test when some steps failed. I have a mix of Assertion and SoftAssertion in some features.

When feature failed because of soft-assert, the feature use the Hook.After to report the SoftAssert failure ... In my case (when using softassert) it is not the steps that failed ... it is the Hook @After Steps.

Bokatbo avatar Nov 13 '19 13:11 Bokatbo

So what is your expectation from JSON/report point of view?

damianszczepanik avatar Nov 14 '19 20:11 damianszczepanik

Hi, thanks for fast respons, it takes me a little time to look at how looks the JSon file

When failure in step 2 and 3, and because I use (AssertJ) org.assert.core.api.SoftAssetion.assertAll() that report the failure @after execution of each scenario.

my Json have something as:

elements: [ { before: [{ result: { status: passed elements: [ { after: [{ result: {status: failed ---> "message = reports failure in step 2 and 3" type: scenario, steps:[ 1.{ result: { status: passed 2.{ result: { status: passed 3.{ result: { status: passed 4.{ result: { status: passed

And I was looking for something as

elements: [ { before: [{ result: { status: passed elements: [ { after: [{ result: {status: failed ---> "message = reports failure in step 2 and 3" type: scenario, steps:[ 1.{ result: { status: passed 2.{ result: { status: failed 3.{ result: { status: failed 4.{ result: { status: passed

I am open to other suggestion :>

Bokatbo avatar Nov 19 '19 08:11 Bokatbo

and how does it look like from JSON report point of view ?

damianszczepanik avatar Nov 24 '19 23:11 damianszczepanik

then following the example above the HTML report should look something like

Scenario: failed --> "message = reports failure in step 2 and 3" Step 1: passed Step 2: failed --> "message = reports failure in step 2" Step 3: failed --> "message = reports failure in step 3" Step 4: passed

At the end Scenario failed, two Steps passed, two Steps failed, none Steps skipped, total 4 Steps.

Bokatbo avatar Nov 25 '19 14:11 Bokatbo