SimpleTest: color debug messages

boombatower - June 23, 2009 - 23:33
Project:Drupal
Version:7.x-dev
Component:simpletest.module
Category:task
Priority:normal
Assigned:boombatower
Status:closed
Description

Per the debug messages to be provided by #296574: Provide debug facility for general and testing it would seem logical to color them differently for easy distinguishing.

I think just using the group property of assertions should work. Look for group "debug".

#1

boombatower - June 23, 2009 - 23:40
Assigned to:Anonymous» boombatower
Status:active» needs review
AttachmentSizeStatusTest resultOperations
500334-simpletest-debug-color.patch1.48 KBIdlePassed: 11853 passes, 0 fails, 0 exceptionsView details | Re-test

#2

boombatower - June 23, 2009 - 23:47

Changed colors to whites.

AttachmentSizeStatusTest resultOperations
500334-simpletest-debug-color.patch1.48 KBIdlePassed: 11824 passes, 0 fails, 0 exceptionsView details | Re-test

#3

System Message - June 24, 2009 - 01:05
Status:needs review» needs work

The last submitted patch failed testing.

#4

boombatower - June 24, 2009 - 02:14
Status:needs work» needs review

Test slave crapped.

#5

boombatower - July 9, 2009 - 00:11
Status:needs review» reviewed & tested by the community

I think this is fairly straight forward.

#6

webchick - July 21, 2009 - 01:53

I'm not sure why this is a separate patch? There's no point in committing it if #296574: Provide debug facility for general and testing doesn't get in, no? Can we move this code into the patch over there?

#7

boombatower - July 21, 2009 - 02:05

Actually if you use the group 'Debug' you can take advantage of this. Either way it seemed like a separate patch, but we can merge.

/me has been burned TOO many times over the whole large patch stuff.

#8

webchick - July 21, 2009 - 02:58
Status:reviewed & tested by the community» won't fix

Ok, boombatower clarified on IRC that this patch is still useful even right now if you do something like:

$this->assertTrue(FALSE, 'message', 'Debug');

However, I tried this and it sends conflicting messages. The results says "1 fail" yet none of the rows are coloured red. There's only the one grey "Debug" message row with a red X next to it. If I change it to a pass instead (assertTrue(TRUE...), then the fieldset gets collapsed and I need to explicitly expand it to read the debug message. Again, not intuitive.

Therefore, I'm not sure this makes much sense by itself. Let's roll it in with a patch that adds an explicit debug function.

#9

webchick - July 21, 2009 - 07:24
Status:won't fix» needs review

On IRC, Jimmy explained that this actually is a follow-up to the verbose mode patch which is already using this grouping for debug messages.

Just a question. Why use the grouping? Why not a different $assertion->status;?

#10

boombatower - July 23, 2009 - 01:16

I would much rather not add a debug status as that would require a rewrite of parts of the code, considering these messages are purely for debug that seems a bit much.

Verbose uses the Debug group right now and #296574: Provide debug facility for general and testing will provide a function to call for general debug info. So either commit here or I can include in the other debug patch.

#12

boombatower - July 28, 2009 - 23:13
Status:needs review» reviewed & tested by the community

Extremely simple followup

#13

Dries - July 29, 2009 - 11:20
Status:reviewed & tested by the community» needs review

Screenshot?

#14

boombatower - July 30, 2009 - 00:46
Status:needs review» reviewed & tested by the community

Can do.

simpletest debug color

AttachmentSizeStatusTest resultOperations
500334-simpletest-debug-color.png42.44 KBIgnoredNoneNone

#15

webchick - August 4, 2009 - 06:47
Status:reviewed & tested by the community» fixed

Ok, committed to HEAD.

#16

System Message - August 18, 2009 - 06:50
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.