Skip to content

Instantly share code, notes, and snippets.

@wataruoguchi
Last active August 29, 2015 14:26
Show Gist options
  • Save wataruoguchi/8b071be8d6064fee8f8a to your computer and use it in GitHub Desktop.
Save wataruoguchi/8b071be8d6064fee8f8a to your computer and use it in GitHub Desktop.
angularjs - testing with gulp

Initial

This is a description of https://github.com/wataruoguchi/AngularJS-TDD-example

your-directory

  • index.html

Build environment

Install packages, selenium server, and web driver

sudo npm install --save-dev gulp gulp-protractor gulp-webserver run-sequence
sudo node node_modules/gulp-protractor/node_modules/protractor/bin/webdriver-manager update

your-directory

  • index.html
  • node_modules

Make your gulpfile.js

Note: If you refer my repo, I made gulpfile.coffee and it requires gulpfile.js.

your-directory

  • index.html
  • node_modules
  • gulpfile.js

Make your test directories

mkdir test
mkdir test/e2e
mkdir test/e2e/spec

Make config.js at e2e

Make main.js at spec

your-directory

  • index.html
  • node_modules
  • gulpfile.js
  • test
    • e2e
      • config.js
      • spec
        • main.js

Test

gulp test:e2e

Reference(Japanese)

http://qiita.com/yuyaohshimo/items/ce155b92878275056401

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment