TL;DR: This book covers the theory and methodology of unit test frameworks, offers instruction in unit test development, provides useful code examples in both Java and C++, and details the most commonly used frameworks from the XUnit family.
Abstract: This is the only book to explore unit testing as a language-independent, standalone development methodology. It covers the theory and methodology of unit test frameworks, offers instruction in unit test development, provides useful code examples in both Java and C++, and details the most commonly used frameworks from the XUnit family, including JUnit for Java, CppUnit for C++, and NUnit for .NET. It also includes the complete source code for CppUnit for C++ and NUnit for .NET.
TL;DR: This work presents CSTL, a language for writing automated tests of executable schemas written in UML/OCL, and describes a prototype implementation of a test processor that includes a test manager and a test interpreter that coordinates the execution of the tests.
Abstract: Conceptual schemas of information systems can be tested. The testing of conceptual schemas may be an important and practical means for their validation. We present a list of five kinds of tests that can be applied to conceptual schemas. Two of them require schemas comprising both the structural and the behavioral parts, but we show that it is possible and useful to test incomplete schema fragments, even if they consist of only a few entity and relationship types, integrity constraints and derivation rules. We present CSTL, a language for writing automated tests of executable schemas written in UML/OCL. CSTL includes language primitives for each of the above kinds of tests. CSTL follows the style of the modern xUnit testing frameworks. We describe a prototype implementation of a test processor, which includes a test manager and a test interpreter that coordinates the execution of the tests. Tests written in CSTL can be executed as many times as needed.
TL;DR: The foundations of a novel test automation framework, AUnit, are introduced, which is envision for testing declarative models written in Alloy -- a first-order, relational language that is supported by its SAT-based analyzer.
Abstract: Writing declarative models of software designs and analyzing them to detect defects is an effective methodology for developing more dependable software systems. However, writing such models correctly can be challenging for practitioners who may not be proficient in declarative programming, and their models themselves may be buggy. We introduce the foundations of a novel test automation framework, AUnit, which we envision for testing declarative models written in Alloy -- a first-order, relational language that is supported by its SAT-based analyzer. We take inspiration from the success of the family of xUnit frameworks that are used widely in practice for test automation, albeit for imperative or object-oriented programs. The key novelty of our work is to define a basis for unit testing for Alloy, specifically, to define the concepts of test case and coverage, and coverage criteria for declarative models. We reduce the problems of declarative test execution and coverage computation to evaluation without requiring SAT solving. Our vision is to blend how developers write unit tests in commonly used programming languages with how Alloy users formulate their models in Alloy, thereby facilitating the development and testing of Alloy models for both new Alloy users as well as experts. We illustrate our ideas using a small but complex Alloy model. While we focus on Alloy, our ideas generalize to other declarative languages (such as Z, B, ASM).
TL;DR: An open-source tool for automated generation of black-box NUnit test cases for the C# .Net platform, referred to as AutoBBUT, which shows the effectiveness of the tool in saving testers a lot of time and also preventing unwanted defects and/or test smells in test code, which can occur due to manual test code development.
Abstract: The body of knowledge in the area of black-box unit testing is quite well established, eg, the concepts of category partitioning, boundary value analysis, and pair-wise testing However, tool support to apply the existing techniques in large-scale industrial software projects is fairly limited Although tools such as HexaWise enable testers in automatic generation of allcombination pair-wise test input data, nevertheless converting them to actual test case source code (eg, in NUnit) is both very tedious and also error prone To address the above challenge, we have developed an open-source tool, referred to as AutoBBUT, for automated generation of black-box NUnit test cases for the C# Net platform Evaluation of the tool in an industrial setting by using it to automatically generate more than 1,962 NUnit test cases (having 15,906 test line of code) in NUnit shows the effectiveness of the tool in saving testers a lot of time and also preventing unwanted defects and/or test smells in test code, which can occur due to manual test code development
TL;DR: It is demonstrated the practical application of using indirection to permit a single set of Fit tests for both MATLAB and embedded system verification for a biomedical instrument.
Abstract: A prototype test driven development tool for embedded systems has been developed with hardware-oriented extensions to CPPUnitLite. However xUnit tests are written in the language of the solution; problematic in the development of biomedical instruments as the customer, the “doctor”, does not have “extensive knowledge of the domain”. The biomedical application is often prototyped within MATLAB before movement down to the “plumbing level” on a high-speed, highly parallel, processor to meet the requirement for real-time application in a safe and secure manner “in the surgical theatre” or “on the ward”. A long term research goal is an investigation of how to gain, as with standard business desktop system, the full advantage of using Fit and FitNesse as communication tools under these circumstances. We demonstrate the practical application of using indirection to permit a single set of Fit tests for both MATLAB and embedded system verification for a biomedical instrument.