better-protractor - no more excuses for not writing tests

npm version Build Status

Test everything you can test with better-protractor which relies on Protractor, the awesome end-to-end-testing framework made by the Angular team. However, Protractor (and therefore better-protractor) can be used on any kind of web page, Angular is not required!

Features

better-protractor will help you to write better end-to-end tests by providing a simple API on top of Protractor. Optimized for usage with Typescript, but tests written in Javascript work as well.

Read this article if you want to learn more about end-to-end testing in general.

I also wrote an article about software quality assurance and testing in general.

Installation:

  1. If you do not have Protractor and Webdriver setup yet, then please do so: Protractor setup. better-protractor relies on Protractor in order to work.
  2. Install better-protractor with NPM: npm install better-protractor or npm install better-protractor --only=dev

Usage:

Compatibility:

Examples

See the e2e folder for code examples in Javascript and TypeScript.

Local development setup

  1. Download the repository.
  2. Get Node.js and install it if you haven’t already.
  3. Use npm install to install the necessary dependencies.
  4. Run webdriver-manager update (once or when you updated your browser).
  5. Run webdriver-manager start to launch Webdriver(Selenium)
  6. Run protractor or protractor-once to run the sample end-to-end tests in the e2e-folder (written in Javascript and TypeScript).
  7. Run npm test to run the unit & e2e tests.

Contribution

Pull requests and feature requests are welcome!