Polish the crap out of SimpleTest module

webchick - January 21, 2008 - 00:14
Project:SimpleTest
Version:7.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:webchick
Status:closed
Description

If we want to use this as a required tool for the D7 release cycle (which I think we ought to), then we need the code in both the module and the tests themselves clean enough that you could eat off of them. Our goal should be nothing less than core-worthy code (even though obviously we don't want to make this module part of core ;)).

This is going to be my #1 priority for the next while: coding standards compliance, bountiful comments, consistency, and so on. I want to make it as simple as possible for a new developer who's never heard of SimpleTest to dig in and start being productive.

I apologize in advance for the forthcoming pedantic patches that will be coming, which include:

  • It's "SimpleTest," not "Simpletest" or "simpletest".
  • We need clearer, more detailed, and corrected/updated documentation pretty much everywhere.
  • Coding standards compliance for both SimpleTest module and all tests.

#1

Rok Žlender - January 28, 2008 - 08:34

+10 :) you will have to watch me, my eyes usually don't notice the diff between "". or "" . and stuff like that. Can we even tweak coder module to scan .test files.

#2

vladimir.dolgopolov - March 5, 2008 - 11:55

My 10 cents for new deweloper's sake:

I suggest to add more helper methods in SimpleTest for common uses cases.

I suggest add a parameter to this (and existed) methods to avoid a lots of asserts' output messages. If I test only page creation I wish to hide messages of sucessful user login and so on.

PS. SimpleTest is awesome

#3

cwgordon7 - March 6, 2008 - 19:24

+11 :) Perhaps run the whole thing through coder format?

#4

cwgordon7 - March 7, 2008 - 16:54

Initial code style patch

AttachmentSize
simpletest_code_style.patch216.94 KB

#5

KentBye - March 7, 2008 - 19:41

Boombatower and I were looking at this during the code sprint, and created a sub-issue related to this for finding a consistent naming convention for the *.test files: http://drupal.org/node/231348

#6

catch - March 9, 2008 - 23:26
Status:active» patch (code needs review)

#7

boombatower - March 10, 2008 - 00:31

Do we want comment blocks for the file that contain test description and author?

#8

cwgordon7 - March 10, 2008 - 01:20

I just removed them to standardize things. But I also think it is not good practice to credit yourself after you write a simpletest.

#9

catch - March 10, 2008 - 12:34

We should see tests being created as patches to core soon, so credits will probably happen via the commit log. Nice to have a description of the test somewhere though.

#10

boombatower - March 14, 2008 - 23:37

After reviewing community ideas and talking with chx and Rok Žlender we have agreed upon the last convention and I have written a script to correctly name the tests.

I started a discussion about coding standards and group convention.

#11

boombatower - March 15, 2008 - 21:33

Changed project name from Simpletest to SimpleTest.

#12

boombatower - March 23, 2008 - 03:43

Performed general cleanup of SimpleTest module files: #107173.
Tests: #107174.

#13

boombatower - March 24, 2008 - 03:37

Committed several other cleanup related to coding standards which are documented there.

#14

boombatower - March 24, 2008 - 03:43

As I see it we only have to things left.

1) Get coding standards into Coder Module
2) Clean up documentaion

#15

birdmanx35 - March 26, 2008 - 23:26

I'm working on the second now.

#16

boombatower - April 4, 2008 - 23:08

Changed module name in .info file to "SimpleTest instead of "SimpleTest Module" and updated description.

#17

boombatower - April 8, 2008 - 00:57

Fixed more naming issues is simpletest.module simpletest_menu().

http://drupal.org/cvs?commit=109535

#18

boombatower - April 9, 2008 - 20:56

Added un-install hook to remove variables.

http://drupal.org/cvs?commit=109886

#19

boombatower - April 13, 2008 - 03:07
Version:6.x-1.x-dev» 7.x-1.x-dev

Since I seem to keep forgetting to change the version.

#20

boombatower - May 15, 2008 - 01:11
Status:patch (code needs review)» fixed

This has been completed and will stand as a record.

#21

Anonymous (not verified) - May 29, 2008 - 01:22
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.