Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In order to make serialization and manipulation easier, the Report model must be refactored into POCOs #148

Closed
craigfowler opened this issue Jun 13, 2018 · 1 comment
Labels
enhancement A feature enhancement

Comments

@craigfowler
Copy link
Member

craigfowler commented Jun 13, 2018

The main report model is currently a rich object model which is also semi-immutable (via constructor injection). However, this is somewhat problematic where it comes to serialization and deserialization. In order to make serialization easier, the classes should be reworked into POCOs which are fully mutable.

Summary

This big change was prompted by timeouts from the NUnit test runner. Screenplay's previous mechanism involved building an in-memory object model for the report, then writing it all at the end of the test run. This proved to be unworkable because the test runner gives only a short time after all tests have completed. If an 'at end of test run' handler takes too long then it is forcibly terminated and the test runner exits with an error.

The new reporting mechanism needs to 'stream' the report information into a JSON file as each scenario completes. This spreads out the work of writing the report during the course of the test run. This, there is no longer a 'big job' to do at the end of the test run.

However, the current report model cannot be streamed into a file as it stands (without the work in this ticket), because it is too complex and requires the report to be completed before it may be constructed.

@craigfowler
Copy link
Member Author

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A feature enhancement
Projects
None yet
Development

No branches or pull requests

1 participant