Search code examples
javascriptgruntjsui-testingend-to-end

End-2-End Testing outside angularjs


I'm looking for a way to test an app or a website, which is not based on angularjs, on real browsers and real devices. I found CasperJS, but CasperJS only runs with headless browsers.

Are there test-runner/testing-framework combinations out there which support:

  • grunt
  • all major browser (Chrome, Firefox, Safari, IE)
  • headless browsers (PhantomJS)
  • (optional) simulate touch gestures

Solution

  • I would choose protractor. I know its main target is angular, but it works fine without angular as well. It has nice shortcut features. We use it to test non-angular sites and it looks stable enough. Otherwise it is based on webdriverjs, and it can work with phantomjs as well.

    There is a good starter setup: https://github.com/angular/angular-seed

    And this page can help to tune it for your requirements:

    http://ng-learn.org/2014/02/Protractor_Testing_With_Angular_And_Non_Angular_Sites/

    And the main urls:

    I didn't test the phantomjs part, but google says it should be fine.

    About main browsers Protractor can connect to Saucelabs as well. http://www.saucelabs.com/

    And they have 301 different Device/OS/Browser Platforms at now. https://saucelabs.com/platforms