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.
| Comment | File | Size | Author |
|---|---|---|---|
| #20 | 445950-simpletest-cleanup.patch | 27.05 KB | boombatower |
| #17 | 445950-simpletest-cleanup.patch | 26.6 KB | boombatower |
| #15 | 445950-simpletest-filter.png | 11.38 KB | boombatower |
| #13 | 445950-simpletest-cleanup.patch | 26.59 KB | boombatower |
| #11 | 445950-simpletest-cleanup.patch | 26.46 KB | boombatower |
Comments
Comment #1
boombatower commentedFilter interface

Comment #2
boombatower commentedI seem to have rolled patch during some interesting CVS changes...
Comment #3
boombatower commentedComment #4
boombatower commentedComment #5
boombatower commentedTypo, and incorrect array key.
Comment #7
boombatower commentedWould be a good idea to update simpletest.test.
Comment #8
dries commentedThe 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.
Comment #9
yched commentedMinor: 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() ?
Comment #10
boombatower commented#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:
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.Comment #11
boombatower commentedHow 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.
Comment #12
yched commentedHm 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.
Comment #13
boombatower commentedI see...changed.
Comment #14
dries commentedThis 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! :)
Comment #15
boombatower commentedTo make it easier for people to review the labels on the interface I have included a full screenshot of the test results page.
Comment #16
boombatower commentedMoved 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.
Comment #17
boombatower commentedpatch would be helpful.
Comment #18
chx commentedYup. 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 :)
Comment #19
yched commentedSorry for being a painful nitpicker, but the
'redirect' => 'admin/development/testing',line in simpletest_run_tests() should go.Comment #20
boombatower commentedGood catch.
Comment #21
dries commentedThanks -- let's go with this and refine from there. Committed.
Comment #22
catchTest bot is broken. Looks like simpletest.page.inc didn't get committed along with the rest of the patch.
Comment #23
catchComment #24
webchickCommitted that hunk to HEAD. Thanks, catch!
Comment #25
webchickComment #26
webchickSorry. :P Think I'm done now. ;P
Comment #27
boombatower commentedYea!