Noisy Pterodactyl Melodies

    wptreport

    0.3.1 • Public • Published

    wptreport - Report generator for WPT test result sets

    If you use the WPT test runner you are getting a bunch of JSON test results which you can't do much that's immediately, humanly useful with. There are quite a few of those in the test results repository.

    The purpose of wptreport is to generate human-oriented reports for such data.

    Installation

    The typical installation is:

    npm install wptreport
    

    If you're hacking on the code, or want to be on the bleeding edge (which shouldn't be needed: I ship the code pretty much anytime I make a change), you can alternatively

    git clone https://github.com/darobin/wptreport.git
    cd wptreport
    npm link .
    

    Usage

    This is a command-line tool, it takes some basic options.

    wptreport [--input /path/to/dir] [--output /path/to/dir] [--spec SpecName]

    • --input <directory>, -i <directory>: Path to the directory that contains all the JSON data. JSON files must match the pattern \w{2}\d{d}\.json where the two first letters are an identifier for the browser engine (use whatever makes sense to your audience) and the number is the version number. Defaults to the current directory. This is also where the filter.js is found, if any (see the section on filtering).
    • --output <directory>, -o <directory>: The directory where the generated reports are stored. Defaults to the current directory.
    • --spec SpecName, -s SpecName: The specification name to use in titling the report. Optional, but certainly looks nicer.
    • --help, -h: Get some help (about the tool, you're on your own for your other issues).
    • --version, -v: Get the version number.

    The format of the JSON files is defined by the test runner.

    Filtering

    If the input directory contains a filter.js file, it will be loaded as a Node module (and can therefore completely operate like one). Some test suites have experimental tests, tests that can provide useful information in some cases that you don't want in others, etc. As such, it can be useful to filter out some results before reporting.

    The module can optionally export two methods:

    • excludeFile(fileName). Receives the name of the test file being looked at (as listed in the JSON data). Return true to skip it (and therefore all of its content), false to keep it.
    • excludeCase(fileName, caseName). Receives both the name of the test file and that of the test case being looked at. Skip with true, keep with false. This is the same as the previous one, only more granular.

    Install

    npm i wptreport

    DownloadsWeekly Downloads

    1

    Version

    0.3.1

    License

    MIT

    Last publish

    Collaborators

    • vivienlacourba
    • tidoust
    • dontcallmedom
    • jennyliang220
    • deniak
    • robin.berjon
    • tripu