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!
AngularJS is a JavaScript-based front-end web framework based on bidirectional UI data binding and is used to design Single Page Applications.
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.
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.
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.
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.
You should check out Cucumber.js.
If you're looking for a more comprehensive example using Protractor checkout this angular-cucumber-example.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With