csf-dev / CSF.Screenplay

Implementation of the Screenplay pattern (aka Journey) in .NET
https://csf-dev.github.io/CSF.Screenplay/
MIT License
13 stars 1 forks source link

Create a reporter which immediately writes to a JSON stream #147

Closed craigfowler closed 6 years ago

craigfowler commented 6 years ago

We now have a report writer which wires a report model to JSON stream, but this takes a single monolithic report and writes it all at once.

What I'd like to investigate is a reporter which writes the actual JSON incrementally as each scenario completes. This way there is no big hit of doing all of the serialisation at the end of a test run, because the work is spread out per scenario.

This might need an alternative model (one in which the scenarios and features are not hierarchical).

craigfowler commented 6 years ago

This needs to be thread-safe, so it will need a central 'writer' module which actually performs the writing to the JSON stream. That will need to lock against the writing process such that it can block multiple writes at the same time.

It can use tasks and async programming to avoid holding things up though.

craigfowler commented 6 years ago

Done