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

Testing documentation #1410

Open
patriksvensson opened this issue Dec 22, 2023 Discussed in #1409 · 1 comment
Open

Testing documentation #1410

patriksvensson opened this issue Dec 22, 2023 Discussed in #1409 · 1 comment
Labels
Milestone

Comments

@patriksvensson
Copy link
Contributor

patriksvensson commented Dec 22, 2023

Discussed in #1409

Originally posted by csc530 December 22, 2023
I think there should be dedicated documentation for using the Spectre.Console.Testing classes on the main website as it's a little hidden that SpectreConsole supports testing with it. And it's not super easy looking through the source code test to figure out which classes to use and how for whatever purpose you have (as seen in #912).
Right now there is a blurb under best practices...

Unit Testing Best Practices
For testing of console output, Spectre.Console has IAnsiConsole that can be injected into your application. The Spectre.Console.Test contains a set of utilities for capturing the output for verification, either manually or via a tool such as Verify.

I think it could be featured more prominently in its own section with use cases, examples, etc. (I'm also happy to help start/contribute to these docs too).


Please upvote 👍 this issue if you are interested in it.

@patriksvensson patriksvensson added this to the 0.49 milestone Dec 22, 2023
@csc530
Copy link

csc530 commented Dec 29, 2023

I made a PR that adds some pages to show the existence of the testing classes and how to use them.
Although I'm not sure how to add API documentation for the test classes to docs.
I tried adding the line "../../src/Spectre.Console.Testing/**/{!bin,!obj,!packages,!*.Tests,}/**/*.cs", to the sourceFiles setting list in the docs/Program.cs file, but it didn't seem to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo 🕑
Development

No branches or pull requests

2 participants