Closed (won't fix)
Project:
Drupal core
Version:
7.x-dev
Component:
simpletest.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
5 Mar 2008 at 14:56 UTC
Updated:
9 Jul 2009 at 00:14 UTC
Jump to comment: Most recent file
Comments
Comment #1
moshe weitzman commentedThats a brilliant idea. I'll be so bold as to mark it a critical feature.
Comment #2
boombatower commentedI'll mention it again. You can just press the refresh button and then press enter to re-submit post data thus running the test(s) again.
I see that the urls are pretty and all, but by no means critical. The only thing they do is eliminate one button press of two.
Comment #3
moshe weitzman commentedeliminating a button click or two is an important goal. testing needs all the grease it can get in order to catch on.
anyway, with urls you can have 3 windows with 3 tests open at once and just refresh whichever one you want without resorting to the mouse. pressing buttons is harder.
Comment #4
starbow commentedI see this one as the difference between possible to use and pleasant to use.
Comment #5
boombatower commentedThat is fine, so someone needs to write a patch.
@moshe weitzman: You don't have to use the mouse at all.
Meaning in most browsers you press F5 or ctrl + r and then hit enter. I can do this in less than a second.
Comment #6
boombatower commentedIf this is a necessary feature will someone write a patch.
Since an easy workout around has been stated I will mark this minor.
Comment #7
starbow commented@boombatower - the "patch (code needs work)" status signifies that there is an existing patch, and that there are specific issues with that patch. Since there is no patch as of yet, the correct status is "active".
Comment #8
soxofaan commented
The advantage of URL's is that you can bookmark them, put them in your menu, put them in custom blocks, whatever,
which is much handier than going through a form and struggling with POST data.
(The lower the barrier to use SimpleTest, the better IMHO, that's why I changed priority to normal.)
Anyway, here is a patch (for 6.x-1.x-dev).
It adds a overview page under the
admin/reports/simpletest(I think this is a better place than the currentadmin/build/simpletest), see screenshotThe URL's on that page link to things like
admin/reports/simpletest/run/FooTestfor running single tests andadmin/reports/simpletest/run/FooTest,BarTestfor running multiple tests.It's still a bit in proof of concept phase, so feedback and ideas are welcome
Comment #9
boombatower commentedSince the plan is to back-port the new 7.x UI this will no longer apply in terms of the modified UI. The URL concept could still be applied, but you can also run tests from command line.
I think this should be written for 7.x and then back-ported if written at all. I still don't see it as very useful.
Comment #10
soxofaan commentedHere is a first try of porting the patch from #8 to Drupal 7.x-dev. It's a basic version with still room for some jquery juice and other UI tweaks.
Note: This patch adds an testing overview page in the admin > reports section. (The original testing page is in admin > build.)
As this UI it's not directly intended to replace the existing UI, I decided to put it there for now. This is up for debate of course.
In defense for its usefulness: as a contrib module developer/maintainer who tries to use simpletest in the dev-cycle, I prefer a "bookmarkable" testing callback above a clicky-clicky-form ;)
Comment #11
dries commentedI think this would be valuable. As we now have a simpletest.test (SimpleTests for SimpleTest), we'll want to write a test case for this?
Looking at the patch, it looks like this would create a different entry point for testing? Wouldn't it make sense to group everything a bit? I think we'll want to brainstorm a bit more about where these links should show up. I'd be inclined to say that they should show be used on the current test page.
Comment #12
soxofaan commentedIndeed, the menu path for this is open for debate. The patch of #10 is mainly a proof of concept.
Actually, I tried to ignite a discussion on where to put the simpletest menu items in #263616: Move SimpleTest out of "Site building"
Comment #13
boombatower commentedCould add a column to the current UI table and see what that looks like.
Comment #14
dries commentedsoxofaan: I think everything should be under one menu item. By definition, that means that this patch needs work. ;-)
Comment #15
boombatower commentedThis is a somewhat different approach and doesn't come with an interface to provide links since that seems to be the most disputed. This can get committed while we decide how we want to display the links, if we do.
I think this is a good approach and will allow for the form validation already written to be used.
Comment #16
soxofaan commentedabout the patch from #15: isn't it overly complicated to pipe everything trough form processing (building a $form_state, calling drupal_execute()), when you just need to call one simple function (simpletest_run_tests($test_classes))?
And what do you mean with the 'form validation already written'? I can't find any validation handlers for the simpletest_overview_form form.
Comment #17
boombatower commentedMeaning it won't try to run a test case that doesn't exist. That is because the form API deals with that based on the form that was generated.
Comment #18
Susurrus commentedThis patch no longer applies cleanly and I can't seem to get it to work.
The Batch API-ed version of SimpleTest is now in use, so this probably needs to be modified slightly to account for that.
Also, given that there's no UI, there should be documentation on what "name" should be passed as the URL. For people not familiar with the internals of SimpleTest (like me), there's no way to use this feature as of now without knowing what a name is. Is it the name of the class of tests you want to run?
Comment #19
Susurrus commentedSo here's an updated version of the patch. It works for URLs that are /admin/build/testing/run/FULL_TEST_CLASS_NAME. FULL_TEST_CLASS_NAME are the full names of the test classes you wish to run, comma-separated. You can also use 'all' here to run all tests.
I wouldn't mind actually seeing the results page separated from the test-selection page. So the first page you select your tests. That forwards you to the results page. Now the results page is either the URL that is currently being used for tests in this patch (/admin/build/testing/run/FULL_TEST_CLASS_NAME) or it displays a bookmarking link like when you use advanced search. There would also be a link back to select different tests.
I think this offers a few advantages over the current system as I believe users don't change the tests they're running that much. I know I don't, but I'm not a major core hacker. It exposes the URL for running individual tests to users without a heavy UI burden. It also simplifies the UI on the testing page, as when they're results and Drupal messages as well as this huge multi-checkbox form, the interface looks incredibly cluttered.
Comment #20
lilou commentedReroll patch against HEAD with change in description menu link.
* Work this a single test via URL
admin/build/testing/run/BlockTestCase* White screen with multiple tests via URL
admin/build/testing/run/HelpTestCase,TrackerTest* Not tested with
admin/build/testing/run/allURL.Comment #21
lilou commentedComment #22
soxofaan commentedas a remainder: note that this issue depends on #263616: Move SimpleTest out of "Site building" as already noted in #12
the simpletest menu items will move from
admin/build/testing/to simething likeadmin/development/testingComment #23
lilou commented#263616 is postponed.
Comment #24
boombatower commentedIt is waiting on another issue: #296693: Restrict access to empty top level administration pages
Comment #25
boombatower commentedSeems like with the new interface and such this is not as relevant, and has completely list interest.
Please re-open if new patch and interest.