Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
A good module needs some tests to ensure it works correctly. Components/actions to test could be:
- CRUDing indexes and servers via the UI.
- Indexing, clearing, reindexing content on an index (also via UI).
- Query parsing.
- Db search indexing, searching, and administration tasks (adding/removing indexes, …).
Comment | File | Size | Author |
---|---|---|---|
#5 | 872912-5--testing.patch | 647 bytes | drunken monkey |
Comments
Comment #1
drunken monkeyAll tests for the API/framework are written and cover the thing pretty well, I think. Also, everything seems to be alright, I'm just waiting for some results in the following issues for two specific problems:
#883264: Testing objects with unit tests
#883286: Messages (via drupal_set_message()) don't appear for one single page requests
However, the test cases themselves show no (more) errors in the module.
Still needed are tests for the search_api_db module.
Comment #2
drunken monkeyUpdate: This is heavily out of sync with the rest of the module, tons of tests fail. Will have to change that before considering a final 1.0 release. Already worked a bit on it, but am now stuck on some database search test, which might be a real bug in the database search module.
Also, all four "new" sub-modules still need tests.
Comment #3
drunken monkeyI finally got down to at least updating and fixing the tests that are already there, according to all the API and UI changes.
Some tests still fail, though, due to the following reasons:
- #946286: Multi-term fulltext filter results in exception
- #1026496: status doesn't get set properly when creating entities
- #1007830: Nested transactions throw exceptions when they got out of scope
- Seemingly some bug in the database backend that I haven't completely fleshed out, yet.
Probably only two of these are my fault, at least …
Still "needs work" because there are still three sub-modules without any tests.
Comment #4
drunken monkeySince #1026496: status doesn't get set properly when creating entities got fixed (and I quickly fixed a bug that only showed itself as a result of that fix), now only some of the database backend tests fail. Hooray!
Comment #5
drunken monkey#1860028-3: SQLSTATE[42703]: Undefined column: ### ERROR: column t.word does not exist at character ###. might very well finally make all DB backend tests pass! Hooray!
I even expanded the tests a bit (and, admittedly, had to fix one problem). See attached patch.
Comment #6
drunken monkeyCommitted.