Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I use Cucumber for an AngularJS single page application?

I'm fairly new to both Cucumber and Angular. I have a rails application that is a single page application. Should I bother with Cucumber or should I just use AngularJS's e2e testing?

Any insight, comparison and past experience is appreciated!

like image 873
kenttam Avatar asked Sep 19 '13 23:09

kenttam


People also ask

Which module helps your application to become a single page application?

AngularJS is a JavaScript-based front-end web framework based on bidirectional UI data binding and is used to design Single Page Applications.

What is SPA single page application in AngularJS?

Single page applications are the web applications that load a single HTML page, ensuring better performance and making the pages load faster. Popular apps like Gmail, Facebook, Twitter, Netflix, and more are some examples of SPA.

Can we create website using AngularJS?

AngularJS, built by Google, is an open-source web application framework that is designed to make both front end development and testing easier for web developers. The main goal of AngularJS is to elongate web applications with MVC (Model–view–controller) capability.

How is AngularJS helpful in creating spa website?

SPA is getting popular nowadays and the technology like AngularJS aids to create such applications. AngularJS helps to create web applications which are based on HTML, CSS, JavaScript. AngularJS brings the MVC capability to the web application and hence making it more modular and easy to develop, maintain and test.


2 Answers

We use a combination of Cucumber and Jasmine for our Angular application.

Months ago when I initially tried to get Angular's e2e testing framework running , the documentation was pretty limited so we opted for Cucumber - Selenium for the UI tests.

I believe with Angular's e2e framework you can mock calls to backend but if you want to do actual integration testing using Cucumber + Selenium is a decent option.

like image 87
smk Avatar answered Oct 05 '22 03:10

smk


You should check out Cucumber.js.

If you're looking for a more comprehensive example using Protractor checkout this angular-cucumber-example.

like image 20
Matt Richards Avatar answered Oct 05 '22 04:10

Matt Richards