1 / 14

CASA Test System

CASA Test System. Sandra Castro European Southern Observatory. CASA Test System. Summary of available tests e2e, unit tests (C++, Python) Writing and running tests Monitoring tests When to run, which tests Future plans. Summary of tests. e2e tests

Download Presentation

CASA Test System

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CASA Test System Sandra Castro European Southern Observatory

  2. CASA Test System • Summary of available tests • e2e, unit tests (C++, Python) • Writing and running tests • Monitoring tests • When to run, which tests • Future plans Sandra Castro

  3. Summary of tests • e2e tests • tests of science use cases; full-chain data reduction; sometimes slow • C++ unit tests • unit testing of C++ code; single methods; fast • Python unit tests (NEW) • unit testing of individual CASA tasks; fast • PyUnit and nose Sandra Castro

  4. e2e Tests 3C219D imagetest ngc7538 3c129_tutorial ori_ch3oh accum irc_cs ori_ch3oh_task irc_cs_task ori_hc3n asdmv1-import irc_hc3n ori_hc3n_task async-segfault irc_hc3n_task ori_sio b0319 irc_sio ori_sio_task b1608_demo irc_sio_task orion cleanchan l02d cleanhelper leo2pt plotxy coordsystest listcal pointing cvel listvis polcal_20080224_cband fits-import-export maclog ppdisk flagdata_test.py nf run_orionmos4sim fls3a_hi ngc1333 sdtpimaging g192 ngc2403_tutorial ggtau ngc4826 testcube ghii ngc4826_tutorial wf h121 ngc4826c wproj3ddat ic2233 ngc5921 imagepoltest ngc5921_uvcontsub2 Sandra Castro

  5. Python unit tests Catch errors before they go to the repository • Some scripts in scripts/regressions/tests were actually unit tests • They have been converted to PyUnit and moved to a new location • Converted tests = (new name, new location, new driver, new look, same content, standard way of writing, better reporting) Sandra Castro

  6. List of Python unit tests test_importoldasdm.py test_exportasdm.py test_imhead.py test_imsmooth.py test_plotants.py test_vishead.py test_boxit.py test_hanningsmooth.py test_immath.py test_imstat.py test_plotms.py test_visstat.py test_clean.py test_importasdm.py test_imcontsub.py test_immoment.py test_imval.py test_report.py test_clearstat.py test_imfit.py test_imregrid.py test_listhistory.py test_smoothcal.py test_csvclean.py test_importfitsidi.py test_importevla.py code/xmlcasa/scripts/tests They are located in: Sandra Castro

  7. Writing new tests • e2e test • example of 3C129.py in Eclipse • Python unit test • examples of test_clean in Eclipse https://safe.nrao.edu/wiki/bin/view/Software/CASARegressionTesting http://www.eso.org/~scastro/ALMA/CASAUnitTests.htm Sandra Castro

  8. Running tests • e2e tests • publish_summary, execfile • C++ unit tests • make check • Python unit tests • runUnitTest.py, which uses nose. • It can be run inside or outside casapy. Sandra Castro

  9. Running e2e tests CASA <18>: sys.path.append('/opt/casa/active/code/xmlcasa/scripts/regressions/admin’) CASA <19>: import publish_summary CASA <20>: publish_summary.runTest(’3C129') It will search and copy or link the data to a temporary directory and run the scripts from there. CASA <21>: execfile(’3C129_tutorial_regression.py') Data must be in the current directory. Sandra Castro

  10. Running Python unit tests • Show on a Terminal window: • Open test_clean and test_boxit • Run test_boxit. Run test_clean[test4] • Edit test_clean, include an error and run it again, together with test_boxit • Look at nosedir directory • --help, --short, --file --list options • How to run the full suite of tests Sandra Castro

  11. Monitoring the tests • e2e tests • show HTML pages • http://www.eso.org/~jmlarsen/ALMA/CASA/test-report.html • Unit tests • show Hudson. Browse through one test with failure • http://www.eso.org/alma-casa-hudson/view/unit%20test/ Sandra Castro

  12. Recent catches Sandra Castro

  13. When, which? • When to run e2e tests? • They run automatically, but if solving a JIRA ticket, the e2e tests should pass before the ticket is closed. • When to run unit tests? • C++ UTs: when building (make check) • Python UTs also run automatically a few times per day • When writing/modifying code related to a task • Before committing to active Sandra Castro

  14. Future plans • e2e tests • replace VLA data with EVLA • add scripts using ALMA commissioning data • unit tests • write unit tests for other tasks • speed up some slow tests using simdata • make sure everybody runs the tests before a commit Sandra Castro

More Related