05 Okt

JavaScript: Guide to the JavaScript Ecosystem

Beginning – Libraries and Frameworks

UI

  • Angular 2
  • Ionic
  • Onson UI
  • Framework 7

Unit Testing

  • Karma
  • Jasmine

End-to-End Testing

Technologies

Unit Testing

Protractor (http://www.protractortest.org/)

Use npm to install Protractor globally with

 $ npm install -g protractor

The webdriver-manager is a helper tool to easily get an instance of a Selenium Server running. Use it to download the necessary binaries with:

 $ webdriver-manager update

Now start up a server with:

$ webdriver-manager start

Install a demo repository:

 $ git clone https://github.com/juliemr/protractor-demo.git $ npm install

Update selenium driver

 $ node_modules/protractor/bin/webdriver-manager  update

Run server in background:

 $ node app/expressserver.js &

Now run the tests

 $ npm test > protractor-demo@0.0.1 test /CLOUD/Environment/workspace.javascript.testing/protractor/protractor-demo > protractor test/conf.js Using ChromeDriver directly... [launcher] Running 1 instances of WebDriver Started ... 3 specs, 0 failures Finished in 6.552 seconds [launcher] 0 instance(s) of WebDriver still running [launcher] chrome #1 passed