-
Notifications
You must be signed in to change notification settings - Fork 0
Testing
Kevin Hannigan edited this page Mar 29, 2017
·
2 revisions
Protractor is used for running our end to end tests
- Install protractor globally via
npm install -g protractor
- Run
webdriver-manager update
. webdriver-manager is installed alongside protractor. It manages the selenium instance that protractor needs to connect to in order to run the tests. - Run
webdriver-manager start
in a separate command window. This starts a selenium server, which will need to be running any time you want to run protractor - Run
protractor protractor.conf.js
while in the base directory of our project. This will execute the protractor tests. You will see a browser window pop up and change as the tests are being run. Yes, it looks very cool, I agree.
Add a file or add to an existing file in /test/e2e/. Protractor runs all files in this folder. The existing tests, protractor documentation, and google should be enough for you to figure it out after looking around a bit. If you can't figure out how to add a test, consider doing a protractor tutorial elsewhere, or just do trial and error until you get it to work.
Karma is used for running our unit tests
npm install
npm install -g karma-cli
karma start
Go to test/ folder.
Add a js file like so nameOfFileSpec.js. Always have Spec at the end of the file.