Agile development with Javascript

I want to accept Agile Development for a web2py based project on the backend and Ember on the front panel. For this, I would like to use Driven Driven Development (BDD) tools such as Cucumber and Capybara for Rails. An implicit requirement is that team members writing user stories should be able to write and run BDD tests without a deep knowledge of the code being developed.

I think Cucumber.js combined with Zombie.js or Selenium would be a good approach, but then there are Jasmine and Mocha . Both claim to let you test BDD for JavaScript, but I have the feeling that they are more suitable for testing modules, rather than testing web applications by modeling how the real user will interact with the application.

Can anyone who tried BDD with Cucumber.js , Jasmine or Mocha share their point of view as to which one would be the best choice for BDD with javascript?

Also, are there other alternatives to consider?

+4
source share
1 answer

For a full BDD testing stack, you can use:

1) cucumber.js + selenium + Soda (or another adapter for node) + node.js

or

2) cucumber.js + zombie.js + node.js

Personally, I would go with the second option, since cucumber.js provides you with javascript stub code after parsing your scripts / functions / step definitions written in Gherkin syntax. you can use this code and further customize your zombie world and provide all the necessary auxiliary approval functions for your test suites, and you are all set up. The only advantage that I see in selenium is its Webdriver features (sauce laboratories, etc.) and recording functionality, but I think the syntax used in zombie.js to manage the tests is pretty simple and maybe you not all the functionality selenium provides you.

About mocha and jasmine, if you want the Gherkin syntax, then no one will provide you this function, but if you want to write your whole test in the style of the Rspec syntax, you can go with one of them instead of cucumber.js, it all depends on how important Hunter's style is.

+3
source