GitLab-CI

yml example

.Net Core

image: mcr.microsoft.com/dotnet/core/sdk:3.1

stages:
  - test

test:
  stage: test
  script:
    - dotnet build
    - dotnet test --no-restore --no-build --logger:"junit;LogFilePath=bin/TestResults.xml" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=./coverage
    - dotnet tool install dotnet-reportgenerator-globaltool --tool-path tools
    - ./tools/reportgenerator -reports:"**/coverage.opencover.xml" -targetdir:"coverage"
  artifacts:
    paths:
      - ./coverage
    reports:
      junit:
        - '*/*/TestResults.xml'

JavaScript

Use cases

Consider the following workflow:

  • Your master branch is rock solid, your project is using GitLab CI/CD and your pipelines indicate that there isn’t anything broken.

  • Someone from your team submits a merge request, a test fails and the pipeline gets the known red icon. To investigate more, you have to go through the job logs to figure out the cause of the failed test, - which usually contain thousands of lines.

  • You configure the JUnit test reports and immediately GitLab collects and exposes them in the merge request. No more searching in the job logs.

  • Your development and debugging workflow becomes easier, faster and efficient.

.Net Core

JavaScript with Mocha

JUnit Reporter for Mocha

Produces JUnit-style XML test results.

View

If JUnit XML files are generated and uploaded as part of a pipeline, these reports can be viewed inside the pipelines details page. The Tests tab on this page will display a list of test suites and cases reported from the XML file.

junit-test-reports

MinIO is High Performance Object Storage released under Apache License v2.0. It is API compatible with Amazon S3 cloud storage service. Using MinIO build high performance infrastructure for machine learning, analytics and application data workloads.

AI reviewer

Qode Merge PR-Agent aims to help efficiently review and handle pull requests, by providing AI feedback and suggestions

Last updated