extent-framework / extentreports-csharp

Extent Reporting Library, .NET
http://extentreports.com
Apache License 2.0
50 stars 40 forks source link

Spliting feature after calling exception on hooks AfterScenario #110

Closed LucasWolfW closed 3 years ago

LucasWolfW commented 3 years ago

I use specflow and extent reports and i have a method that executes after the scenario to check if there is an error and throw an exception if so, but it is spliting my reports, lets say i have 6 scenarios, and that scenario 3 and 5 fails, the report will be divided in 3, the first one with scenarios 1, 2 and 3(fail), the second with scenarios 4 and 5(fail) and the last one with scenario 6.

I don´t know if it is wrong to do that or if it is something that is expected?

The code is somehing like this: Sem título (1)

I use it to run all the steps before stopping the test execution because my application storage what i was doing so i need a clean start before testing, so i have to do all the steps in one test before starting another

In this example 'Test' is a feature file with 2 tests on it, the first test(scenario) fails and the second dont, resulting on this:

Sem título

LucasWolfW commented 3 years ago

I did some workaround before creating the feature and it works fine now, if someone goes thought the same thing here it is what i did, kind of dumb now that i think about it

Sem título (2)