2014-11-04 09:38:45 -05:00
|
|
|
Testing is done using Karma.
|
|
|
|
|
|
|
|
|
|
|
|
UNIT TESTING
|
|
|
|
============
|
|
|
|
|
|
|
|
Requires the following:
|
|
|
|
- npm/nodejs
|
|
|
|
- phantomjs
|
|
|
|
|
|
|
|
Requires the following node packages:
|
2014-09-22 05:27:03 -04:00
|
|
|
- npm install jasmine
|
2014-11-04 09:38:45 -05:00
|
|
|
- npm install karma
|
|
|
|
- npm install karma-jasmine
|
|
|
|
- npm install karma-phantomjs-launcher
|
|
|
|
- npm install karma-junit-reporter
|
2014-09-22 05:27:03 -04:00
|
|
|
|
2014-11-04 09:38:45 -05:00
|
|
|
Make sure you're in this directory so it can find the config file and run:
|
2014-09-22 05:27:03 -04:00
|
|
|
karma start
|
|
|
|
|
2014-11-04 09:38:45 -05:00
|
|
|
You should see all the tests pass.
|
|
|
|
|
|
|
|
|
|
|
|
E2E TESTING
|
|
|
|
===========
|
|
|
|
|
|
|
|
npm install protractor
|
|
|
|
|
2014-09-22 09:36:06 -04:00
|
|
|
|
2014-09-22 09:29:12 -04:00
|
|
|
Setting up e2e tests (only if you don't have a selenium server to run the tests
|
|
|
|
on. If you do, edit the config to point to that url):
|
2014-09-22 09:36:06 -04:00
|
|
|
|
2014-09-22 09:29:12 -04:00
|
|
|
webdriver-manager update
|
|
|
|
webdriver-manager start
|
|
|
|
|
2014-09-22 09:36:06 -04:00
|
|
|
Create a file "environment-protractor.js" in this directory and type:
|
2014-09-22 10:00:23 -04:00
|
|
|
module.exports = {
|
|
|
|
seleniumAddress: 'http://localhost:4444/wd/hub',
|
2014-09-22 11:50:12 -04:00
|
|
|
baseUrl: "http://localhost:8008",
|
2014-09-22 10:00:23 -04:00
|
|
|
username: "YOUR_TEST_USERNAME",
|
|
|
|
password: "YOUR_TEST_PASSWORD"
|
|
|
|
}
|
2014-09-22 09:36:06 -04:00
|
|
|
|
2014-09-22 09:29:12 -04:00
|
|
|
Running e2e tests:
|
|
|
|
protractor protractor.conf.js
|
|
|
|
|
2014-09-22 11:50:12 -04:00
|
|
|
NOTE: This will create a public room on the target home server.
|
2014-09-22 09:29:12 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-22 05:27:03 -04:00
|
|
|
|