Get JUnit test results to appear on TeamCity's Testing tab

Answered

I have a TeamCity job that would build my project by:

  1. Execute: docker build
  2. Dockerfile will execute: RUN ["mvn", "clean", "package"]

I am using Maven, JUnit5, and SureFire. I want to pipe my unit test results into TeamCity's Testing tab but am unsure how I can do this with my current setup.

In my Jest set-up, I am using jest-teamcity-reporter. The only JUnit plugin I have found is Serenity TeamCity StepListener but I cannot get the test results displayed on TeamCity's Testing tab.

0
1 comment

Hello, JUnit tests are supported out of the box by TeamCity, but the problem here is that you are running Maven as part of a docker build instead of using the Maven runner.

You have two options:

1. Use the Maven runner, it allows you to run a build in a docker container (see 'Run step within Docker container' field in the build step settings)

2. Import a test report via XML Reports Processing build feature.

0

Please sign in to leave a comment.