== ProMoT Browser (v0.8.4) == === Expectation (functional tests) === * load: all models from kb should load * import SBML: all biomodels should load (delay not supported) * export SBML: model should be valid and match expected simulation results (which tool for tests, workflow/scripting needed) * import CNA (signaling): all example models from CNA should be imported and be identical (as close as possible) after export/round trip * export CNA (signaling): exported models should be ok for CNA (how to test?) * export diana: model should be simulatable, simulation result should be identical to expected result within given threshold * save: versions (include library, library separate (model only), with dependencies): compare file as text with expectation, test whole kb/examples? === Tests for browser in JUnit tests === 1. round trip tested [source:/Promot/trunk/promot/src/gui/org/mpg/dcts/promot/cna/CNAImporterTest.java] for cna-model (sigtoynet-test) in test-suite [source:/Promot/trunk/promot/kb/testsuite/CNA/sigtoynet-test/] 2. junit test [source:/Promot/trunk/promot/src/gui/org/mpg/dcts/promot/test/CmdAddSubclassTest.java] 3. junit test [source:/Promot/trunk/promot/src/gui/org/mpg/dcts/promot/test/CmdDeleteTest.java] 4. junit test [source:/Promot/trunk/promot/src/gui/org/mpg/dcts/promot/PromotTest.java] 5. junit test [source:/Promot/trunk/promot/src/gui/org/mpg/dcts/promot/test/CmdCopyClassTest.java] 6. junit test [source:/Promot/trunk/promot/src/gui/org/mpg/dcts/promot/test/CmdSelectTest.java] 7. junit test [source:/Promot/trunk/promot/src/gui/org/mpg/dcts/promot/test/CmdChangeAbstractTest.java] junit test [source:/Promot/trunk/promot/src/gui/org/mpg/dcts/promot/test/CmdChangeModelTest.java] 8. junit test for parametrization (from diana and general) [source:/Promot/trunk/promot/src/gui/org/mpg/dcts/promot/DianaDataReader/DianaDataReaderTest.java] [[BR]] [source:/Promot/trunk/promot/src/gui/org/mpg/dcts/promot/DianaDataReader/DianaDataReaderSetParameterTest.java] [[BR]] [source:/Promot/trunk/promot/src/gui/org/mpg/dcts/promot/test/ParameterTest.java] [[BR]] [[BR]] === Tests === 9. '''Tree nodes of dynamic model:''' load ''egf model'' ([source:/Promot/trunk/promot/kb/SignalTransd/EGF-model/LOAD-EGF-MODEL.mdl]); check contents of model in browser tree. Success if ''dynamic-library'', ''dynamic-model'', and ''egf-model'' are present. 10. '''Tree nodes of logical model:''' load ''logical library'' and ''toy model'' ([source:/Promot/trunk/promot/kb/SignalTransd/structure/toymodel.mdl]); check contents of model in browser tree. Success if ''struct-library'', ''struct-model'', and ''toy-model'' are present. 12. '''Saving a model (selection/all):''' load ''egf model''; save the model into mdl (selected classes, all classes), check that the generated mdl files contain (only) the selected classes 13. '''Export to SBML:''' load egf model, export the model to SBML, check generated file for completeness and correctness 14. '''Export to Diana/Diva:''' load egf model; export the model to Diana/Diva; check the generated files for completeness and correctness 15. '''Run Script:''' open ''Run Script'' dialog (File --> Run Script); set ''Generation Directory'', choose ''Script File'' ([source:/Promot/trunk/promot/kb/scripts/synthetic-biology/terminator_gen.pl]) and ''Input File'' ([source:/Promot/trunk/promot/kb/scripts/synthetic-biology/terminator.inp]), press ''Generate Model'', check that generated mdl file can be loaded into ProMoT 16. '''Changing properties in browser:''' select module, right-click for context menu, choose Change Property; check that changing the icon, ''abstract'' and ''model'' properties work as expected by looking at the source code (enable Show QuickView) and the color of the tree icon 17. '''Simulation with Diana:''' load Hafke model ([source:/Promot/trunk/promot/kb/hafke/obertopp/LOAD.mdl]), select ''hafke-process'' (module --> device --> process), open simulation dialog from menu (Tools --> Simulate Model), check for diana app (see status in output log), edit the generation directory to '~/opertopp', click on 'Advanced...' in the solver options pane (new window with several options should appear), close options dialog, click on 'Simulate Model' button (simulation result should appear after a while, several text in output log), click on 'Edit Script' button (text editor should appear with python script), edit the script (e.g. set Tend to 60.0), save, simulate again (tend should be 60.0 now), click on 'reset' button (files in directories 'model', 'script' and 'results' should be removed, status in output log, 'Edit Script' button should be disabled). === Visual Inspection for === 18. '''Visual Editor:''' load egf model, select ''egf-model'' in Browser, start Visual Editor for selected class (context menu --> Visual Edit) 19. '''Visual Explorer:''' load egf model, select ''egf-model'' in Browser, start Visual Explorer for selected class (context menu --> Visual Explorer) 20. '''View Mathematical Model:''' load egf model, display of an instance (View --> View Math Model) 22. '''Search class:''' load egf model; open Edit --> Search Class dialog; search for ''egf_model'' (substring, class + slot; class); expected search result: egf_model (class), egf_model_noint (class); search for ''proti'' (whole word, class + slot; slot); expected search result: egf_model:proti (slot); ''Clear'' should remove displayed results 23. '''Comparison of models:''' load model ''hynne'' [source:/Promot/trunk/promot/kb/testsuite/mdl/hynne.mdl] and model ''teusink'' [source:/Promot/trunk/promot/kb/testsuite/mdl/teusink.mdl]; select the model classes (direct sub-classes of sbml-model) in Browser and choose 'View --> Compare selected Models' from menu; expected result: Visual Explorer opens, models are displayed in common container, edges connecting corresponding elements are visible. 24. '''Export to HTML:''' load ''logical library'' and ''toy model'' ([source:/Promot/trunk/promot/kb/SignalTransd/structure/toymodel.mdl]); select class ''toy-model''; open export dialog (File --> Export --> Export HTML), use default options, click on ''Generate HTML'' button, check results in a standard web browser === Open for testing === * Option handling save, restore? * Test undo/redo in browser, include in tests for functionality if applicable * Export model to Matlab === Known problems, missing tests === * model of PromotTree under async updates - array index out of bounds, - display problems with null nodes in selection/displayed (update to slow, might be same problem as index out of bounds) - recovery from exception (refresh, seems to not restore content completely) * menu construction - only finished after PaletteWindow constructed at least once or JFileChooser dialog finished (open/import, directory select in export) - text for menu entries larger than pop-down menu (only vista so far, not happening after build (release version), cross-platform problem?)