SimpleTest Help

Events happening in the community are now at Drupal community events on www.drupal.org.
globallyunique's picture

Is there any site or group where it is appropriate to post questions about using SimpleTest? I'm currently struggling with SimpleTest performance on Windows. A DrupalWebTestCase takes many minutes to execute and I can't figure out if this is expected or what to start changing. I'd like to find somewhere that people have described how they've setup their Drupal environment to do TDD.

Comments

it depends what drupal core

rpetrenko's picture

it depends what drupal core you are using. as of now, the intense testing and development happens in D7 whereas D6 is left abandoned.

anyway, if you have a specific question, you can post it here:
http://drupal.org/project/issues/simpletest?categories=All

Simpletest does take some

langworthy's picture

Simpletest does take some time to run tests. Remember that it is installing a fresh version of Drupal each time you run the tests.

The development environment I have is a continuous integration (CI) setup where my tests run on a separate server when I check my code into my git repository. I use the CI Joe CI server[1] and Young Hahn's drush integration[2] to only run the tests I want. I've also included Jabber notifications to let me know whether the tests have passed or failed[3].

As for D6 being left abandoned, I've found that the 6.x-2.10 backport of Simpletest works pretty well.

[1] http://github.com/defunkt/cijoe
[2] http://github.com/yhahn/drush_test
[3] http://dev.nuclearrooster.com/2010/04/27/cijabber-get-cijoe-build-notifi...

How often do you commit

globallyunique's picture

Is the following the correct version for 6.x-2.10 backport of Simpletest? I downloaded it a few weeks ago:
// $Id: simpletest.module,v 1.33.2.4.2.20 2009/09/14 20:34:30 boombatower Exp $
// Core: Id: simpletest.module,v 1.71 2009/08/24 00:14:21 webchick Exp

Is there any doc on how to use yhahn drush_test or do I just read the code?

How often are you able to commit and find out that you have broken something? I'm hoping to be able to get to a relatively short red-green-refactor cycle which won't work if I need to commit every time I change a few lines of code. Do you have a repository for on-going testing that is used just for you and another that is where you commit code that has passed the tests?

Thanks for the help. Moving my tests to a different server will be better than what I'm currently doing.

Mike Vogel

Lately I've been using the

langworthy's picture

Lately I've been using the version of Simpletest that is packaged with Open Atrium. As of beta8, Open Atrium checks Simpletest out of CVS using January 17, 2010 as a marker. Take a look at the Open Atrium .make file to see how it's done[1].

drush_test is fairly straightforward. drush @dev.example test will list available tests for the site with the drush alias @dev.example. drush @dev.example test {name} will run a single test called {name}. drush @dev.example {group} will run all tests in the group {group}. As I want to run more tests I can edit the command that CI Joe will use.

I make my local commits to my git repository as small as possible and commit as often as I can but I probably only push to my git remote a few times a day. The external test server will only run the tests once a push has been done so you can control how often you'd like to run the tests.

Our current git repository structure (which has been changing a lot as we've adopted git and will probably change some more) is to have the master branch as production and to develop on a branch called develop. We've set up our structure similar to this popular git structure by Vincent Driessen [2]. Once a piece of functionality is working with it's tests passing on develop it is merged into master.

[1] http://drupalcode.org/viewvc/drupal/contributions/profiles/openatrium/op...
[2] http://nvie.com/git-model

SimpleTest User help

KathyVS's picture

Is there a good place to ask "dumb" questions? I'm having problems getting my test class to recognize the class under test.

(I suspect the slowness is probably a reason why some tests I see move all the tests into one test case)

Kathy

Kathryn Van Stone
vanstone@rhiza.com

Testing and Quality Assurance

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: