Code Monkey home page Code Monkey logo

mochalastic's Introduction

mochalastic - elasticsearch reporter for mocha

Build Status Coverage Status

Pushes test results into an elasticsearch instance.

Installation

$ npm install mochalastic --save

Usage

Ensure that your elasticsearch installation is up and running.

Run mocha with mochalastic:

$ mocha test --reporter mochalastic --reporter-options nodeUris=https://localhost:9200,username=elastic,password=changeme,project=some_project,suite=some_suite, indexPrefix=test-results

or use a mocha.options file

mocha --opts mochalastic.opts build/test
--recursive
--reporter mochalastic
--reporter-options nodeUris=https://localhost:9200,username=elastic,password=changeme,project=some_project,suite=some_suite, indexPrefix=test-results
--no-exit

Your mocha test executions will be marked with a unique id and be pushed into elasticsearch.

it("should return 401 when authenticated with invalid username", . . .
it("should return 201 when product created", . . .

All tests will be published. There is a feature request for skipping 'Pending' or 'Skipped' tests.

Options

nodeUris: string the address of your elasticsearch instance (e.g. for a hosted instance https://localhost:9200m)

username: string elasticsearch username

password: string elasticsearch password

project: string projet name with which the tests are associated

suite: string suite name with which the tests are associated

indexPrefix: string index prefix will be used to create index. After the prefix, the system adds the current date format as yyyy.MM.dd. (e.g. for test-results prefix test-results-2020-02-17)

Contributing

In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.

License

This project is licensed under the MIT License - see the LICENSE file for details

References

mochalastic's People

Contributors

demirermustafa avatar ocinbat avatar

Watchers

 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.