Socket
Socket
Sign inDemoInstall

amaze-tdd

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amaze-tdd

A package for conducting functional front-end tests on remote URLs using Selenium and Mocha.


Version published
Weekly downloads
3
decreased by-40%
Maintainers
1
Weekly downloads
 
Created
Source

Amaze test-driven development

This is a set of tools that will allow for test-driven development using the following technologies:

  • Mocha
  • Chai
  • selenium-webdriver
  • Chrome, Firefox, IE, or PhantomJS

TLDR; Install

Install the suite globally to have easy access to amaze from the command line:

npm install -g amaze-tdd

Then install the testing suite into each project root directory with:

npm install --save amaze-tdd

Writing tests

Ensure the testing suite is required at the top of the test

var Amaze = require('amaze-tdd)

Instantiate the browser object in the suiteSetup function. You should look at another test to see an example.

var Browser = new Amaze.Webdriver.Builder().forBrowser(Amaze.Agent).setChromeOptions(Amaze.Options).build();

Running tests

Develop mode

amaze chrome

Production mode

For production, after JavaScript has been compiled and is placed on the remote server, you may use PhantomJS to headlessly test the interfaces. No browser plugin is required.

amaze phantomjs

Test files

Our process will run Mocha on any files in the specified path with the format *-spec.js. This means that the following examples will work:

  • test-spec.js
  • overlay-name-spec.js
  • camelCase-spec.js
  • ALLCAPS-spec.js
  • some-folder/test-spec.js
  • some-folder/nested-folder/test-spec.js

Basically any file that ends with -spec.js will be covered in testing.

Changelog

0.1.1

  • Moved the demo test Browser instance into a suiteSetup to fix the empty browser that spawns during tests
  • Fixed typo of this section heading :-)

0.1.0

  • Removed unused Chai.should() library
  • Added documentation
  • Various cleanup and consolidations

0.0.15

  • Added a jQuery wrapper to make working with Selenium easier

0.0.14

  • Making Chrome plugin path work regardless of project
  • Moving browser builder to individual tests. This is necessary so the browser can reinstantiate itself between tests.

0.0.13

  • Package bin path update

0.0.12

  • Directory structure updates; needed an index.js for easier module loading

0.0.11

  • Removed selenium/mocha wrapper to reduce dependencies
  • Moved to a promise-based test setup
  • Switched from BDD to TDD for clarity
  • Preferring local install to global; was previously global
  • Added changelog :-)

0.0.1 - 0.0.10

  • Regreting not starting a changelog sooner
  • Basically gets stuff setup and working through bugs

FAQs

Package last updated on 02 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc