A feature to allow simpletest authors to quickly and easily run one single test via drush while authoring that test was not welcome in the drush package. It may be appropriate and welcome in other packages, such as devel or simpletest.

Would the feature be welcome here?

Sorry I didn't just move that issue node to this project — the issue has been hijacked for a different feature.

CommentFileSizeAuthor
#1 drush-one-test.patch3.4 KBBevan

Comments

Bevan’s picture

StatusFileSize
new3.4 KB

I started updating the patch from #580530: Command to run simpletests for Drupal 7 and Drush 3, but kept getting the following error. The attached patch is where I got to.

pb@Ruapehu.local:~/Sites/seven
> drush -v test DBLog
Initialized Drupal 7.0-dev root directory at /Users/pb/Sites/seven                                              [notice]
Initialized Drupal site default at sites/default                                                                [notice]
DBLogTestCase
WD system: user module installed.                                                                                 [info]
WD system: user module enabled.                                                                                   [info]
WD system: node module installed.                                                                                 [info]
WD system: node module enabled.                                                                                   [info]
WD system: filter module installed.                                                                               [info]
WD system: filter module enabled.                                                                                 [info]
WD system: text module installed.                                                                                 [info]
WD system: text module enabled.                                                                                   [info]
WD system: options module installed.                                                                              [info]
WD system: options module enabled.                                                                                [info]
WD system: number module installed.                                                                               [info]
WD system: number module enabled.                                                                                 [info]
WD system: list module installed.                                                                                 [info]
WD system: list module enabled.                                                                                   [info]
WD system: field_sql_storage module installed.                                                                    [info]
WD system: field_sql_storage module enabled.                                                                      [info]
WD system: field module installed.                                                                                [info]
WD system: field module enabled.                                                                                  [info]
WD system: block module installed.                                                                                [info]
WD system: block module enabled.                                                                                  [info]
WD system: color module installed.                                                                                [info]
WD system: color module enabled.                                                                                  [info]
WD system: comment module installed.                                                                              [info]
WD system: comment module enabled.                                                                                [info]
WD system: contextual module installed.                                                                           [info]
WD system: contextual module enabled.                                                                             [info]
WD system: dashboard module installed.                                                                            [info]
WD system: dashboard module enabled.                                                                              [info]
WD system: help module installed.                                                                                 [info]
WD system: help module enabled.                                                                                   [info]
WD system: image module installed.                                                                                [info]
WD system: image module enabled.                                                                                  [info]
WD system: menu module installed.                                                                                 [info]
WD system: menu module enabled.                                                                                   [info]
WD system: path module installed.                                                                                 [info]
WD system: path module enabled.                                                                                   [info]
WD system: taxonomy module installed.                                                                             [info]
WD system: taxonomy module enabled.                                                                               [info]
WD system: dblog module installed.                                                                                [info]
WD system: dblog module enabled.                                                                                  [info]
WD system: search module installed.                                                                               [info]
WD system: search module enabled.                                                                                 [info]
WD system: shortcut module installed.                                                                             [info]
WD system: shortcut module enabled.                                                                               [info]
WD system: toolbar module installed.                                                                              [info]
WD system: toolbar module enabled.                                                                                [info]
WD system: overlay module installed.                                                                              [info]
WD system: overlay module enabled.                                                                                [info]
WD system: field_ui module installed.                                                                             [info]
WD system: field_ui module enabled.                                                                               [info]
WD system: file module installed.                                                                                 [info]
WD system: file module enabled.                                                                                   [info]
WD system: rdf module installed.                                                                                  [info]
WD system: rdf module enabled.                                                                                    [info]
WD field: Updating field type text with module text.                                                            [notice]
WD field: Updating field type text_long with module text.                                                       [notice]
WD field: Updating field type text_with_summary with module text.                                               [notice]
WD field: Updating field type number_integer with module number.                                                [notice]
WD field: Updating field type number_decimal with module number.                                                [notice]
WD field: Updating field type number_float with module number.                                                  [notice]
WD field: Updating field type list with module list.                                                            [notice]
WD field: Updating field type list_boolean with module list.                                                    [notice]
WD field: Updating field type list_number with module list.                                                     [notice]
WD field: Updating field type list_text with module list.                                                       [notice]
WD field: Updating field storage field_sql_storage with module field_sql_storage.                               [notice]
WD field: Updating field type image with module image.                                                          [notice]
WD field: Updating field type taxonomy_term_reference with module taxonomy.                                     [notice]
WD field: Updating field type file with module file.                                                            [notice]
WD system: poll module installed.                                                                                 [info]
WD system: poll module enabled.                                                                                   [info]
WD php: FieldException: Attempt to create an instance of a field comment_body that doesn't exist or is       [error]
currently inactive. in field_create_instance() (line 650 of
/Users/pb/Sites/seven/modules/field/field.crud.inc).
FieldException: Attempt to create an instance of a field comment_body that doesn't exist or is currently inactive. in field_create_instance() (line 650 of /Users/pb/Sites/seven/modules/field/field.crud.inc).
Drush command could not be completed.                                                                        [error]

moshe weitzman’s picture

Status: Active » Closed (won't fix)

Thanks for being persistent with this. I've thought it over, but I don't really want this in devel either. I'm hoping that we get some traction in that drush issue.

moshe weitzman’s picture

Thanks for being persistent with this. I've thought it over, but I don't really want this in devel either. I'm hoping that we get some traction in that drush issue.

Bevan’s picture

Project: Devel » SimpleTest
Version: 7.x-1.x-dev » 7.x-2.x-dev
Component: devel » Code
Status: Closed (won't fix) » Active

Moshe, I think you still do not agree with me that these are two separate feature requests:

This one is intended for simpletest-authors so they can execute they test they are authoring and test the test. The other issue started out for the same feature, but then became about running all simpletests. These are unrelated features that do not depend on each other and are only mildly related; they have different uses and intended audiences.

I really don't want to create a module just for this drush command. Perhaps simpletest module will take it?

boombatower’s picture

Assume this needs to be adapted for simpletest then?

Bevan’s picture

Status: Active » Needs work

boombatower; Yes. Adapting it is more or less just s/drush/simpletest/ and s/test/one. Would you accept this feature?

boombatower’s picture

Seems like a logical addition, yes.

Bevan’s picture

Assigned: Unassigned » Bevan

Great! I'll work on this, on Monday with some luck.

Bevan’s picture

Assigned: Bevan » Unassigned

Last week didn't work out — my hard drive failed. I'm not sure when I'll get to this.

langworthy’s picture

regarding #4: #580530: Command to run simpletests did not turn into a discussion about running all simpletests. The projects in both #6 and #17 of that issue include options to run a single simpletest using drush. This seems to be the goal here as well.

The goal seems to be a drush command that runs tests. Do we need multiple drush commands that will print all passes and fails to the screen and also exit properly for automation tools?

Edit:// can't we still work together on this?

Bevan’s picture

I would love to be able to collaborate on this. I've implemented the single-test twice already for each of devel and drush modules and the feature was rejected in both issue queues because it was not a desirable feature to be able to run a single test.

langworthy’s picture

I believe all that is missing from the single-test functionality that has been implemented in one of the projects that drush would like to accept (yhahn's test.drush.inc) is output of each assertion. I think this could be accomplished with a flag.

On a separate but related to this issue note: I believe the errors encountered in the description of this issue are because the standard profile was being tested. I have opened up an issue regarding this. #974768: test-run command fails using standard install profile

kenorb’s picture

It's possible to have 'test' command for Simpletest 6.x ?

langworthy’s picture

drush test-run should work for 6.x and you may have luck with the run-tests.sh that comes with Simpletest.

kenorb’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)

Drupal 6 is no longer officially supported. If you think this issue is still relevant for 8.x, feel free to re-open.