How to execute NUnit test cases from command prompt

前端 未结 6 1501
难免孤独
难免孤独 2021-02-07 00:30

How can I execute a test case from Command Console using NUnit? I had set of Selenium Tests written in C# based on NUnit framework. I need to execute the test cases simply by ru

6条回答
  •  旧巷少年郎
    2021-02-07 00:54

    Use nunit-console.exe to run tests from the command line.

    For example:

    nunit-console.exe /xml:results.xml path/to/test/assembly.dll
    

    This will run the unit tests and save the results in the results.xml file, which you can work with easily.

    See the documentation for all of the various command line switches that are available.

提交回复
热议问题