ALMA Common Software Basic Track Test Driven Development Unit testing and TAT
What is it? In a nutshell ² Development process that relies on very short development cycles ² Tests written before functionality
Workflow
How to test? ² Unit testing ² Atomic code functionality tests ² xUnit code-driven testing framework: ² CppUnit ² jUnit ² PyUnit
What to test? What not to test? For sure: ² Interfaces ² Critical and/or non trivial portions of the code Avoid testing: ² Code without added value, such as getters/setters and delegations Be cautious: ² Over-testing is a waste of time
xUnit ² Test case: basic unit ² Test suite: set of tests that share the same test conditions ² setup() ² tearDown() ² Assertions
ACS TAT ² Automated test driver ² Initializes environment (ACS) ² Pass criteria based on comparing test output against an output template ² Can also run other kind of tests besides xUnit-based ones
Integration Tests ² Tests the interactions among software modules ² Tests deployment configuration ² Integration CDB ² Hardware configuration, if necessary ² Individual module unit tests must pass to integrate
Development team Responsible for: ² Adding (at least one!) unit test(s) for your component ² Prepare a test environment ² Run the test(s) until the work ² Once tests pass, check in all your code, test code and relevant configurations (TAT files, CDB) to the project configuration server ² Document your work right away and in parallel with the development! Advise: When done, take a well deserve coffee break…
Integration and testing team Responsible for: ² Continuous (and automatic) integration ² Quality control during development ² Build every time changes are detected ² Identifying compilation and failures against regression tests ² Facilitating the parties responsible for the failure and more importantly the parties responsible for fixing it ² Revert to the last working checkpoint in case of a failure Advise: Use automated tools like Jenkins, the integration team key tool
Questions? Acknowledgements ACS presentations were originally developed by the ALMA Common Software development team and has been used in many instances of training courses since 2004. Main contributors are (listed in alphabetical order): Jorge Avarias, Alessandro Caproni, Gianluca Chiozzi, Jorge Ibsen, Thomas Jürgens, Matias Mora, Joseph Schwarz, Heiko Sommer. The Atacama Large Millimeter/submillimeter Array (ALMA), an international astronomy facility, is a partnership of Europe, North America and East Asia in cooperation with the Republic of Chile. ALMA is funded in Europe by the European Organization for Astronomical Research in the Southern Hemisphere (ESO), in North America by the U.S. National Science Foundation (NSF) in cooperation with the National Research Council of Canada (NRC) and the National Science Council of Taiwan (NSC) and in East Asia by the National Institutes of Natural Sciences (NINS) of Japan in cooperation with the Academia Sinica (AS) in Taiwan. ALMA construction and operations are led on behalf of Europe by ESO, on behalf of North America by the National Radio Astronomy Observatory (NRAO), which is managed by Associated Universities, Inc. (AUI) and on behalf of East Asia by the National Astronomical Observatory of Japan (NAOJ). The Joint ALMA Observatory (JAO) provides the unified leadership and management of the construction, commissioning and operation of ALMA.
Recommend
More recommend