-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Need guidance to run tests when using CI/CD on VSTS #549
Comments
Hi.
[A bit of spam]: I wrote a blog post in my blog (in spanish) about the topic: https://geeks.ms/etomas/2018/03/07/ejecutar-pruebas-de-tus-contenedores-en-vsts/ It is centered on a simpler case (only one container) but is easily extensible to multi-container solution like eShop. Anyway @CESARDELATORRE maybe we could create some wiki topic for this issue |
@eiximenis thanks for this, this approach makes sense. I am quite new to Docker, can you give me some rough pointers as to what I will need to alter from your example in order to make it work with a multi-container solution? |
I've just asked the exact same question here Any guidance available somewhere for microservices ? |
@eiximenis It's exactly what I was looking for, but with no luck on Google. I just have an additional question about Microservices : should each Microservice project have its own Test project ? Indeed in eShopOnContainer it's not the case and I wonder how you deal with your tests in VSTS ?? |
@eiximenis I tried to leave a comment on your blog with no success. |
Hi @NicolasReyDotNet The VSTS pipeline I have is exactly the one shown in this article. In VSTS I use th BUILD_ARTIFACTSTAGINGDIRECTORY environment variable as a host path for the bind mount, so in the “Publish Test Result Task” I need to set the “Search folder” to Search folder: $(Build.ArtifactStagingDirectory) Let me know if you still have problems! |
@eiximenis I can't access your blog since I posted a comment, I get a blank screen : same from each device from where I posted a comment (sorry for the double post I thought an error occured) Well, I stilll get the same problem... I think I should miss some point, but I don't know which one. The discussion on stackverflow is here CI publish test fail |
Closing this issue.
|
Hi there, would be great if you could provide additional guidance for testing when using VSTS for CI/CD.
So far I have built the 'unittest' container and modified the dockerfile to include:
RUN dotnet test --logger "trx;LogFileName=TEST-unittest_results.xml"
I can see the tests being run and the file being created BUT how do I know get the file in VSTS and how to stop the build if there are failing tests? I have added the 'Publish Test Results' task but it doesn't find the file. I'm guessing this is because the file is in the container vs the build environment.
I found this but cant seem to get it working (I'm guessing it is because I am using the Linux host).
Is there are more elegant way?
The text was updated successfully, but these errors were encountered: