Muting Tests in docker show as failed

hello!

I am using xUnit-Tests, which are running inside of a docker container and they run just fine so far. 
But I realized, when I mute a failed test and start another run, the muted test will be just shown as failed again on the webpage instead of muted and I just don't know why.

Same thing happens if I set investigation options.

Could this be related to docker? 
I pass the TEAMCITY_PROJECT_NAME environment variable to the container and set DOTNET_CLI_TELEMETRY_OPTOUT=1 inside of the container, to get the testresults on the teamcity webpage.
I start the test run inside of a build-step with the docker runner, while using the exec command and pass “containername dotnet test /mytest.dll --verbosity=normal” as additional arguments.

We're using version: 2024.07.3 (build 160765)

0
3 comments

Hi,

Do you still face this issue?

>start the test run inside of a build-step with the docker runner, while using the exec command and pass “containername dotnet test /mytest.dll --verbosity=normal” as additional arguments.

If you don't mind, could you please share the relevant build log and a screenshot of the build step configuration where this command is executed?

Files can be uploaded via https://uploads.jetbrains.com/. Please let us know the exact id after the upload.

Best Regards,
Tom

0

Thanks for your reply! Yes, I still have this issue.
Here is my configuration of my buildstep.

 

And a screenshot from the buildlog of the build step. There is nothing suspect I think.
 

And the End of the log:
 

0
Hi,

Sorry for the delayed response, and thank you for sharing the details.

It’s very likely that the test assembly (my.dll) is not being rebuilt or updated between builds, which could explain the issue you’re encountering in TeamCity with muted or investigated test statuses not being respected.

Please verify that the test project is being rebuilt — either with dotnet build or dotnet publish — before running dotnet test.

Here are a few suggestions you can try:

- Add a dotnet build step (either inside or outside the Docker container) to ensure the DLL is freshly generated.

- Build the DLL outside the container, then mount the output directory into the container at runtime.

- Avoid copying my.dll from previous builds or artifacts unless it has been rebuilt, as this can prevent proper test tracking in TeamCity.

If the issue persists, could you please share the build log file with us?
Additionally, please include a step in the build process to verify whether the my.dll file is being updated. This will help us investigate the issue more effectivel

Files can be uploaded via https://uploads.jetbrains.com/. And let us know the exact id after the upload.

Best Regards,
Tom
0

Please sign in to leave a comment.