Closed (fixed)
Project:
Simplenews
Version:
7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
21 May 2011 at 15:40 UTC
Updated:
4 Jan 2014 at 00:53 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
simon georges commentedThanks a lot for your proposition (and the work you've already done porting patches, I'll review them when I find some time).
The two immediate things I see are:
- subscription process;
- sending process (server side, I think the client form is clearly less important), especially cron processing.
I'll try to find some time (again) to dig deeper into the code to point out the most important parts. Thanks again.
Comment #2
pillarsdotnet commentedComment #3
miro_dietikerAt least major to me. We need some measurement of quality...
Let's set this for some time to critical. If we decide to release without tests, then back to major.
Pinged pillarsdotnet..
Comment #4
pillarsdotnet commentedGot the ping -- I'm still learning how to write tests; it's not nearly as easy as I first supposed. I don't know how soon I'll be able to work on this -- it occurs to me that my own modules are universally missing tests, as well.
Comment #5
berdirI am working on some tests.
There were some existing, old tests, which I successfully ported and I'm working on some additional ones currently.
Comment #6
simon georges commentedThat's awesome news !
Comment #7
berdirOk, here is a first patch.
Included:
- Ported the existing tests
- Removed the simplenews_test.module, the only purpose of it was to display all sent messages on the site to be able to read them in the tests. However, Simpletest has built in support for that and allows to access mails through $this->drupalGetMails().
- Removed the empty SimplenewsBlockTestCase. Can still be re-added later on and the blocks are already largely covered by the other tests
- Added new tests to test newsletter categories including all combiniations of their settings (new account, opt_inout, block).
- Added tests for the subscriptions admin UI (mass subscribe/unsubscribe, export, filters)
- Worked around a bug when deleting categories after a term was deleted. This didn't worked at all, because loading of the term failed as the term was already deleted in the database.
Once this is commited, it should be possible to enable automated testing for this project I think.
I also have a number of other patches lined up, mostly clean ups and i18n integration, will post separate issues for them.
Comment #8
simon georges commentedTagging.
Comment #9
simon georges commentedPatch applies cleanly.
Tests can be launched (550 passes, 0 fails, 153 exceptions, and 138 debug messages).
Patch needs further review, but it seems great at first sight. @pillarsdotnet, are you willing to do it ?
Comment #10
pillarsdotnet commentedWill do shortly.
Comment #11
berdirHm, what are those exceptions? The tests work fine for me...
Comment #12
simon georges commentedOoops, nevermind, they seem to come from my configuration:
file_put_contents(sites/default/files/simpletest/verbose/SimpleNewsAdministrationTestCase-49.html) [function.file-put-contents]: failed to open stream: Permission deniedAnd 3 notices, several times:
Undefined index: email_plain Notice field.info.inc 797 field_info_max_weight() Exception
Undefined index: email_html Notice field.info.inc 797 field_info_max_weight() Exception
Undefined index: email_textalt Notice field.info.inc 797 field_info_max_weight() Exception
Comment #13
berdirYes the first is a permission issue, make sure Drupal has write permissions for that folder (everything in files, actually).
The second I'm not sure, can anyone else confirm that? I can't...
Comment #14
miro_dietikerohhhh... wrong post, wrong patch!
Comment #15
berdirWe (MD Systems) are going to work a few days on Simplenews this month, I'll go ahead and commit the tests so that we can proceed here.