Answer the question
In order to leave comments, you need to log in
BDD for Javascript on Windows
I didn't think it was such a problem, but I can't find a testing environment (BDD or acceptance test) for my application. I would like:
1. that tests can be written in javascript (for php I use PHPUnit with Behat / Mink, for Ruby - Cucumber),
2. to work under Windows without dancing with tambourines,
3. so that the tools are not outdated at the time of writing this question.
For TDD, I use Jasmine, which, in conjunction with Cucumber.js and Zombie, allows you to write BDD tests like
When I open page www.toster.ru
Then I should see answer on my question
Answer the question
In order to leave comments, you need to log in
Look at mocha . Now it is the most popular and convenient framework for testing js applications. Great for both client and server side.
Supports BDD interface for writing tests visionmedia.github.io/mocha/#interfaces
I can't say 100% about windows, I don't work with it, but my colleagues had no problems.
I also advise you to take the full stack of related frameworks when choosing a mock:
mocha - directly for tests
chai - assertion framework for mocha, will allow you to use the whole variety of BDD checks chaijs.com/api/bdd
sinonjs if you need mocks for ajax requests
grunt and a plugin for mocka to make it easier to run tests, with the grunt-contrib-watch plugin, it will automatically restart tests on any change in js files and / or tests
and karma or testem to run tests in several browsers at once
We use a bunch of selenium and node.js modules: cucumber.js + webdriver.io
1) When should I write .feature specifications from cucumber.js?
2) If mocha with a BDD interface is used, then there is no need for cucumber?
3) What are the advantages of cucumber over mocha?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question