wiki:PromotBrowserTest

Version 26 (modified by kolczyk, 13 years ago) (diff)

--

ProMoT Browser

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 Promot/trunk/promot/src/gui/org/mpg/dcts/promot/cna/CNAImporterTest.java for cna-model (sigtoynet-test) in test-suite Promot/trunk/promot/kb/testsuite/CNA/sigtoynet-test/
  2. junit test Promot/trunk/promot/src/gui/org/mpg/dcts/promot/test/CmdAddSubclassTest.java
  3. junit test Promot/trunk/promot/src/gui/org/mpg/dcts/promot/test/CmdDeleteTest.java
  4. junit test Promot/trunk/promot/src/gui/org/mpg/dcts/promot/PromotTest.java
  5. junit test Promot/trunk/promot/src/gui/org/mpg/dcts/promot/test/CmdCopyClassTest.java
  6. junit test Promot/trunk/promot/src/gui/org/mpg/dcts/promot/test/CmdSelectTest.java
  7. junit test Promot/trunk/promot/src/gui/org/mpg/dcts/promot/test/CmdChangeAbstractTest.java junit test Promot/trunk/promot/src/gui/org/mpg/dcts/promot/test/CmdChangeModelTest.java
  8. junit test for parametrization (from diana and general) Promot/trunk/promot/src/gui/org/mpg/dcts/promot/DianaDataReader/DianaDataReaderTest.java
    Promot/trunk/promot/src/gui/org/mpg/dcts/promot/DianaDataReader/DianaDataReaderSetParameterTest.java
    Promot/trunk/promot/src/gui/org/mpg/dcts/promot/test/ParameterTest.java


Tests

  1. Success if library isPresent (included in file so file changes might break the test), model class present as PromotTreeNode?, load egf model (Promot/trunk/promot/kb/SignalTransd/EGF-model/LOAD-EGF-MODEL.mdl); test contents of model/PromotTreeNode?
  2. Same as 1. with different library (logical library) and model (toy-model)
  3. Tested with import + simulation of all biomodels.org models, Success if no errors during export/load/save during script runs, Promot/trunk/promot/scripts/sbml2mdl-runner, Promot/trunk/promot/scripts/mdl2diana-runner,
  4. Save a model into mdl (selected, all), compare generated files to expected; depends on selection test (13), test round trip of load+save of example
  5. Export egf-model to SBML, compare generated file with expected output (file content + simulation results), TODO: export should work (be tested) for all models in kb, which tool for simulation (scriptable required)? comparison of simulation results after SBML round trip
  6. Export egf-model to Diana/Diva?
    Compare generated file with expected output (file content + simulation results), TODO: export should work (be tested) for all models in kb
  7. Run script
    Test with default inputs for synthetic biology scripts, e.g. Promot/trunk/promot/kb/scripts/synthetic-biology.
  8. Change property
    in Browser tree select module, mouse right-click for context menu, choose Change Property --> Icon (Abstract, Model)
  9. Simulate model
    Load hafke model (Promot/trunk/promot/kb/hafke/obertopp/LOAD.mdl), select hafke-process (module --> device --> process) in Browser, 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

  1. Start Visual Editor for a class
  2. Start Visual Explorer for a class
  3. View Mathematical Model
    Display of an instance (View --> View Math Model)
  4. Exit with Dialog for modified in Editor + Browser (change properties, load, import)
  5. Search class
    Search class (+class for slot in class) dialog, model type is not important, so test with egf_model,

search egf_model (substring, class + slot; class) should return egf_model (class), egf_model_noint (class)
search proti (whole word, class + slot; slot) should return egf_model:proti (slot)
clear should remove displayed results;

  1. Comparison of models
    Load two different glycolysis models, e.g. Promot/trunk/promot/kb/testsuite/mdl/hynne.mdl and Promot/trunk/promot/kb/testsuite/mdl/teusink.mdl. Select the model classes (direct sub-classes of sbml-model) in browser and choose 'Tools --> Compare selected Models' from menu. Visual explorer should open, models should be displayed in common container. Edges connecting corresponding elements should be visible. Other example models for comparison (elements with same type +annotation or type + name) can be load with Promot/trunk/promot/kb/testsuite/mdl/egf+insulin.mdl.
  2. Export documentation as HTML
    Open model, select model, export HTML (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?)