0

I really need your assistance.

I am developing a project and most of the code is written on JS (backbone.js and jquery). Could you please recommend me a tool/framework for functional testing?

I don't think that qunit or Jasmine meet the requirements of functional testing. I would like something like cucumber for Rails but which could handle a lot of JavaScript.

1
  • There is cucumber.js now. But it's not fully compliant, yet (Scenarios Outlines missing) and it doesn't seem to be very active. Commented Jan 27, 2013 at 17:23

2 Answers 2

2

You could use http://casperjs.org/ a nice little library created for headless browser PhantomJS. It's a full webkit, so you have almost 100% real browser interaction.

If you prefer running it on Selenium, with multiple real browser instances, check geb : http://www.gebish.org/

Note that most of the JS test frameworks have problems with alert() and confirm() windows (some really dirty hacks are used to handle them), so you may need to resort to pure Selenium http://seleniumhq.org/. I'm still testing it, but SeleniumIDE handles alerts very well, so I think this will also be true for Selenium WebDriver. Selenium has bindings in many popular languages (no JS though), so I guess you'll find something that suits you.

Sign up to request clarification or add additional context in comments.

2 Comments

@jerico PhantomJS uses it since 1.8. You can run it as standalone "Selenium" server.
1

If you consider using a framework for it, try JavascriptMVC:

http://javascriptmvc.com/

It does:

  • Unit testing
  • Functional testing
  • Code cleaning
  • Code generating
  • Dependency management

And uses jQuery as a backbone. It's typically useful for middle to large JavaScript projects.

1 Comment

JavaScriptMVC's functional testing framework is called FuncUnit. I didn't enjoy using it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.