Testing Your Programs

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, wher...

Full description

Bibliographic Details
Main Authors: Halpin, Terry, Rugaber, Spencer
Format: Book Section
Language:English
Published: Taylor & Francis Group 2015
Subjects:
Online Access:http://eprints.intimal.edu.my/340/
http://eprints.intimal.edu.my/340/1/19_ft.pdf
_version_ 1848766453669429248
author Halpin, Terry
Rugaber, Spencer
author_facet Halpin, Terry
Rugaber, Spencer
author_sort Halpin, Terry
building INTI Institutional Repository
collection Online Access
description 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.
first_indexed 2025-11-14T11:51:23Z
format Book Section
id intimal-340
institution INTI International University
institution_category Local University
language English
last_indexed 2025-11-14T11:51:23Z
publishDate 2015
publisher Taylor & Francis Group
recordtype eprints
repository_type Digital Repository
spelling intimal-3402016-06-20T02:38:29Z http://eprints.intimal.edu.my/340/ Testing Your Programs Halpin, Terry Rugaber, Spencer QA76 Computer software 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. Taylor & Francis Group 2015 Book Section PeerReviewed text en http://eprints.intimal.edu.my/340/1/19_ft.pdf 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
spellingShingle QA76 Computer software
Halpin, Terry
Rugaber, Spencer
Testing Your Programs
title Testing Your Programs
title_full Testing Your Programs
title_fullStr Testing Your Programs
title_full_unstemmed Testing Your Programs
title_short Testing Your Programs
title_sort testing your programs
topic QA76 Computer software
url http://eprints.intimal.edu.my/340/
http://eprints.intimal.edu.my/340/1/19_ft.pdf