| t | Here are some design notes for the unit test feature of tbwiki: | t | |
| <p> | | |
| <h2><a name="Desired_Features">Desired Features</a> | | |
| <span align=right class="section_edit_link">[<a href="/tbwiki/Unit_Test_Notes?action=edit§ion=Desired_Features">edit section</a>]</font></span> | | |
| </h2> | | |
| <ul><li>process a set of unit tests automatically, and report any regressions | | |
| <li>save an existing HTML for a wiki page as a "good" reference for the output for particular markup | | |
| <li>have specific unit tests, with markup, and expected html | | |
| <ul><li>process those in a batch | | |
| </ul> | | |
| </ul> | | |
| <p> | | |
| <ul><li>have a collection of pages with HTML 'expected result' files | | |
| <li>this feature overlaps with caching | | |
| <ul><li>generation of html file | | |
| <li>checking status of html file | | |
| </ul> | | |
| </ul> | | |
| <p> | | |
| <h2><a name="Design_of_regression_test_feature">Design of regression test feature</a> | | |
| <span align=right class="section_edit_link">[<a href="/tbwiki/Unit_Test_Notes?action=edit§ion=Design_of_regression_test_feature">edit section</a>]</font></span> | | |
| </h2> | | |
| <ul><li>run engine from command line to convert a page into it's corresponding HTML | | |
| <li>OR, run the regression test inside a Processor | | |
| </ul> | | |
| <p> | | |
| <ul><li>forms needed: | | |
| <ul><li>show list of pages and their status: | | |
| <ul><li>green = tbwiki current engine is producing expected output | | |
| <li>red = tbwiki current engine is not producing expected output | | |
| <li>orange = there is not expected output file | | |
| </ul><li>allow saving a page's current output as the expected output | | |
| <ul><li>should convert to green | | |
| </ul></ul><li>create a directory: | | |
| <ul><li>expected_html | | |
| </ul><li>need compare_with_expected_output function | | |
| </ul> | | |
| <p> | | |
| <h2><a name="Some_other_notes">Some other notes</a> | | |
| <span align=right class="section_edit_link">[<a href="/tbwiki/Unit_Test_Notes?action=edit§ion=Some_other_notes">edit section</a>]</font></span> | | |
| </h2> | | |
| <ul><li>may need to run with some variables different | | |
| <ul><li>need to run with different user?, cookies?, theme? | | |
| </ul> | | |
| </ul> | | |
| <p> | | |
| <h2><a name="to_do">to do</a> | | |
| <span align=right class="section_edit_link">[<a href="/tbwiki/Unit_Test_Notes?action=edit§ion=to_do">edit section</a>]</font></span> | | |
| </h2> | | |
| <p> | | |
| <ul><li>ProcessorRegressionCheck.py | | |
| <ul><li>by default, show list of all pages, with status of each page | | |
| <li>show a link for each page, to update the expected output | | |
| </ul><li>remove expected_output pages by hand | | |
| </ul> | | |