lefthandedgoat / canopy

f# web automation and testing library, built on top of Selenium (friendly to c# also)
http://lefthandedgoat.github.io/canopy/
MIT License
506 stars 115 forks source link

Use multiple reporters? #459

Closed Pwntheon closed 4 years ago

Pwntheon commented 5 years ago

Hi.

We would like to use both the junit reporter (for info in jenkins) and the livehtmlreporter (for screenshots and a better overview when debugging.

Is it possible to add several reporters easily? I'm not very fluent in F# so apologies if this is trivial.

lefthandedgoat commented 5 years ago

For this you would have to make your own reporter (implement IReporter) and inside of it have 1 instance of jUnit reporter and 1 instance of livehtmlreporter and for each calls just make the same call for both of your other reporters.

Just a wrapper.

You can see how reporters are done here:

https://github.com/lefthandedgoat/canopy/blob/master/src/canopy/reporters.fs

Pwntheon commented 5 years ago

That was my assumption. I was hoping for something easier, but i guess that'll do.

Thanks for the quick reply.