Questions tagged [dotnet-test]

63 questions
0
votes
1 answer

"No test is available" when running .Net7.0 tests with nunit console runner using dotnet test

I am trying to run my NUnit tests built with .Net 7 in Jenkins. They run perfectly fine locally in my Visual Studio. I can't get them to run on my Windows machine my Jenkins Agent is running on since upgrading from .net framework 4.X to .Net 7.0. I…
J.R. Bye
  • 98
  • 2
  • 12
0
votes
1 answer

In Visual Studio 2019, What Command is Run When 'Test All' is Clicked?

Visual Studio 2019 (and most Visual Studios that I've worked with that have a Test Explorer) have a 'Test All' button. I'm curious as to what the CLI-equivalent command is run when this is clicked (including all options fed to this command). For…
0
votes
0 answers

Specflow Living Doc - TestExecution.json file is not updating when using "dotnet test" or "vstest.console"

So I've been trying to implement a script to run the tests in my suite and then run the LivingDoc generate command, this is all fine except for some reason when I run the tests via "dotnet test" or "vstest.console" the TestExecution.json is not…
0
votes
2 answers

Pass NUnit Test Category through command line

I am trying to use NUnit Category attribute to run a set of tests at a time. But how to pass the category as an argument while running the tests from command line? Tried multiple things, but none of them seems to be working: dotnet test /include…
Mounika
  • 371
  • 4
  • 18
0
votes
1 answer

Some Unit Tests are not running in ADO Pipeline (tests from other test projects successfully run). Dotnet test using moq

I have a solution, it has 4 projects, each project has a corresponding test project in a "tests" solution I've noticed that sometimes a test fails locally but passes the CI build, and depending where the test is located, sometimes it does…
heug
  • 982
  • 2
  • 11
  • 23
0
votes
1 answer

Parallel execution of tests on TFS

We use TFS on our project. I have set Parallelism -> Multi Agent in the phase settings. The command itself to run (.NET Core) is: dotnet test --filter TestCategory="Mobile" --logger trx -m:1. Do I understand correctly that these settings will not…
Shep
  • 15
  • 4
0
votes
1 answer

Getting error when running test project using cmd file

I have a test project and I was running the test project by setting some variable using cmd file. This is the file content. #launchtests.cmd SETLOCAL SET MyTestProperty='ValueFromCommand' DOTNET TEST MyTestProject.csproj I kept this in the same…
Aneez
  • 157
  • 1
  • 2
  • 14
0
votes
1 answer

Running (dotnet test command) unit/integration tests dll on remote server through power shell requires csproj file

I have my dlls for the test project deployed to the server. Now I'm trying to run them using dotnet test "Path to tests.dll" but I get an error: F:\path\tests.dll(1,1): error MSB4025: The project file could not be loaded. Data at the root level is…
T4under4
  • 125
  • 3
  • 13
0
votes
1 answer

Dot net test fails to restore EnterpriseLibrary.Logging Nuget in Azure DevOps

My AzureDevOps YML Looks like this: - task: NuGetCommand@2 displayName: "Restore Test Solution" inputs: restoreSolution: $(Build.SourcesDirectory)\TestSln\*.sln feedsToUse: config nugetConfigPath: NuGet.config …
0
votes
0 answers

Remote Debug dotnet test: vstest.console.pdb not loaded

I have a C# application, and in addition, an NUnit testing project which is being compiled to a dll. I used to copy it to a remote platform, there I run it using this command: dotnet test MyTests.dll And the tests are running. Now I want to debug…
0
votes
1 answer

Command outputs logs when run locally but not when run on server

When I run dotnet test --filter "Category=rda" on my local PC the dos terminal outputs all logging. If I then run the same on one of my servers no logs are output. How do I fix this
runnerpaul
  • 5,942
  • 8
  • 49
  • 118
0
votes
0 answers

How can I run Nunit from another project

I have an NUnit project for testing automations called TestManager and I have created another Web App project called TestManagerGateway to enable end-users to invoke those tests using "dotnet test" command. basically when invoking the REST API in…
Yossi Even
  • 45
  • 8
0
votes
1 answer

Dotnet test results html output file hosting via IIS

I am currently working on C# selenium automation tests. My setup is simple: running tests on a test server (accessible via remote desktop), I've setup task scheduler trigger to run them every day via this command: dotnet test…
Mrks
  • 45
  • 1
  • 2
  • 14
0
votes
1 answer

dotnet test not loading resharper test adapter

We have an nunit3 test project that we're trying to run via command-line in dotnet core that is having problems being identified. In all our debugging we've not found an answer to fixing this. Background: We build out these tests to test an API site…
Kevinsyel
  • 143
  • 1
  • 9
0
votes
0 answers

In Xunit tests for net461, how to enable /disable AppDomain in Windows /Linux when using dotnet test CLI

In CI server, I run tests in net4x for both windows and Linux and I want to enable/disable Appdomain based on OS. In net4x, Xunit tests can be build in both windows and Linux Getting Started with xUnit.net Multi-targeting with non-Windows OSes by…
M.Hassan
  • 10,282
  • 5
  • 65
  • 84