Giter Club home page Giter Club logo

nightwatchjs_exporter's Introduction

nightwatchjs_exporter

nightwatchjs_exporter runs nightwatchjs tests periodically and exports the results for prometheus.io.

... because end-to-end testing is important, too!

Running this software

You must copy the nightwatch_json_reporter.js file from this repo to the working directory nightwatchjs_exporter will run in. This file is necessary to format nightwatch.js results such that they are easily parsed by nightwatchjs_exporter.

From Binaries

Download the most suitable binary from the releases tab.

Then:

./nightwatchjs_exporter <flags>

Building From Source

go build

You will need to resolve missing dependencies with go get.

Checking the results

Visiting http://localhost:9355/metrics will return metrics for each your nightwatch.js tests.

Configuration

nightwatchjs_exporter requires nightwatch.js! First, please ensure you have a working nightwatch.js installation that can successfully run tests.

Required command-line flags

  -n, --nightwatch=<path>  REQUIRED: Path to your nightwatch executable.
  -t, --testdir=<path>     REQUIRED: Directory containing your 'nightwatch.json' file and 'tests' directory.

Optional command-line flags

The full nightwatchjs_exporter usage is:

Usage:
  nightwatchjs_exporter --nightwatch=<path> --testdir=<path> [options]
  nightwatchjs_exporter --help
  nightwatchjs_exporter --version

Options:
  -n, --nightwatch=<path>  REQUIRED: Path to your nightwatch executable.
  -t, --testdir=<path>     REQUIRED: Directory containing your 'nightwatch.json' file and 'tests' directory.
  --delay=<secs>           Delay in seconds between test executions [default: 30].
  --listen=<host:port>     HTTP listen address [default: :9355].

Example:
  nightwatchjs_exporter --nightwatch=/usr/bin/nightwatch --testdir=/home/my_test_dir

Prometheus Configuration

nightwatchjs_exporter acts as a standard Prometheus target with no special configuration:

  - job_name: 'nightwatchjs'
    scrape_interval: 30s
    static_configs:
    - targets: ['localhost:9355']

Contributing

Something bugging you? Please open an Issue or Pull Request - we're here to help!

New Feature Ideas? Please open Pull Request, or consider one of these ideas:

  • Support nightwatch --env flag.
  • Support multiple nightwatch configs/test directories.
  • Support parallel test execution.

All Humans Are Equal In This Project And Will Be Treated With Respect.

nightwatchjs_exporter's People

Contributors

nmcclain avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nightwatchjs_exporter's Issues

Unable to execute nightwatch js exporter observing permission issues

[root@oci-vm-ravigr nightwatchjs-e2e]# ./nightwatchjs_exporter -n ./ -t ./
2021/04/20 11:39:34 Error with nightwatch - not updating metrics: Start error: fork/exec ./: permission denied
2021/04/20 11:40:04 Error with nightwatch - not updating metrics: Start error: fork/exec ./: permission denied

Appreciate your quick help

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.