Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
simpletest.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 May 2008 at 03:09 UTC
Updated:
7 Aug 2008 at 07:22 UTC
Jump to comment: Most recent file
Comments
Comment #1
dries commentedThe script is not intended to run from the browser. I think we should update the docs.
When in Paris, we didn't manage to fix all bugs with this script. It needs some more TLC. When I run the script from my command line, I get
Test cases run: 42/42, Passes: 2127, Failures: 2744, Exceptions: 324. I haven't investigated the problem yet, but it seems like it isn't smart enough about checking whether it run/configured properlyI'd like to fix this (or see it fixed) so I can run the script automatically as part of my commits. Right now that isn't possible yet.
Comment #2
dries commentedAnother example of why it needs TLC -- I does funny things like:
The output could also be improved. You don't see what tests are running and/or failing.
Incremental improvements are welcome.
Comment #3
dries commentedSee http://drupal.org/node/252920#comment-831489 for more recommendations.
Comment #4
pwolanin commentedthis patch is still a work in progress, but starting to add help and other options.
Comment #5
dries commentedLooks like a great start. :)
Comment #6
pwolanin commentedwith help from cwgordon7, tracked down the reason tests were failing: I'm running drupal in a subdirectory, so either $base_url needs to be set, or I need the --url parameter. e.g. I need to run it like:
$php scripts/run-functional-tests.sh --url http://127.0.0.1/drupal-7 ProfileLots of other improvements in the attached patch, in addition to the added help text which now points out the above concern.
Comment #7
pwolanin commentedComment #8
dries commentedI had a close look at this and it looks like an excellent start. After spending 50 minutes on this patch, I've decided to commit it "as is". I get identical test results when running all tests from the command line, or when running all tests from within the browser, and the code looks good -- minus some indentation issues that I fixed myself.
That said, I'm setting this back to 'code needs work' as there might be room for improvement. It sounds as if you have additional plans for it.
This script is important for me as it has the potential of drastically helping me test and review patches. I'm confident that it will help many others as well. Keep up the great work.
Comment #9
pwolanin commented@Dries - thanks for putting it in - took several hours last night to get it to that point.
My motivation was the same yours - to be able to more readily run some or all of the tests without the browser timing out. I have no major additional plans at this point (except possible code cleanup/refactoring to improve logical flow), but I will poll the testing folks to see if there is any missing functionality.
Comment #10
pwolanin commentedone thing that needs to be checked better is the case when the group name includes a space. I think you'll need quotes. I guess that may also depend on your shell, however.
Comment #11
boombatower commentedI think being able to list all the tests that can be run would be useful.
Cleaned up spacing on help text.
Comment #12
pwolanin commentedSeems like we are accessing a private variable there?
Comment #13
pwolanin commentedIn any case, the list functionality is a very good idea. Re-rolled using the public method, minor other text changes.
Comment #14
boombatower commentedAh...yes...good eye.
I think we both agree on this patch so we can say one of us reviewed it. :)
Comment #15
dries commentedI've committed the latest patch. We still need to better check cases where the group name includes a space. Therefore, I'm putting this back at 'code needs work' instead of 'fixed'. Thanks all.
Comment #16
boombatower commentedI have a number of things I would like to improve once #274794: Fix run_tests and make it multi-threaded makes it in allowing the script to actually run with new Batch API stuff.
Comment #17
boombatower commentedThis patch adds color with an optional parameter
--colorand formats the output to a 80 character max to fit the default console width.Comment #18
boombatower commentedThis patch includes coloring of summary messages, message output clean up, and
--verboseparameter to suppress all the assertion output if not specified.Edit: The coloring on summary messages doesn't work with
--alllooking into.Comment #19
boombatower commentedThis now works will
--all.Comment #20
boombatower commentedWorking on a complete cleanup.
Comment #21
boombatower commentedThis is a massive code and comment cleanup over the previous script.
The code has been split up into functions that allow for the logic to be condensed and more easily read and understood.
I have added the following features:
--colorargument to display results with color highlighting.--verbosedisplay detailed assertion messages.Things that still need to be improvement:
Due to the fact that the script is basically completely re-organized and sections re-written I have included and copy of the script as well as a patch.
Comment #22
dries commentedThis looks good and is a small but important improvement to the script. Both failures and exceptions show in red though, so I think there might be something wrong with the exception detection logic and/or the coloring. I didn't get to see any brown lines. Otherwise looks great!
Comment #23
boombatower commentedI see brown for notices.
The summary messages are displayed in either green or red just like the web interface. The individual assertions are displayed in either green, red, or brown.
Comment #24
dries commentedAh, you're right. After reviewing the code, I was also expecting the summary lines to be brown. My wrong.
Comment #25
dries commentedCommitted to CVS HEAD. Thanks.
Comment #26
damien tournoud commentedI had no time to comment on that before it was committed, but I think this is a very good job, boombatower. We are one step closer to awesomeness!
Comment #27
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #28
damien tournoud commentedReopening, because that patch has not been tested with parallel execution before being committed, and broke everything badly.
Here is a fix. At the same time, I also add a meaningful error message when the user try to use concurrency while the required extension is not available.
Comment #29
boombatower commentedSuppose that should have been looked at, I don't run dual core so didn't think about it.
Comment #30
dries commentedCommitted to CVS HEAD. Thanks Damien.
Comment #31
damien tournoud commented@boombatower: no problem, error handling was bad anyway, so you couldn't have known.
Comment #32
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.