Test-Driven Development with C++: A simple guide to writing bug-free Agile code
暫譯: 使用 C++ 的測試驅動開發:撰寫無錯誤敏捷程式碼的簡易指南

Tanner, Abdul Wahid

買這商品的人也買了...

相關主題

商品描述

Learn how to write a simple testing framework and extend it to drive the design of your logging library

Key Features

- Learn how to solve various challenges when testing in C++ with the help of effective solutions
- Develop a logging library with enhancements
- Drive better code designs with effective tests

Book Description

Modern, standard C++ is all that is needed to create a small and practical testing framework that will improve the design of any project. This allows you to think about how the code will be used, which is the first step in designing intuitive interfaces. TDD is a modern balanced software development approach that helps to create maintainable applications, provide modularity in design, and write minimal code that drastically reduces defects. With the help of this book, you'll be able to continue adding value when designs need to change by ensuring that the changes don't break existing tests.

In this book, developers working with test-driven development (TDD) will be able to put their knowledge to work by writing a simple testing framework and then using it to drive the design of a logging library. The book will help you enhance your software development skills with test cases. You'll understand how to design and implement test cases. The chapters will also show you how to utilize the TDD approach to be more productive in software development than attempting to code in large unstructured steps.

By the end of this book, you'll have gained knowledge of TDD and testing and also built a working logging library.

What you will learn

- Understand how to develop software using TDD
- Keep the code for the system as error-free as possible
- Refactor and redesign code confidently
- Communicate the requirements and behaviors of the code with your team
- Understand the differences between unit tests and integration tests
- Use TDD to create a minimal viable testing framework

Who this book is for

This book is for C++ developers already familiar with and using C++ for daily tasks who want to improve their skillset. You don't need to be an expert but you should already have some knowledge of modern C++ and how to use templates to get the most out of this book.

商品描述(中文翻譯)

學習如何編寫一個簡單的測試框架,並擴展它以驅動您的日誌庫設計

主要特點

- 學習如何在 C++ 中解決各種測試挑戰,並獲得有效的解決方案
- 開發一個增強型的日誌庫
- 通過有效的測試推動更好的代碼設計

書籍描述

現代標準 C++ 是創建一個小型且實用的測試框架所需的一切,這將改善任何項目的設計。這使您能夠思考代碼將如何被使用,這是設計直觀介面的第一步。測試驅動開發 (TDD) 是一種現代平衡的軟體開發方法,幫助創建可維護的應用程式,提供設計的模組化,並編寫最小的代碼,從而大幅減少缺陷。在這本書的幫助下,您將能夠在設計需要變更時持續增加價值,確保這些變更不會破壞現有的測試。

在這本書中,從事測試驅動開發 (TDD) 的開發人員將能夠將他們的知識付諸實踐,通過編寫一個簡單的測試框架,然後使用它來推動日誌庫的設計。這本書將幫助您通過測試案例提升您的軟體開發技能。您將了解如何設計和實現測試案例。各章節還將向您展示如何利用 TDD 方法在軟體開發中比嘗試以大型非結構化步驟編碼更具生產力。

在本書結束時,您將獲得 TDD 和測試的知識,並建立一個可運作的日誌庫。

您將學到的內容

- 理解如何使用 TDD 開發軟體
- 使系統的代碼盡可能無錯誤
- 自信地重構和重新設計代碼
- 與您的團隊溝通代碼的需求和行為
- 理解單元測試和整合測試之間的差異
- 使用 TDD 創建一個最小可行的測試框架

本書適合對象

本書適合已經熟悉並在日常任務中使用 C++ 的開發人員,想要提升他們的技能。您不需要是專家,但應該已經具備一些現代 C++ 的知識,以及如何使用模板以充分利用本書的內容。

目錄大綱

1. Desired Test Declaration
2. Test Results
3. The TDD process
4. Adding Tests to a Project
5. Adding More Confirm Types
6. Explore Improvements Early
7. Test Setup and Teardown
8. What Makes a Good Test?
9. Using Tests
10. The TDD Process In Depth
11. Managing Dependencies
12. Creating Better Test Confirmations
13. How to Test Floating-Point and Custom Values
14. How to Test Services
15. How to Test With Multiple Threads

目錄大綱(中文翻譯)

1. Desired Test Declaration

2. Test Results

3. The TDD process

4. Adding Tests to a Project

5. Adding More Confirm Types

6. Explore Improvements Early

7. Test Setup and Teardown

8. What Makes a Good Test?

9. Using Tests

10. The TDD Process In Depth

11. Managing Dependencies

12. Creating Better Test Confirmations

13. How to Test Floating-Point and Custom Values

14. How to Test Services

15. How to Test With Multiple Threads