GithubHelp home page GithubHelp logo

testem-gitlab-reporter's Introduction

testem-gitlab-reporter

TravisCI Build Status Latest NPM release

GitLab/JUnit reporter for testem

GitLab requires the JUnit format for test results. testem comes with an xUnit reporter. Unfortunately, even though the formats look quite similar there are some differences which make them incompatible in the context of GitLab CI. testem-gitlab-reporter is a testem reporter that specifically targets the format that is expected by GitLab CI.

Install

npm install testem-gitlab-reporter

Usage

Change your testem.js file to use the testem-gitlab-reporter package. If you would like to keep the existing TAP console output you can use the testem-multi-reporter package to take advantage of multiple reporters:

const MultiReporter = require('testem-multi-reporter');
const GitLabReporter = require('testem-gitlab-reporter');
const TAPReporter = require('testem/lib/reporters/tap_reporter');

let reporter = new MultiReporter({
  reporters: [
    {
      ReporterClass: TAPReporter,
      args: [false, null, { get: () => false }],
    },
    {
      ReporterClass: GitLabReporter,
      args: [false, fs.createWriteStream('junit.xml'), { get: () => false }],
    },
  ],
});

module.exports = {
  framework: 'qunit',
  test_page: 'tests/index.html?hidepassed&coverage',
  disable_watching: true,
  launch_in_ci: [
    'Chrome'
  ],
  reporter
};

Running testem (or ember test) now will create a junit.xml file, which can be passed to GitLab as described in the GitLab docs.

License

This project is developed by and © Mainmatter GmbH and contributors. It is released under the MIT License.

testem-gitlab-reporter's People

Contributors

turbo87 avatar bobrimperator avatar zeppelin avatar marcoow avatar

Stargazers

Falk Neumann avatar Fabian Fiedler avatar Chris Miller avatar Miguel Angel avatar Andrey Khomenko avatar Djamel B. avatar Cyrille David avatar Frédéric Soumaré avatar

Watchers

 avatar Chris Manson avatar James Cloos avatar Izel Nakri | izelnakri.eth avatar Patsy Issa avatar  avatar Arthur avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.