Changes between Version 18 and Version 19 of Contribute/QA


Ignore:
Timestamp:
11/29/12 17:20:24 (12 years ago)
Author:
Pat Tressel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Contribute/QA

    v18 v19  
    6363=== Create a Generic Test Function for Search Tests ===
    6464Currently the Sahana test framework has a {{{create}}} function in {{{eden/modules/tests/web2unittests.py}}} which makes it simple to write tests for creating records. A similar function could be written for the Search Function: This would do the following:
    65 * Fill the search criteria in the simple and advanced form
    66 * Search
    67 * Check the number of records
    68 * Sort the results by a specific column
    69 * Check the first 3 results in a specific column
     65* Have parameters for:
     66 * The search query -- which fields to search on and their values.
     67  * Look at the {{{create}}} function's {{{data}}} parameter. It has additional information about the form. Do you need anything like that? Could you use the same format for your parameter?
     68  * Would it make sense to share any code with {{{create}}}?
     69 * The expected results.
     70  * You may want tests that return no results, or one result, or multiple results. What would be a good way to pass in the expected results?
     71* Fill the search criteria in the advanced search form.
     72* Execute the search.
     73* Check that the results are exactly as given.
     74* If feasible, extend this to also test simple search.
     75 * Can you use the same data to test the simple search form?
     76 * Does the caller need to tell you which field the simple search uses?
    7077Test this function in at least one test script.
    7178