Updated: Comment #19

Problem/Motivation

Simple test has nothing to do with site configuration, it's purely a health check for modules/patches.

Proposed resolution

"admin/config/development/testing" and related paths would live more comfortably under "admin/reports" ,rather than "admin/config".
It should be straightforward to roll a patch against hook_menu() in simpletest_menu() so I've tagged this as a Novice issue.

Remaining tasks

Reviews needed.

User interface changes

None.

API changes

None.

Original report by thedavidmeister

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bartmcpherson’s picture

Status: Active » Needs review
FileSize
11.59 KB

Novice attempt at rolling the patch.

thedavidmeister’s picture

Status: Needs review » Reviewed & tested by the community

Patch applied cleanly for me and did exactly what I expected. Thanks, hopefully this gets committed before code freeze..

swentel’s picture

It is a development tool, so I moving it away from me doesn't make sense to me. Just my 2 cents.

thedavidmeister’s picture

Are reports required not to aid in development?

The point I'm making is that there's just no "configuration" in simple test, unless there's something massive I'm missing.

swentel’s picture

Well, it has a settings page, agreed, not a big and interesting one of course hehe.
Reports has pages like statistics too, they're not interesting for development imo. Anyway, it feels natural for me to be under development, but I won't make a big deal if it moves :)

thedavidmeister’s picture

Status: Reviewed & tested by the community » Needs review

Hmm, to me it seems like the output you get from "Testing" when you run the tests is conceptually very similar to the output you'd get from "Status report" except that you're checking the "status" of your code base rather than the "status" of your server environment.

The only configuration simple test provides is for configuring the way the test themselves are run. All other modules under "Configuration" provide configuration that modifies the behaviour of the site in some way.

Enabling the module provides no extra functionality of the site outside of those pages, does not modify how anything in the site behaves and when you run tests it doesn't even run them on the current site's database as it creates all of it's own temporary tables to figure out what's working and what isn't.

I'd totally agree with what you're saying if "Development" was a top level menu item but "Development" is a sub-menu of "Configuration", so for something to be in that menu it should be mainly related to both configuring the behaviour of the site and also development.

TBH, I wouldn't even be opposed to "Development" actually being a top level menu item and having testing living under that, since "Development" is not "Configuration" - The stuff there at the moment seems to be much more related "state" rather than "config" using the new terminology. It took me quite a while to figure out how to clear the cache since the menu structure changed..

swentel’s picture

TBH, I wouldn't even be opposed to "Development" actually being a top level menu item.

That would make a lot of sense to me too.

thedavidmeister’s picture

I'm opening a ticket for that now.. I'll link it here.

thedavidmeister’s picture

Actually, as I try to articulate myself in this other ticket I'm changing my mind back to what I said in #6.

The current menu items (other than Testing) that I know about there are:

- Performance: Aside from the "clear caches" button, there is only configuration around the cache setup that quite directly impacts the site's behaviour
- Logging and Errors: This is not the place to see the logs or errors, it's only configuration related to how errors and other messages should be logged
- Maintenance Mode: The configuration here pretty clearly modifies the way the site behaves
- Synchronize configuration: I believe this is the main UI for the new configuration management system in D8 so it's arguably the most "Configuration" worthy menu item in all of Drupal

So, all of these menu items actually *do* satisfy the criteria of being both mainly to do with the configuration of the site's behaviour as a whole and useful primarily only for developers.

thedavidmeister’s picture

Status: Needs review » Reviewed & tested by the community
xjm’s picture

I think this might need more discussion. You are going to befuddle a lot of developers with this change.

webchick’s picture

Status: Reviewed & tested by the community » Needs review

Yeah, I'm not sure about this, personally. Reports says to me "read only" and there's quite a bit of interactivity with the SimpleTest-related things. I also think it's odd to take such a developer-focused menu and move it away from the "Developer" sub-section in Configuration.

Let's get some of the UX team to chime in.

Bojhan’s picture

The question is what kind of task it is, to me its in the same mental space as configuring/developing your site. While semantically you could argue its a report, in use it doesn't really stand close to static report pages.

The space that people look for this kind of functionality is the Development category, just like devel, performance etc. I don't think it makes much sense in reports - even though semantically it could be correct. It's more about task flow, than it is about semantics - and the task flow leads you to this category, as its where you go to interact with configuring/running development tasks.

Honestly, I think the whole reports section is a little wierd :) But that's just my point of view.

thedavidmeister’s picture

The menu system *should* be a hierarchy, and it also *should* be semantically correct. The reason I opened this ticket is because I couldn't find it myself because I was looking for it in reports, based on traversing the menu tree, assuming it would be a semantically correct hierarchy but that was the wrong thing to do, apparently :P

I should have expanded *all* the menu items then found the one that was most relevant to what I was doing because the hierarchy is just an illusion/trap for young players.

The space that people look for this kind of functionality is the Development category, just like devel, performance etc

For a start "the space that people look for X" is a massive over generalisation.

Devel and performance are not just "Development", they're both "Configuration" and "Development".

What you're saying comes across to me like saying "If we have a menu structure Fruits -> Red and we have a Firetruck, it should go under Red, along with the other red things, but it shouldn't go under Vehicles because the other items in vehicles are totally different vehicles that have nothing to do with fighting fires, they're for personal transport".

I feel like if there was a "Development" sub-item in Reports and that would satisfy all your concerns, we could also put watchdog logs there.

xjm’s picture

Regarding #14, I think you're being overly concerned with semantics, both in your argument and in making it. As a developer, I know that I look for the stuff that I need to do all the time when developing under development. This incudes synching my configuration, running and debugging automated tests, clearing and configuring my caches, etc. Nothing among it is remotely a report. Moving one item out of there is silly and would annoy me, as a developer in the tiny tiny minority of Drupal users who actually enable the testing module and in fact use it constantly.

99.9% of site builders will never see this module, because the only people who use it are developers. For the same reason, we should not clutter the top level of the IA with "Development."

xjm’s picture

Finally, to me, SimpleTest results aren't a report. They're an interactive debugging tool. :)

thedavidmeister’s picture

They aren't interactive... Somebody needs to tell me how they're interactive or make a screencast or something. I think I'm missing something massive here, some secret functionality of SimpleTest that everyone else sees that I don't. AFAIK SimpleTest tests *are* read-only, so webchick's comment in #12 should be a point for moving it, not against..

I dunno about you guys but when I debug using SimpleTest the interactive part is all happening inside my text editor and there's no menu item for Sublime.

For me, all I can see is a report in the form of green, yellow and red lines of text on whether the current codebase I've checked out of git or modified does the kinds of things that the pre-written tests expect them to.

Assuming SimpleTest *is* a reporting tool, I think the other points against are so far a bit beside the point imo :/

If you want SimpleTest to be next to things in a "flow" I don't understand why putting SimpleTest next to Performance or Syncing Configuration helps anything since the tests run by SimpleTest are run in a new instance of a site with a fresh database - clearing the cache doesn't even do anything to the tests. It's already badly optimised, what I'm proposing isn't any worse. Really for that, we could make two menus, "Administration" and "Development" and they can have (some of) the same items in them but they could be re-ordered for different use-cases - with the "Development" one enabled by default for uid 1 and "Administration" for everyone else.

If you're a developer who is comfortable with the complexity of the Drupal system itself but not finding your way around a hierarchy, I think that's odd but you should definitely try this module out http://drupal.org/project/coffee (I know it saved my life).

If you're a developer who doesn't want to spend some time forming new habits then upgrading to D8 is going to be hard :P

If it's definitely not a reporting tool then I'm sorry guys, I'm obviously crazy and my initial assertion that "SimpleTest has nothing to do with site configuration" is just plain wrong. Thanks to bartmcpherson for rolling a patch as a novice, fwiw it works and applied cleanly so you did everything right :)

msonnabaum’s picture

Title: Simple test menu items should be under "Reports", not "Configuration" » Simple test menu items shouldn't be under "Configuration"

I was just about to file a similar issue as I always find it confusing that "Testing" is under configuration.

Testing is not configuration in any sense. It's also not a report.

I wouldn't mind it creating another top level menu item since it doesn't fit comfortably in any of the existing menu parents. Also, developers are likely the only ones who will have this enabled, so that would make it more visible and require fewer clicks to get to.

PavanL’s picture

Issue summary: View changes

Added issue summary template.

umar-ahmad’s picture

FileSize
4.98 KB

Couldn't apply the patch. Attached is the error log.

umar-ahmad’s picture

Status: Needs review » Needs work
lauriii’s picture

Assigned: Unassigned » lauriii
lauriii’s picture

Assigned: lauriii » Unassigned
Status: Needs work » Needs review
FileSize
11.15 KB

Recreated the patch. Drupal 8 has changed dramatically from the times when the original patch was created.

raedkhurayji’s picture

I apply the patch and test the (admin/config) and i don't see the testing
and go to (admin/repots) and see the testing and work fine.

LinL’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

Patch no longer applies, tagging for reroll.

visabhishek’s picture

Status: Needs work » Needs review
FileSize
10.76 KB

reroll

martin107’s picture

Issue tags: -Needs reroll

Patch applies cleanly without error...

the is no issues creep this patch addresses only what is need to get the job done.

Manual Testing :-

1) Installed drupal with patch -- without anything appearing in the php_error.log ( so far so good )
2) >Extend -- added testing.
2) Am I wrong was expecting "testing" to no longer appear in the Development sub-section - It appears with the adjusted URL of "admin/reports/development/testing" + the links still work. But looks out of place with all the other URLs which start 'admin/config/development'
3) the newly adjusted local tab "admin/reports/development/testing/settings" works as expected...
4) From the issue summary I was expecting to see a shiny new testing entry on the 'admin/reports' page but could not.

In summary have I missed the point? As only the link names have changed and The "testing" subsection has not moved from one page into a table entry on another?

sun’s picture

There are a whole bunch of development related modules available on drupal.org. None of them really fits into any category of the current admin IA.

Instead of moving Simpletest (again) from one inappropriate category to a new inappropriate category (formerly located in Build [now Structure]), we should introduce a new top-level admin menu category:

"Develop"
/admin/dev

That idea came up at least a dozen of times in past discussions already (but I wasn't able to find an issue for doing it).

admin/dev/testing

thedavidmeister’s picture

#28 makes enough sense to me. I could see benefits in moving developer tools somewhere like that.

The last submitted patch, 1: move_config_to_reports-1843856-1.patch, failed testing.

blacklight4’s picture

If it's a health check, then it's a validation test. If it's a validation test, then it should be considered a configuration test since we are not about to add modules that are not healthy to the config.

applicity_sam’s picture

Rerolled the patch in #26 to apply to the head.
Also changed the paths for testing to appear under reports/testing and not reports/development/testing as there is no parent path and no obvious way to link to simple test with the old patch.

nileema.jadhav’s picture

Assigned: Unassigned » nileema.jadhav
Issue tags: +drupalconasia2016

Working on reviewing the patch.

nileema.jadhav’s picture

I applied patch provided in #33. It fails to apply on latest 8.0.x branch. It needs to be recreated. Working on it.

vaidehi bapat’s picture

I also tried #33. Failing on my instance as well.

nileema.jadhav’s picture

Status: Needs review » Patch (to be ported)
nileema.jadhav’s picture

Recreated #33 patch. Needs to review.

daffie’s picture

Status: Patch (to be ported) » Needs review

For the testbot

Status: Needs review » Needs work

The last submitted patch, 38: DrupalCore-SimpleTestMenu-1843856-38-80X.patch, failed testing.

daffie’s picture

Issue tags: +Needs reroll
andypost’s picture

Version: 8.0.x-dev » 8.1.x-dev
gaydabura’s picture

Assigned: nileema.jadhav » Unassigned
Status: Needs work » Needs review
FileSize
9.55 KB

rerolled

andypost’s picture

  1. +++ b/core/modules/simpletest/src/Form/SimpletestSettingsForm.php
    @@ -42,7 +42,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
    -      '#description' => $this->t('By default SimpleTest will clear the results after they have been viewed on the results page, but in some cases it may be useful to leave the results in the database. The results can then be viewed at <em>admin/config/development/testing/results/[test_id]</em>. The test ID can be found in the database, simpletest table, or kept track of when viewing the results the first time. Additionally, some modules may provide more analysis or features that require this setting to be disabled.'),
    +	  '#description' => $this->t('By default SimpleTest will clear the results after they have been viewed on the results page, but in some cases it may be useful to leave the results in the database. The results can then be viewed at <em>admin/reports/testing/results/[test_id]</em>. The test ID can be found in the database, simpletest table, or kept track of when viewing the results the first time. Additionally, some modules may provide more analysis or features that require this setting to be disabled.'),
    

    tab prefix in line

  2. +++ b/core/modules/simpletest/src/Tests/SimpleTestTest.php
    @@ -129,7 +129,8 @@ function testWebTestRunner() {
    -        $this->drupalGet('admin/config/development/testing');
    +        $this->drupalGet('admin/reports/testing');
    +        $this->drupalGet('admin/reports/testing');
    

    why that called twice

gaydabura’s picture

thnx, @andypost, fixed

gaydabura’s picture

Issue tags: -Needs reroll
FileSize
2.09 KB
andypost’s picture

Status: Needs review » Reviewed & tested by the community

Let's get commiter's feedback

catch’s picture

Status: Reviewed & tested by the community » Needs review
Issue tags: +Needs usability review, +Needs screenshots

Not sure I agree with this. Reports are passive, simpletest is active. Also it's purely a developer tool, not a site-admin tool which reports are mainly for.

Also not seeing a screenshot here.

yoroy’s picture

Issue tags: -Needs usability review

Seems to me that *if* this should be moved somewhere else, then it should be into a new "Development" top level category (of which we already have 8) but that's a different (perfectly ok to have) discussion.

Moving this from /admin/config/development/ to admin/reports/ means moving it out of the Development sub section which doesn't look like an improvement, because there *is* consensus that Testing is about Development.

So even though Development is not quite comfortable to some *as a section under Configuration*, it looks like we shouldn't move Testing out of Development, especially since all the other items in Reports aren't about development either.

catch’s picture

Status: Needs review » Closed (works as designed)

Thanks @yoroy. The fact it'd move out of the development item and the potential to maybe add a top level development item I hadn't thought of, but both are very good reasons not to do this.

Going to mark this 'by design'.