question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Need guidance to run tests when using CI/CD on VSTS

See original GitHub 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?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
eiximeniscommented, Mar 22, 2018

Hi. I think there is a better approach:

  1. Having a container test that saves the test results to a xml file
  2. Add the test container to compose file
  3. Create a bind mount for sharing xml results file between container and host (vsts agent)
  4. Use “docker-compose run” to run the test container. If test fails, this will make vsts build to fail (note that do not happen using docker-compose up).
  5. Use the “publish test results” task to publish test results to vsts. Configure task to run even though previous task fails.

[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

0reactions
mvelosopcommented, Jun 26, 2018

Closing this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Run quality tests in your build pipeline by using Azure ...
Run unit tests locally and then in Azure Pipelines. Add dashboard widgets to visualize test runs over time. Perform code coverage testing to...
Read more >
Run automated tests from test plans - Azure
Run automated tests on-demand against Team Foundation builds from test plans in the Test Manager with a build or release pipeline.
Read more >
Automated Testing for CI/CD | TeamCity CI/CD Guide
The purpose of running automated tests as part of your CI/CD practice is to get rapid feedback on the changes that you have...
Read more >
Enabling Continuous Integration with Azure Pipelines
In this lab, you will learn how to configure continuous integration (CI) and continuous deployment (CD) for your applications using Build and ...
Read more >
How To Build a CI/CD Pipeline In Azure DevOps ?
In this blog, we will see how to build a CI/CD pipeline in Azure DevOps along with its integration with LambdaTest for bug...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found