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

Pass custom argument in xUnit.console.exe #645

Closed
arpitgold opened this issue Oct 26, 2015 · 4 comments
Closed

Pass custom argument in xUnit.console.exe #645

arpitgold opened this issue Oct 26, 2015 · 4 comments

Comments

@arpitgold
Copy link

Hi team,
I have started creating my test with xUnit.
I want to pass a argument to xUnit Console runner. And want to use this argument value in test class, and derive some logic based on it.

Can you please help, how can I achieve this?

@bradwilson
Copy link
Member

My first suggestion would be to use environment variables for this purpose.

@arpitgold
Copy link
Author

Is there any other approach ?:disappointed:

@bradwilson
Copy link
Member

Generally speaking, if you want to pass in things from outside of your code, some environmental method is what's going to be available to you: environment variables, configuration files, etc. There is nothing special about unit testing here.

@arpitgold
Copy link
Author

@bradwilson thanks for your input.

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

No branches or pull requests

2 participants