Coder Social home page Coder Social logo

paxe's Introduction

___           ___
|__)  /\  \_/ |__
|    /--\ / \ |___            
-----------------------------------
Puppeteer & Axe ♿ testing framework

Paxe is an automated accessibility testing tool based on Puppeteer and Axe. It runs from the command line and generates HTML reports for each page and each viewport analysed.

It is still a WIP, feedbacks and contributions are highly appreciated!

Get started

For a quick test you can run:

- $> npx @cuginoale/paxe

If you plan to use it frequently or if it's going to be part of your workflow:

- $> npm i -g @cuginoale/paxe
- $> cd path/to/your/project/folder
- $> paxe

On first run Paxe will look for the .paxerc in the current folder. If it can't find it, Paxe wizard will guide you through the steps to create a basic configuration file (still w.i.p.)

The .paxerc file is basically a JSON object, structured as follows:

{
  "default": {
    "viewports": [
      {
        "width": "xx",
        "height": "yy"
      },
      ...
    ],
    "outputFolder": "output",
    "authenticate": {
      "username": "user",
      "password": "pwd"
    }
  },
  "urls": {
    "friendly_name":{
      "url":"http://my_target_website",
      "options":{
        "actions":[
          {"click":"button.sc-fONwsr.dRSxZO"},
          {"waitFor": 1000}
        ],
        "viewports": [
          {
            "width": "xx",
            "height": "yy"
          },
          ...
        ],
        "authenticate": {
          "username": "user",
          "password": "pwd"
        }
      }
    },
    ...
}

default contains the settings applied to all the urls to test. Url specific settings can be defined in the url options section.

The options section for each url is optional and can contain:

  • actions to perform before the test is run
  • specific vieports
  • basic HTTP authentication settings

The actions available are all the actions Puppeteer is capable to run on the page object see relevant doc

Cli

$> paxe --help

Usage: paxe [<option>]

Options:
  --help         Show help                                             [boolean]
  --version      Show version number                                   [boolean]
  --runOnly, -o  Comma separated list of URLs (friendly names)

To test only some of the URLs listed in the .paxerc file use --runOnly or -o followed by the friendly name of the urls to test:

$> paxe -o site1,site2,site3

Report example:

paxe's People

Contributors

cuginoale avatar dependabot[bot] avatar

Watchers

James Cloos avatar

paxe's Issues

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.