We really need to get rolling on 100% test coverage for statistics.module. I'll try and come up with a list of things we'll need to test.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 441002_2.patch | 10.1 KB | naxoc |
| #6 | 441002.patch | 9.73 KB | naxoc |
| #4 | 441002.patch | 9.73 KB | naxoc |
Comments
Comment #1
cwgordon7 commentedFrom the test coverage data for statistics.admin.inc and statistics.module, the following things most likely need testing:
- "Recent hits" page (entire page) [important]
- "Top pages" page (entire page) [important]
- "Top visitors" page with no available statistics [minor]
- "Top referrers" page (entire page) [important]
- "Access log" page (entire page) [important]
- Using the "access log settings" page to change statistics' settings [moderately important]
- Viewing a node with a certain number of views - does the "1 read" / "@count reads" text show up properly? [moderately important]
- Test proper handling of deleting a user - is the accesslog properly updated to reflect that the user id no longer exists? [minor]
- Proper clearing of day counts and expired access logs [moderately important]
- Statistics' "popular content" block [important]
- Test correct handling of deleting a node - is the node's counter also deleted? [minor]
Hope this helps! :) It would be great to see a few more thorough tests for statistics.
Comment #2
naxoc commentedTaking a look at statistics.admin #drupalcon
Comment #3
catchComment #4
naxoc commented"Recent hits" page (entire page) [important]
"Top pages" page (entire page) [important]
"Top referrers" page (entire page) [important]
"Access log" page (entire page) [important]
The above were already written for #659578: Top Pages and Top Referrers reports giving errors
I have (finally) written tests for the rest of the stuff.
Comment #5
dries commentedThis looks like a great patch. Some minor issues:
Make sure your comments end with a point (.). There are a couple of instances where you forgot the trailing point.
Let's write 'day counts' and 'access logs' here.
Could use some extra documentation. It's not immediately clear what the timer is for, and why we need to wait 2 seconds.
Comment #6
naxoc commentedPut some missing points in the comments and corrected the wording in comments a bit.
Comment #7
naxoc commentedAnd.... Uploaded the wrong patch.. Here is the right one
Comment #8
dries commentedI'm marking this RTBC because this looks good.
Comment #9
webchickAgreed! :)
Committed to HEAD.