user_guide:extend:unit_tests

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revisionBoth sides next revision
user_guide:extend:unit_tests [2019/11/11 23:38] – ↷ Page moved and renamed from dev_corner:testcases to user_guide:extend:unit_tests gawrilowuser_guide:extend:unit_tests [2019/11/12 23:41] – [Testing Transformation Scripts] gawrilow
Line 202: Line 202:
 simulates the F1 context help function of the interactive shell.  Expected help topic headers should be listed in the order they would appear in the real session, that is, describing incomplete expressions from right to left. simulates the F1 context help function of the interactive shell.  Expected help topic headers should be listed in the order they would appear in the real session, that is, describing incomplete expressions from right to left.
  
-==== Testing Transformation Scripts ====+==== Testing Data Upgrade Rules ====
  
-Each time when you introduce a format change and create a XSLT version upgrade script, you should add testcases for it in the testgroup ''upgrade'' of the affected application.  Preparing such a testcase is extremely simple: you take a data file in an old (pre-conversion) format, store it in two copies, e.g. ''Name-Version.poly'' and ''Name-Version-in.poly'', and load the ''Name-Version.poly'' into polymake, which automatically applies the transformation and stores it in the updated form.  Then you add the following line to ''test.pl'': +Each time when you introduce an incompatible data model change and introduce upgrade rules, you should add testcases for them in the testgroup ''upgrade'' of the affected application.  Preparing such a testcase is extremely simple: you take a data file in an old (pre-conversion) format, store it in two copies, e.g. ''Name-OldVersion.poly'' and ''Name-OldVersion-in.poly'', and load the ''Name-Version.poly'' into polymake, which automatically applies the upgrade rules and stores it in the updated form.  Once you verified the correctness of data transformation, add the following line to ''test.pl'': 
-  compare_transformed_object('Name-Version');+  compare_transformed_object('Name-OldVersion');
  
      
  • user_guide/extend/unit_tests.txt
  • Last modified: 2023/05/17 12:13
  • by lkastner