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.


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 (test runner)
  • Chai (an assertion library)
  • webdriverio (browser control bindings)
  • Selenium (browser abstraction and factory)
  • PhantomJS (headless browser)

TLDR; Install

npm install -g amaze-tdd

Running tests

First, start the Selenium server with:

java -jar selenium/selenium-server-standalone-3.0.0-beta4.jar

Then run tests with:

amaze test

Dependencies

You will also need to add the webdriver locations to your $PATH. They come in this package, but you will want to move them somewhere static. Then point that location using:

export PATH=$PATH:location/to/webdriver/folder

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.

Troubleshooting

If you encounter errors, this section may be able to help.

"Could not start Selenium server..."

The Node application can't automatically start your Selenium server so you'll need to start it manually. You can do so by finding the .jar file in node_modules/amaze-tdd/selenium or similar, and running:

java -jar path/to/selenium/selenium-server-standalone-3.0.0-beta4.jar

You should run this in a separate Terminal instance.

"Can't find Python executable 'python'..."

You need to either update or install Python for your system. See this post on StackExchange for more information.

In-depth install (also known as Windows)

There are a few additional steps necessary to get this running in Windows. I'll detail those below:

  • Ensure you have the Java Runtime Environment installed on your computer
  • In your Advanced System Settings, click "Environment Variables", then PATH, then the Edit button
    • Add the full directory to your Java install (usually C:\Program Files\Java\jre-[version]\bin\Java)
  • Assuming you've already cloned this repository, add another environment variable to your PATH that points to the location of webdrivers\geckodriver.exe found in this repo. Feel free to move them to a more static place on your machine if you wish.
  • Start the Selenium server and run the tests using the above directions

FAQs

Package last updated on 14 Oct 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