Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between Cucumber and Protractor?

So I have written an Angular app and I want to implement end-to-end testing, so I searched the internet for a tool. I found out that Protractor and Cucumber are two popular tools that do that, but I am confused as to what is the difference between them.

like image 502
iams0nus Avatar asked Feb 09 '17 09:02

iams0nus


People also ask

Can we use Cucumber with Protractor?

Cucumber is another BDD framework that focuses more on features or stories. It mimics the format of user stories and utilizes Gherkin. Cucumber provides your team with living documentation, built right into your tests, so it is a great option for incorporating with your Protractor tests.

What is the difference between Cucumber and BDD?

Cucumber is a free or open-source BDD (Behavior Driven Development) tool. Selenium is also a free or open-source testing tool. Cucumber is a BDD supported tool. Selenium is a both Functional and Performance (Selenium Grid) testing tool.

Why Protractor is deprecated?

Why is Protractor being deprecated? Protractor was created in 2013. During that time WebDriver APIs were not yet standard, because of which testers and developers faced difficulties in writing end to end tests as there was very little support for async/await.


1 Answers

Cucumber and Protractor dont do the same job to compare

Cucumber enables us to write automated tests in a behavior-driven development (BDD) style. Its available vis-a-vis with Jasmine or Mocha as a test framework over Protractor API

Protractor is a wrapper over WebDriver Js to write e2e tests to interact with browser. You can write Protractor tests using any of the below Frameworks

  1. Jasmine

  2. Mocha

  3. Cucumber

You will cucumber as a custom framework in Protractor config when you need to write your tests in a BDD style - acceptance tests

I guess this is enough to get you started and you can read more about Protractor with Cucumber here. there are npm packages - cucumber & protractor-cucumber-framework which will enable this integration

like image 151
AdityaReddy Avatar answered Nov 02 '22 23:11

AdityaReddy