simpletest

pedrorocha's picture

Drupal, testes unitários e simpletest

"A Drupal Module Developer's Guide to SimpleTest" - http://www.lullabot.com/articles/drupal-module-developer-guide-simpletest
"An Introduction to Unit Testing in Drupal" - http://www.lullabot.com/articles/introduction-unit-testing

Curioso como esses links me passaram despercebidos ao longo de meses desenvolvendo com Drupal, mas é uma ótima referência para quem já percebeu o valor de se testar as coisas..rsrs

Falando sobre o valor disso, segue um trecho:

"Writing unit tests helps produce higher quality code on many levels.

Login to post comments · Read more

Simpletest Modülü ve MySQL Senkronizasyon Modülü

Arkadaşlar Drupal modülleri ile ilgili 2 sorunum var yardımcı olursanız memnun olurum:

1- Drupal 6.14 içinde Simpletest 6.2.9( http://drupal.org/project/simpletest ) modülünü çalıştıramadım, Modüller listesinde görüyorum ama aktif hale getirmek için checkbox kapalı durumda görünüyor,
* CURL extension for PHP
* DOM extension for PHP. DOM support is included by default in php5.
* Recommended PHP memory limit of 256MB (not exact)
bunlar tamam, hepsi aktif durumda. eksik olan nedir?

Login to post comments · Read more

Simpletest and CCK types

Hey all,

Ive been exploring the wonderful Drupal framework for some weeks now, been reading alot about modules, module development and theming. In the last few weeks i have developed some small modules that i want to test using the Simpletest module.
Ive read the documentation and the tutorial to get some sense of how to set up Simpletest for my modules. So i thought i would start by making some functional tests for my custom CCK types. So far i haven't had much luck, ive been wrestling Simpltest for a while now and its not returning the love so far :P

1 comment · Read more
bonobo's picture

Contract Developer -- Simpletest and Dev/QA/Prod workflow | FunnyMonkey

Employment type: 
Contract
Telecommute: 
Not allowed

Contract Help Wanted

We (FunnyMonkey)are looking for a local (Portland, OR) contract developer to help with the following general areas:

1.Writing simpletests.
2.Working with our development team on moving sites between Development to QA to Production.

At the risk of stating the obvious, we are fully committed to an open source development model. Toward that end, any test coverage we develop for contrib modules will be released back on drupal.org.

Read more
Dave Reid's picture

Need reviews on assigning permissions in SimpleTest

Several core tests (contact, comment, poll) have a need to be to adjust the permissions for anonymous users. We can easily adjust permissions for users by calling drupalCreateUser() with different permissions, but we don't have an easy way to do the same thing for anonymous users. As of now, the tests have to add an admin user with the permission 'administer user permissions' and use drupalPost() to adjust the admin/user/permissions page. This implementation is ugly and wasting effort by duplication.

Since we provide the drupalCreateUser() and drupalCreateRole() methods in DrupalWebTestCase, I proposed adding a drupalSetPermissions() that could be easily reused throughout core tests and would be very handy for a lot of contrib module tests. But it needs more reviews.

Login to post comments · Read more
Dave Reid's picture

Testing contrib module integration with other contrib modules

I am writing a test for one of my contrib modules that has a feature that is enabled when another contrib module (we'll call it OtherModule) is enabled. I want other people other than myself to be able to run the entire test suite, but what if they didn't have OtherModule installed or even present in their Drupal installation? The test is going to fail spectacularly in that case. So here's what I came up with for my module:

2 comments · Read more
aaron's picture

Media Code Sprint: Status Report One

As announced, we've begun the Media Code Sprint to put better media handling into Drupal core!

It's been a great time so far. In the morning, drewish compiled a file function guessing game (free beer!), and andreiashu took the bait and completed the first round with great feedback about how unusable the current state is.

Next, we've sat down and begun writing SimpleTests for the hook_file patch. This has been great fun for me personally; though drewish is an old hand at building tests, this is completely new for me. And to top it off, webchick, Queen of Drupal testing, dropped by our table and got involved!

Even the process of writing tests has been helpful; we found at least one case for validation that had been missed in the original patch, and drewish decided that file_scan_directory needed refactoring. (He's currently chasing other problems as well, and cursing about finding himself going down rabbit holes.)

There's more fun to be had for all! If you want a quick 15 minute task that everyone is qualified to do, go play the File API Function Guessing Game. If you want to do more, then ping me (aaronwinborn), drewish, or dopry at #drupal in IRC, or leave a comment here!

(Cross-posted at AaronWinborn.com.)

Login to post comments
aaron's picture

SimpleTests for FileAPI

We're running SimpleTests on various core modules, to get a baseline of what is fine, and what breaks with the hook_file patch.

I'm going to comment to this thread with results. The first run is on a clean installation of the build of Drupal 7.x-dev, Last updated: July 24, 2008 - 08:03.

Tests to run:

blog api
simpletest
system
upload
user
cache

3 comments
boombatower's picture

Getting Involved in SimpleTest

Now that SimpleTest is apart of Drupal core issues related to the 7.x development have been moved to the core issue queue. If you would like to be involved I have included two links which will filter the issues to only display SimpleTest related issue. You can obviously used the advanced search feature to narrow your results to the SimpleTest related components instead of using the links.

Login to post comments · Read more
angeliti's picture

Correct simpletest syntax for adding tags to a story/page form?

Hello everyone!

I'm having problems when trying to add tags to the story/page creation form using simpletest.

I have a vocabulary which uses FREE TAGGING, and I want create a new page with the tag "cat". The vid of the vocabulary is stored in the class attribute 'free_tagging_voc'. What I've been trying to do is the following:

$edit = array();
$edit['title'] = $this->randomName(10);
$edit['body'] = '';
$edit['taxonomy']['tags'][$this->free_tagging_voc] = 'cat';
$this->drupalPostRequest('node/add/page', $edit, 'Submit');

2 comments · Read more
Syndicate content