jeudi 8 octobre 2015

Protractor & Cucumber VS Selenium for UI automation of AngularJS apps

I just heard of Protractor and Cucumber today and am just wondering why one would use Protractor & Cucumber as opposed to Selenium WebDriver for UI automation of AngularJS applications.

Some of the advantages I have heard for using Protractor and Cucumber: 1. As a developer, you don't need to checkout code to run tests, you can just call gulp test or gulp protractor depending on how your configs are setup 2. Business users can write their own tests as cucumber follows a builder pattern that's very human-readable

  1. Setting up mocking data to be used by the tests is a lot easier with protractor and cucumber than Selenium WebDriver.
  2. Protractor and Cucumber will simulate the browser just like WebDriver will; I believe Protractor can be set up with a selenium server.
  3. Drawbacks: Too many dependencies, to use protractor and cucumber, you have to know Javascript, the protractor framework itself, get familiar with cucumber and finally it also uses selenium.

Problems with using Selenium Webdriver: 1. As a developer you have to checkout the selenium code before you can write your own tests against ongoing development 2. You can't set up mock data as easily as you can with Protractor and Cucumber 3. Selenium Webdriver code is not friendly to business users as cucumber is, unless you write your java code in a builder pattern fashion but still a pain to a business user

  1. Advantages: Fewer dependencies, you just need Java and Selenium; possibly Javascript too using the JavascriptExecutor of webdriver.

Anyways, I need to decide what method is preferred if I want to be able to gain some of the advantages listed above for Protractor and Cucumber. I'm leaning toward Selenium WebDriver because I already know Java but are there other reasons for using Protractor and cucumber OVER Selenium WebDriver ?

I have to choose between Protractor&cucumber and selenium WebDriver for automating the testing of AngularJS apps; any ideas would be appreciated.

Thanks

Aucun commentaire:

Enregistrer un commentaire