Passing parameters to NUnit test via CLI using params
In this post we will discuss yet another useful feature introduced in NUnit 3.x where we can pass a parameter to NUnit test class of C# from Command Line Interface (CLI) using a new feature called –params
Starting NUnit 3.x, there is an most awaited option introduced for Nunit-console runner, which is passing parameters to test method(s) via CLI using –params
What’s the use case of this?
Consider a scenario something like this, Lets say we have to test application with multiple browsers and we somehow have to parameterize the BrowserType like Firefox,Chrome,IE
Then, we can do it via CLI and pass the parameter to the whole framework to run test based on the parameter (browser type) that we passed.
Here is the complete video of the above discussion
Here is the complete modified code
You can checkout the complete code from GitHub here
Thanks for reading the post and watching the video!!!
Please leave your comments and let me know if there is anything I should update in this post.