Visual Studio Remote Testing - Add additional docker run arguments

Johannes Jaeger 0 Reputation points
2023-07-05T11:38:45.64+00:00

I'm using the remote testing feature from Visual Studio to execute my unit tests on a Linux container.

For this, I have the following Dockerfile.test

FROM mcr.microsoft.com/dotnet/sdk:6.0
RUN mkdir /usr/local/temp

RUN wget https://aka.ms/getvsdbgsh && \
sh getvsdbgsh -v latest  -l /vsdbg

And the following testenvironments.json

{
"version": "1",
"environments": [
    {
        "name": "GitServiceUnix",
        "type": "docker",
        "dockerFile": "Dockerfile.test"
    }
]
}

Working fine as it should.

Now I came to the point that I have to mount a volume into the testing container.

  1. Is there any way to add additional docker run arguments like in the Debug Properties?
  2. Is the remote testing also working with a docker-compose file?
  3. Can I build & run the container myself and tell Visual Studio to execute the remote test on this container?
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,103 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
998 questions
Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying tests as a means of analysis or diagnosis.
349 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 28,761 Reputation points Microsoft Vendor
    2023-07-06T04:02:34.1833333+00:00

    Hi @Johannes Jaeger

    Welcome to Microsoft Q&A! 

    1. Is there any way to add additional docker run arguments like in the Debug Properties?

    It is not supported to add docker run parameters currently. You can vote on this ticket and add your comment. 

    2. Is the remote testing also working with a docker-compose file?

    It is not supported currently. It has been reported to product team. You can track the process.

     

    3. Can I build & run the container myself and tell Visual Studio to execute the remote test on this container?

    You can refer to this similar issue and it might help. 

    Sincerely,

    Anna


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.