2.4.0 • Published 6 years ago

@financial-times/n-automation v2.4.0

Weekly downloads
13
License
MIT
Repository
github
Last release
6 years ago

n-automation Circle CI

Run automated regression tests for your app using nightwatch.js and get results on Slack and email.

Installation

npm install @financial-times/n-automation

Usage

Makefile

Write a regression recipe on your Makefile containing the tests you'd like to run, passing the n-automation reporter to nht nightwatch:

REPORTER = ./node_modules/@financial-times/n-automation/build/reporter.js

regression:
	nht nightwatch -c nightwatch.js path/to/test.js --reporter ${REPORTER}
	nht nightwatch -c nightwatch.js path/to/anotherTest.js --reporter ${REPORTER}
	...

Init

Init n-automation in an independent file somewhere in your project, for example jobs/run-regression.js:

const Automation = require('@financial-times/n-automation');

Automation.run({
	appName: 'Your App Name',
	nightwatchJson: require('../nightwatch.js')
});

Only pass in nightwatchJson if your project has a nightwatch config. If not, send only appName and n-automation will default to the n-heroku-tools nightwatch config file

Env Variables

  • process.env.SLACK_URL Slack Incoming Webhook Integration URL for the channel to notify
  • process.env.SLACK_MENTIONS Slack users to mention on failure (optional)
  • process.env.REGRESSION_RECIPIENTS email addresses of the people to notify on test failure

Heroku Schedule

Schedule your job with something like the Heroku Scheduler. Once a day is recommended.

Email on failure

Full nightwatch output will be sent to the email addresses above whenever a test fails.

Examples

See next-signup

2.4.0

6 years ago

2.3.14

6 years ago

2.3.13

7 years ago

2.3.12

7 years ago

2.3.11

7 years ago

2.3.10

8 years ago

2.3.9

8 years ago

2.3.8

8 years ago

2.3.7

8 years ago

2.3.6

8 years ago

2.3.5

8 years ago

2.3.0

8 years ago

2.2.0

8 years ago

2.0.4

8 years ago

2.0.3

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.2.6

8 years ago

1.2.5

8 years ago

1.2.4

8 years ago

1.2.2

8 years ago

1.2.1

8 years ago

1.1.4

8 years ago

1.1.2

8 years ago

0.1.0

8 years ago