FCTA_CS – Help with error? “No test matches the given testcase filter”

I’m very new to .NET/C# and am running into a recurring error I can’t get my head around with my foundation certificate test automation framework…

If I run my UNIT/API/E2E tests within Visual Studio Test Explorer they run successfully, but if I try to run the tests programmatically using a command like:

<dotnet test --filter FullyQualifiedName~Timesheet.Test.UNIT>

…then I will get an error message like:

“Starting test execution, please wait…
total of 1 test files matched the specified pattern.
No test matches the given testcase filter FullyQualifiedName~Timesheet.Test.UNIT

So my tests will build on the pipeline without issue but they do not actually execute so the test results just show “No tests found”.

I believe all the necessary Packages are installed and up to date, but perhaps something is not being referenced correctly in the project and/or tests?

I’ve attached my Timesheet.Test.csproj and AuthDBTest.cs files for reference below.


2 Likes

@sarahdeery is there anyone that can help with FCTA_CS C# issues?

3 Likes

Hi @john_boho

Could you share a bit more detail as to where the test is stored within your repository. I have a suspicion of what might be going on, but will need to understand where your test file is first.

3 Likes

Hi Mark, yes I’ve been using Visual Studio for the course and did suspect that the way I have the project structured may be wrong and that the Timesheet.Test folder should be within the Timesheet project? (Not as another project within the Solution).
VS_Project_Structure_1
VS_Project_Structure_2

1 Like

Ok try running:

cd Timesheet.Tests
dotnet test --filter API/Timesheet.Tests.Unit --results-directory test-results --logger trx

See how that works

3 Likes

OK so these 3 commands seem to work :+1:
dotnet test Timesheet --filter Timesheet.Test.Unit
dotnet test Timesheet --filter Timesheet.Test.API
dotnet test Timesheet --filter Timesheet.Test.E2E

So I’m now seeing Test Results in GitHub Actions :grin:
(Only E2E test is failing because headless Chrome is trying to run v126 and not v127 as expected by Chromedriver)

Thanks!!!
GitHub Actions Test Results

1 Like