npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

watai

v0.7.0

Published

Integration testing for the modern web

Downloads

43

Readme

Watai

Watai (Web Application Testing Automation Infrastructure) is a declarative, bottom-up BDD, full-stack web testing framework.

It is both a test runner engine (i.e. it executes tests) and a set of architectural patterns to make you write maintainable, solid end-to-end (GUI) tests. It automatically handles asynchronous operations without any work on your side.

The tests you write will automate navigation on your webapp through actual browsers, just like an actual user would.

➥ Read more about what is Watai.

➥ Or watch a 4-minutes introduction: We're bad at web integration testing

Benefits

  1. Creating a safety net to catch regressions in your webapp.
  2. Checking cross-browser consistency automatically.
  3. Defining expected behavior and testing it at user level, not in isolation as in unit tests.

➥ Read more about when and how you should use Watai.

Status

Watai is currently beta-level software

This means that its stability and feature set are evolving. It is constantly improving, and a high level of quality control is applied to its development. But mistakes can always happen.

Code Climate Inline docs

We are currently using Watai in a big live project, and at least two other teams do so. You are highly encouraged to try out Watai and see if it fits your needs. Getting started and writing your first test should take you around 15 minutes, and the results should get you quite excited :)

If anything goes wrong, please open an issue, and I'll do my best to get you out of trouble!

Versioning

SemVer is followed to convey the state of the software through version numbers.

You can rely on the fact that the syntax you write your tests in won't change until a minor version number (the y in x.y.z) is updated. Versions not sufficiently field-tested will be suffixed with -alpha.

Installing

This installation guide assumes a POSIX-compliant OS, such as Mac OS X or Linux. If you're under Windows, see the Windows installation guide.

Dependencies

Node & NPM

Watai runs as a Node.js module. You will therefore need the Node runtime (≥0.6.8 <1.0) and package manager (NPM ≥ 1.2).

If you’re under OSX and have Homebrew:

brew install node

Otherwise, download the Node+NPM package for your environment if you don't already have it.

Selenium Server

Watai uses Selenium-WebDriver to automate browsers. You will therefore need a Selenium standalone server to send commands to the browsers.

If you’re under OSX and have Homebrew:

brew install selenium-server-standalone

…and start it with the command given at the end of the “Caveats” section.

Otherwise, download the latest JAR and start it (preferably in the background):

java -jar path/to/downloaded/selenium-server-standalone.jar

This will output many INFO lines over a few seconds. You know it is done when it says:

… INFO - Started org.openqa.jetty.jetty.Server@…

You will obviously need Java (≥ 1.5). If you don’t have it yet (but you probably wouldn’t be reading this README), download it now.

Optional: ChromeDriver

If you want to test with Chrome (or with other browsers), you will have to install some additional software.

This is completely optional, and you will be operational faster if you do the tutorial with Firefox. The testing itself will be a bit slower, but you may come back to add Chrome later on if you like Watai :)

Package

Once you have both Node and a Selenium server, you can consider installing Watai itself.

Global install (easiest)

npm install --global watai

NPM will automatically create the watai alias for you. If you decide you don’t want to use Watai later on, simply npm uninstall --global it.

Local install

cd choose/your/install/folder
npm install watai
alias watai="$(pwd)/node_modules/.bin/watai"

This will create a node_modules folder with all dependencies in the current directory. A good way to give Watai a quick look if you’re afraid of sudoing.

From behind a proxy

If your proxy configuration prevents you from using npm install properly (i.e. you get ERRTIMEOUT errors), download the latest Watai with NPM dependencies package from the Releases tab, unzip it and:

alias watai='node path/to/unzipped/folder/src'

Note the /src at the end!

Validation

Let’s make sure you’re fully ready to use Watai by typing:

watai --installed

Then, get started with Watai!


License

The code for this software is distributed under an AGPL license. That means you may use it to test any type of software, be it free or proprietary. But if you make any changes to the test engine itself (i.e. this library), even if it is not redistributed and provided only as a webservice, you have to share them back with the community. Sounds fair? :)

Contact the author if you have any specific need or question regarding licensing.