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

Feature Request: Support for logging arbitrary text which will appear in the reports #7

Closed
mcgin opened this Issue May 21, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@mcgin

mcgin commented May 21, 2015

Right now there isn't an easy way to get my test context output to the test reports. It would be nice if there was some option to output it easily. Ideally I would like to specify a class that represents my test context and LightBdd includes the representation after each test run.

@Suremaker

This comment has been minimized.

Collaborator

Suremaker commented Jun 1, 2015

With a new version of LightBDD, it would be possible to comment any step during it's execution, where comments would be included on the report.

I am planning to add StepExecution.Comment(string comment) method.

It should be easily reusable for a purpose of dumping a test context, where I plan to give ability to dump it manually plus it would be dumped automatically on failing scenarios.

For automatic dumps, the test context would be:

I have not thought through it yet, but most probably, the context dumping method would use:

  • ToString() method to dump context content, or
  • it will use reflection to dump all the fields by applying ToString() on them.
    I will have to think how to make it customizable though...
@Suremaker

This comment has been minimized.

Collaborator

Suremaker commented Jun 21, 2015

An initial implementation is done in version 1.7.0.0.
It offers StepExecution.Comment() and StepExecution.CommentFormat() methods to manually comment steps in runtime.

The automatic context dump is not implemented in this version and it would be added in future versions if needed.

@Suremaker Suremaker closed this Jun 21, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment