6

For PHP code in custom module, we use SimpleTest. But how do you test the JavaScript code in a module or a theme?

I known about JavaScript testing frameworks like Jasmine or QUnit, but I'm curious to known if and how they are used to test Drupal specific JavaScript code.

1
4

Right now we don't have any automated testing of the UI. There have been talks about using Selenium and there is even a proposed session about it for DrupalCon London, but i don't know of any work that has been done yet.

This could be a nice contribution for Drupal 8.

3
  • 1
    I think someone started with that and got some basic selenium tests working. Some details can be found on this site: ygerasimov.com/…
    – Berdir
    May 13 '11 at 8:08
  • We use selenium to test lots of ui things. We use it together with jenkins (former hudson) and it works fine. Problem is the total runtime of all tests (~60 min) although we do not test nearly every (non-admin) form.
    – nonsenz
    May 13 '11 at 8:54
  • 1
    Selenium is great for front end testing however it isn't 'unit' testing more system testing. May 13 '11 at 15:42
1

There is currently a gsoc project which takles with this problem: http://groups.drupal.org/node/139709

This plan sounds like a good solution

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.