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

Guidance for testing CLI tools in .NET realm #279

Closed
SidShetye opened this issue Sep 19, 2019 · 2 comments
Closed

Guidance for testing CLI tools in .NET realm #279

SidShetye opened this issue Sep 19, 2019 · 2 comments
Labels

Comments

@SidShetye
Copy link

We've had a tool (using your CLI framework) that started simple but is gaining usage. We've had a simple script to test the the linux-x64 and win-x64 release flavors but want to have some formal tests for it. I know we can do class level xunit tests but that's the recommended route when one want to test cli tools as if running within a terminal environment?

I suspect this is out of scope from your current focus on CommandLineUtils (and congrats on being a dad earlier this year, just learnt that!) but if you have pointers, those would be appreciated by my team. We'd be very curious how complex CLIs like dotnet handle testing scenarios.

@natemcmaster
Copy link
Owner

I'm sure there are a dozen ways to do testing for CLI tools. Here are some suggestions that have worked well for the .NET CLI tool projects I've worked on.

Hope that helps!

@SidShetye
Copy link
Author

Thanks Nate, appreciate the guidance. Solid stuff.

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

No branches or pull requests

2 participants