TestStack / TestStack.BDDfy

BDDfy is the simplest BDD framework EVER!
MIT License
418 stars 84 forks source link

Test grouping in reports #185

Open JakeGinnivan opened 10 years ago

JakeGinnivan commented 10 years ago

It would be handy to be able to separate tests into groups.

With specflow you can have many different .feature files which keeps everything separated. BDDfy puts all tests from a single run into one report.

We should be able to: 1) Output tests into multiple reports 2) Filter/group tests in the html report live in the browser

Thoughts?

mwhelan commented 10 years ago

It would be a really great feature.

With regards to multiple reports, Processors and Batch Processors have a RunsOn predicate, which lets you choose which stories the batch processor applies to. There might be scope there to have different reports handle different groups of stories.... @MehdiK might be able to shed some more light on that.

MehdiK commented 10 years ago

1) Output tests into multiple reports

This is already supported and has a relatively easy API. As @mwhelan mentioned you can override RunsOn on the HtmlConfig to filter in the scenarios you want in a report file. Here is an example.

2) Filter/group tests in the html report live in the browser

We already have tags on scenarios and it would be awesome to add filter on tags like we're doing for test result.

karlmet commented 9 years ago

I don't think we need to filter out scenarios tests like when overriding the RunsOn on the HtmlConfig.

If we don't want a big report file, there should be an option to produce as many report files as we have test classes. Not just one that contains them all.

That way, our business analysts will have an easier way to check up the reports. They will only open the one with the story/class they are interested in. Is that possible right now ? If not, can this be a new feature in a futur release ?

MehdiK commented 9 years ago

@karlmet Thanks for the comment.

I don't recommend doing that. That would result into too many files; that said you can use RunsOn on config to put every class into its own report if you want. It should be just a couple of lines of code. See this for an example.