Halpin, Terry and Rugaber, Spencer (2015) Testing Your Programs. In: LogiQL: A Query Language for Smart Databases. Taylor & Francis Group, pp. 303-306. ISBN 9781482244939
|
Text
19_ft.pdf Download (130kB) | Preview |
Abstract
This appendix describes the lb unit unit-testing framework. An important part of constructing programs in any language is testing them, and one purpose of this appendix is to get you thinking about constructing tests as you write your programs. The lb unit is invoked by typing lb unit args, where args is used to indicate the tests you want to run and other options you can supply. Individual tests can be run by using the --test fileName(s) option, where fileName(s) gives the name of the file(s) containing the tests that you want to run. You can also organize your tests into suites, collections of related tests. Similar to the above, you would use the --suite suiteName(s) option to run suite(s) of tests. Each of them names a directory containing a set of test files to execute. You can even run a series of suites by using the --suiteDir suiteDirectory(ies) option. In this case, lb unit will recursively execute the tests in each of the named directories. Regardless of how you invoke lb unit, it first runs any user-specified setup instructions common to the tests in the directory containing them. The instructions are placed in a file named setUp.lb. Similarly, after the tests are run, lb unit runs the instructions in the file tearDown.lb. Note that all test script files should use the .lb suffix.
Item Type: | Book Section |
---|---|
Subjects: | Q Science > QA Mathematics > QA76 Computer software |
Divisions: | Faculty of Engineering, Science and Mathematics > School of IT |
Depositing User: | Unnamed user with email masilah.mansor@newinti.edu.my |
Date Deposited: | 20 Jun 2016 02:38 |
Last Modified: | 20 Jun 2016 02:38 |
URI: | http://eprints.intimal.edu.my/id/eprint/340 |
Actions (login required)
View Item |