SimpleTests
BlakeLucchesi - July 1, 2008 - 02:14
| Project: | Search Ranking |
| Version: | 6.x-0.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Test code needs to be developed to ensure that ranking works as expected and to ensure future ranking modifiers don't mess up the current ones.

#1
Test strategy:
- Create 20 nodes that are identical
- For each of the rank modifiers we touch 2 nodes, 1 of which should be the most favorably ranked node for that modifier, the other should rank just below the top node as it has modifications that are favorable to the ranking but not as highly rated as the top node.
- Run the indexing function to ensure all of the nodes are indexed (run 3 times to ensure that the index is built completely, specifically for the links ranking which does a node_touch during cron to ensure its aggregate count is updated)
- Perform a search on the set of nodes for each of the rank factors that we have defined and verify that the nodes are returned as expected.
#2
SimpleTest coverage for 6 of the 7 added ranking factors that come packaged with this module have test coverage. The only ranking factor remaining is the inbound links ranking factor.
#3
Test coverage for all ranking factors is now completed and passing. For new modules implementing hook_ranking it is recommended to write test functionality by including the main search_ranking.test file and writing your test code as an extension to the class in that file. This will provide you with 20 identical nodes already indexed and ready to be modified to test ranking factors.
#4
Automatically closed -- issue fixed for two weeks with no activity.