0
votes

I have developed some End to End tests using Selenium, and Nunit.

I need to run the test cases cross-platform so I created a .net core class library project and developed the tests.

Now I am struggling with figuring how to run the tests outside visual studio.

The first step I did is publishing the project using:

dotnet publish project

Then I found out that I can run Nunit tests using nunit-console.exe, but I'm not sure that it supports cross-platform.

Is what I am trying to accomplish doable? or shall I replace Nunit with other option?

2
nunit-console doesn't run .NET Core tests yet - you currently need to use dotnet test to run your nunit tests. See github.com/nunit/docs/wiki/.NET-Core-and-.NET-Standard - Chris

2 Answers

1
votes

To run .Net Core tests, including NUnit tests, use the dotnet test command. It is cross-platform.

0
votes

What I did to achieve running Nunit Test Cases cross platform:

1- Running dotnet publish project with specifying target runtime.

3- Running dotnet vstest with specifying file containing tests.