Giter VIP home page Giter VIP logo

nightwatch-demo's Introduction

Nightwatch.js Demo

This is a demonstration of automated acceptance testing using the nightwatch.js framework.

Installing

Note: This requires a recent version of the JDK to be installed!

  1. Fork and clone
  2. yarn (or npm install if you're a square)
  3. npm run dev to start the Barkwire web app. It will be available at http://localhost:3000.
  4. In another shell, npm run install-selenium to install Selenium WebDriver, then npm run selenium to start it
  5. In yet another shell, npm test to run your automated acceptance test.
  6. Star the repo because it was so helpful!

Experimenting

  1. This demo uses the phantom.js headless browser. The nightwatch.json file is where you configure the tests for other browsers (Chrome, Firefox, Safari, etc.)
  2. The test spec in tests/add-puppy.js should give an idea of how these tests are written. The API for nightwatch is simple to learn, and the resulting tests are extremely readable.
  3. There's a small amount of magic happening in the npm scripts- check out the scripts hash in package.json to see how they work. They can be even more magical by adding something like watch to automatically run your tests whenever your app files or tests change.
  4. It's a pretty paint-by-numbers Express app. It uses knex to abstract out all the database stuff, which is all stored locally in a SQLite3 embedded database. It also uses Handlebars and SCSS.

Other resources

nightwatch-demo's People

Contributors

kylecoberly avatar

Stargazers

 avatar  avatar  avatar  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.