Posted by boombatower on April 27, 2009 at 8:37am
| Project: | Drupal core |
| Version: | 7.x-dev |
| Component: | simpletest.module |
| Category: | task |
| Priority: | normal |
| Assigned: | boombatower |
| Status: | closed (fixed) |
Issue Summary
A while back I worked on a large patch that cleaned up the code under the hood and some interface elements, #250047: Rework the SimpleTest results interface and clean-up of backend code.
The code died as I kept having to split it up and split it up due to original size. The issue has basically died. I started over and just focused on the interface and backend code (ignoring the rewrite of results display). All of which should be done in the same patch.
Items accomplished:
- Separate test selection form from results display (both interface and code).
- Get rid of
$_SESSION['test_id']. - Allow the test_id to be specified when viewing results, thus making it possible to display older test results that may be left by setting
simpletest_clear_resultsto false. - Clean up results display a bit.
- Add a filter to provide a "smarter" re-run interface.
- Begin seperating interface code from SimpleTest API code. Eventually I would like run-tests.sh and the web runner to share test running API wither there respective interfaces completely separate from the running code.
- General clean-up of test selection form and results display code. (You can actually read it!!)
- DBTNG results query and provide API function.
I plan to work on further clean-up patches to truly desperate out the interface and API and eventually integrate the API with run-tests.sh.
Comments
#1
Filter interface

#2
I seem to have rolled patch during some interesting CVS changes...
#3
#4
#5
Typo, and incorrect array key.
#6
The last submitted patch failed testing.
#7
Would be a good idea to update simpletest.test.
#8
The filter interface confuses me, to be honest -- and I'm an expert user running the tests x times a day. I think the labels need work. Maybe something like: "Re-run the following tests"? It is more verbose but it is much clearer.
#9
Minor: maybe it's intentional, but it seems you should change the $batch['redirect'] property in simpletest_run_tests() rather than adding a drupal_goto() in _simpletest_batch_finished() ?
#10
#8: The filter is used to "filter" the selected tests to re-run. So if you select "Fail" then it runs all the selected tests that failed, or "Pass" passed, etc.
How about just "Re-run" as the other text is rather long.
#9: adding:
<?php'redirect' => 'admin/development/testing/results/' . $test_id,
?>
in
simpletest_run_tests()does not work and there is no$batchvariable to reference in_simpletest_batch_finished(). I am not sure what you are referring to.#11
How about leave "Filter" but change the button text to "Run tests" link on the previous screen.
I think most people, especially developers, will know what "filter" means and with "Run tests" (same as on other screen) there should be enough to clarify what you are filtering.
#12
Hm sorry, I got confused by that $batch['redirect'] property set in simpletest_run_tests(). It is indeed an internal property, written in batch_process().
Usually the $form_state['redirect'] property is used to determine the batch redirect page. Since simpletest skips FAPI's automatic batch_process(), the redirect url has to be passed as the 1st param of the explicit batch_process() call in simpletest_run_tests(). The line that sets 'redirect' can go away.
#13
I see...changed.
#14
This patch looks good to me -- although it is hard to review when you move things to a new file. If other people thing the labels are good, I'll commit this. Should be ready! :)
#15
To make it easier for people to review the labels on the interface I have included a full screenshot of the test results page.
#16
Moved actions above results upon the suggestion from chx. When failed results are displayed it will be hard to find the actions as confirmed by Fitts's law.
#17
patch would be helpful.
#18
Yup. The top of the screen is much easier to find :) So we want actions there. I would say it's fairly uncommon to run tests once anyways so even for passed tests it's more likely we want to run again. Rerunning failed tests only is a dream :)
#19
Sorry for being a painful nitpicker, but the
'redirect' => 'admin/development/testing',line in simpletest_run_tests() should go.#20
Good catch.
#21
Thanks -- let's go with this and refine from there. Committed.
#22
Test bot is broken. Looks like simpletest.page.inc didn't get committed along with the rest of the patch.
#23
#24
Committed that hunk to HEAD. Thanks, catch!
#25
#26
Sorry. :P Think I'm done now. ;P
#27
Yea!
#28
Automatically closed -- issue fixed for 2 weeks with no activity.