Coder Social home page Coder Social logo

dmitryshindin / karma-jasmine-order-reporter Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 2.0 12 KB

Karma plugin that reports Jasmine order seed that was used to randomize specs in Karma Runner

License: MIT License

JavaScript 100.00%
test karma karma-plugin karma-adapter karma-reporter karma-jasmine jasmine order seed

karma-jasmine-order-reporter's Introduction

karma-jasmine-order-reporter

Reports Jasmine order seed that was used to randomize specs in Karma Runner

npm version

Use this plugin to get information about Jasmine generated seed. It reports seed info twice:

  1. When Jasmine started:
JASMINE ORDER REPORTER: Started with seed 12345
  1. When Jasmine finished spec run:
JASMINE ORDER REPORTER: Done with seed 12345

This plugin can be useful in scenarios when you have flaky tests, that are failing only on specific seeds. Also it will report seed on Jasmine start regardless of Karma or browser crash while tests run.

Installation

$ npm install karma-jasmine-order-reporter --save-dev

or

$ yarn add karma-jasmine-order-reporter --dev

Usage

Update your karma.conf.js file as follows:

module.exports = function(config) {
  config.set({
    // code omitted for brevity
    plugins: [
      // other Karma Plugins
      'karma-jasmine-order-reporter' or `require('karma-jasmine-order-reporter')`
    ],
    reporters: [
      // other Karma Reporters
      'jasmine-order'
    ]
  });
};

License

MIT Licensed

karma-jasmine-order-reporter's People

Contributors

dmitryshindin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

lelonek1 caplin

karma-jasmine-order-reporter's Issues

Duplicate logging emitted on start/end

Hi,

Thanks for a nice Karma plugin. When enabling this, I get duplicate entries logged on start and end of the test run though:

Chrome Headless 89.0.4389.114 (Linux x86_64) JASMINE ORDER REPORTER LOG: Started with seed 77398
Chrome Headless 89.0.4389.114 (Linux x86_64) JASMINE ORDER REPORTER: Started with seed 77398

[...]

JASMINE ORDER REPORTER LOG: Done with seed 77398
JASMINE ORDER REPORTER: Done with seed 77398

The first and third entries are coloured and the others are not. Is there any way to get rid of that extra logging? We run these tests with logLevel: config.LOG_INFO and with HeadlessChrome as the browser. Can provide more details about our config if needed.

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.