Thom Kiesewetter
Thom Kiesewetter

Reputation: 7304

How do I run xunit for asp.net 5 from command line for a single test

How do I run xunit for asp.net 5 from command line for a single test

VS 2015 does something like this

dnx.exe --appbase "\Mvc\test\Microsoft.AspNet.Mvc.IntegrationTests" Microsoft.Framework.ApplicationHost --port 9543 Microsoft.Framework.TestHost --port 11883 run --test Microsoft.AspNet.Mvc.IntegrationTests.ActionParameterIntegrationTest.ActionParameter_NonSettableArrayModel_EmptyPrefix_DoesNotGetBound

If I run this nothing happend

Upvotes: 2

Views: 449

Answers (1)

Kiran
Kiran

Reputation: 57949

Example for running a single test:
dnx . test -method TestNamespace.TestClassName.TestMethodName

Similarly for running all tests in a class
dnx . test -class TestNamespace.TestClassName


UPDATE: Beta7 and after

Example for running a single test:
dnx test -method TestNamespace.TestClassName.TestMethodName

Similarly for running all tests in a class
dnx test -class TestNamespace.TestClassName

Upvotes: 5

Related Questions