Published April 27th, 2015 Under Unit Testing | Comments Off on Pragmatic Unit Testing in C++
Successful adoption of unit testing goes beyond picking a framework: The effectiveness of unit testing is dependent on run-time analysis, static analysis, and other tools to make up the “iron triangle” necessary to get profitable increases in feature velocity and MTBF in the field. We’ll cover where to start in a legacy codebase get the most ROI on unit testing effort, the top 5 legacy design knots and refactoring steps to loosen those knots, and how to write tests that are easy to read and maintain. Intermediate knowledge of linkers and preprocessors are highly recommended. Read more
Published January 24th, 2011 Under Unit Testing | Comments Off on Frama-C Industrial Usage
This video presents some industrial applications of the Frama-C platform by Dassault Aviation. Frama-C is a suite of open source tools dedicated to the analysis of the source code of software written in C. Frama-C gathers several static analysis techniques in a single collaborative framework. The collaborative approach of Frama-C allows static analyzers to build upon the results already computed by other analyzers in the framework. Thanks to this approach, Frama-C provides sophisticated tools, such as a slicer and dependency analysis.
Published November 15th, 2010 Under Continuous Integration | Comments Off on CMake/CPack/CTest/CDash Open Source Tools to Build Test and Deploy C++ Software
This talk will cover the history and features of CMake, CTest, CDash and CPack in the context of a integrated development environment.
Published October 20th, 2010 Under Unit Testing | Comments Off on C++ And TDD: Getting Started
This video provides a demonstration of Test-Driven Development (TDD) in C++ using the Eclipse CDT and CppUTest.
Kevlin Henney explores the typical styles used for C++ unit-testing frameworks before going on to look at other possibilities that are more likely to encourage programmer testing and higher quality unit tests. From the raw use of the assert macro, to xUnit-style frameworks, to more natively C++-style frameworks and then onto a specification-centric approach that abandons functions as the basic unit of test case decomposition. The technical and practitioner pros and cons of each approach are examined.
Published March 25th, 2009 Under Uncategorized | Comments Off on C++ Mocks Made Easy – An Introduction to gMock
Mock objects make unit testing easier and more effective. They cut code dependencies, make the tests fast and robust, make the test intent clear, and enable developers to easily test the interaction between components. While an invaluable technique, mocks haven’t caught on in the C++ land due to limitation of the language and lack of good tools. gMock is a library that makes C++ mocks easy and practical. A user would describe the interface he wants to mock and gMock will automatically generate the implementation. Then the user can control the generated mock using an intuitive Domain-Specific Language (embedded in C++) that resembles English. Announced in Q4 2007, gMock has been used in over 100 projects at Google.
Whenever unit-tests are written, chances are good that the code is not isolated. Many tests run against a given class/interface/function. The design didn’t consider isolating the dependencies of this function, which makes tests slower, larger, less focused, and likely depending on external dependencies (e.g. database access) which decreases the reliability. In addition, it disables much of the interaction-based testing or verification of behavior at error conditions. In this session I will demonstrate the value of small, isolated tests and explain good engineering practices for how to structure them. I will review examples in several programming languages and domains including C++ and Java, but also on web applications, UMTS Protocol Design and Testing (Device Testing), and other platforms.Â Talk give at the Third Annual Google Test Automation Conference (GTAC), Seattle, WA, Oct. 23rd and 24th. Speaker: Christopher Semturs.keep looking »