Test Driven Development for Embedded C 1st edition by James Grenning- Ebook PDF Instant Download/Delivery: 1680504880 , 9781680504880
Full download Test Driven Development for Embedded C 1st edition after payment

Product details:
ISBN 10: 1680504880
ISBN 13: 9781680504880
Author: James Grenning
Another day without Test-Driven Development means more time wasted chasing bugs and watching your code deteriorate. You thought TDD was for someone else, but it’s not! It’s for you, the embedded C programmer. TDD helps you prevent defects and build software with a long useful life. This is the first book to teach the hows and whys of TDD for C programmers.
TDD is a modern programming practice C developers need to know. It’s a different way to program—unit tests are written in a tight feedback loop with the production code, assuring your code does what you think. You get valuable feedback every few minutes. You find mistakes before they become bugs. You get early warning of design problems. You get immediate notification of side effect defects. You get to spend more time adding valuable features to your product.
James is one of the few experts in applying TDD to embedded C. With his 1.5 decades of training,coaching, and practicing TDD in C, C++, Java, and C# he will lead you from being a novice in TDD to using the techniques that few have mastered.
This book is full of code written for embedded C programmers. You don’t just see the end product, you see code and tests evolve. James leads you through the thought process and decisions made each step of the way. You’ll learn techniques for test-driving code right nextto the hardware, and you’ll learn design principles and how to apply them to C to keep your code clean and flexible.
To run the examples in this book, you will need a C/C++ development environment on your machine, and the GNU GCC tool chain or Microsoft Visual Studio for C++ (some project conversion may be needed).
Test Driven Development for Embedded C 1st Table of contents:
Chapter 1: Test-Driven Development
Why Do We Need TDD?
What Is Test-Driven Development?
Physics of TDD
The TDD Microcycle
TDD Benefits
Benefits for Embedded
Part 1: Getting Started
Chapter 2: Test-Driving Tools and Conventions
What Is a Unit Test Harness?
Unity: A C-Only Test Harness
CppUTest: A C++ Unit Test Harness
Unit Tests Can Crash
The Four-Phase Test Pattern
Where Are We?
Put the Knowledge to Work
Chapter 3: Starting a C Module
Elements of a Testable C Module
What Does an LED Driver Do?
Write a Test List
Writing the First Test
Test-Drive the Interface Before the Internals
Incremental Progress
Test-Driven Developer State Machine
Tests Are FIRST
Where Are We?
Put the Knowledge to Work
Chapter 4: Testing Your Way to Done
Grow the Solution from Simple Beginnings
Keep the Code Clean—Refactor as You Go
Repeat Until Done
Take a Step Back Before Claiming Done
Where Are We?
Put the Knowledge to Work
Chapter 5: Embedded TDD Strategy
The Target Hardware Bottleneck
Benefits of Dual-Targeting
Risks of Dual-Target Testing
The Embedded TDD Cycle
Dual-Target Incompatibilities
Testing with Hardware
Slow Down to Go Fast
Where Are We?
Put the Knowledge to Work
Chapter 6: Yeah, but…
We Don’t Have Time
Why Not Write Tests After the Code?
We’ll Have to Maintain the Tests
Unit Tests Don’t Find All the Bugs
We Have a Long Build Time
We Have Existing Code
We Have Constrained Memory
We Have to Interact with Hardware
Why a C++ Test Harness for Testing C?
Where Are We?
Put the Knowledge to Work
Part 2: Testing Modules with Collaborators
Chapter 7: Introducing Test Doubles
Collaborators
Breaking Dependencies
When to Use a Test Double
Faking It in C, What’s Next
Where Are We?
Put the Knowledge to Work
Chapter 8: Spying on the Production Code
Light Scheduler Test List
Dependencies on Hardware and OS
Link-Time Substitution
Spying on the Code Under Test
Controlling the Clock
Make It Work for None, Then One
Make It Work for Many
Where Are We?
Put the Knowledge to Work
Chapter 9: Runtime-Bound Test Doubles
Testing Randomness
Faking with a Function Pointer
Surgically Inserted Spy
Verifying Output with a Spy
Where Are We?
Put the Knowledge to Work
Chapter 10: The Mock Object
Flash Driver
MockIO
Test-Driving the Driver
Simulating a Device Timeout
Is It Worth It?
Mocking with CppUMock
Generating Mocks
Where Are We?
Put the Knowledge to Work
Part 3: Design and Continuous Improvement
Chapter 11: SOLID, Flexible, and Testable Designs
SOLID Design Principles
SOLID C Design Models
Evolving Requirements and a Problem Design
Improving the Design with Dynamic Interface
More Flexibility with Per-Type Dynamic Interface
How Much Design Is Enough?
Where Are We?
Put the Knowledge to Work
Chapter 12: Refactoring
Two Values of Software
Three Critical Skills
Code Smells and How to Improve Them
Transforming the Code
But What About Performance and Size?
Where Are We?
Put the Knowledge to Work
Chapter 13: Adding Tests to Legacy Code
Legacy Code Change Policy
Boy Scout Principle
Legacy Change Algorithm
Test Points
Two-Stage struct Initialization
Crash to Pass
Characterization Tests
Learning Tests for Third-Party Code
Test-Driven Bug Fixes
Add Strategic Tests
Where Are We?
Put the Knowledge to Work
Chapter 14: Test Patterns and Antipatterns
Ramble-on Test Antipattern
Copy-Paste-Tweak-Repeat Antipattern
Sore Thumb Test Cases Antipattern
Duplication Between Test Groups Antipattern
Test Disrespect Antipattern
Behavior-Driven Development Test Pattern
Where Are We?
Put the Knowledge to Work
Chapter 15: Closing Thoughts
Part 4: Appendixes
Appendix 1: Development System Test Environment
Development System Tool Chain
Full Test Build makefile
Smaller Test Builds
Appendix 2: Unity Quick Reference
Unity Test File
Unity Test main
Unity TEST Condition Checks
Command-Line Options
Unity in Your Target
Appendix 3: CppUTest Quick Reference
The CppUTest Test File
Test Main
TEST Condition Checks
Test Execution Order
Scripts to Create Starter Files
CppUTest in Your Target
Convert CppUTest Tests to Unity
Appendix 4: LedDriver After Getting Started
LedDriver First Few Tests in Unity
LedDriver First Few Tests in CppUTest
LedDriver Early Interface
LedDriver Skeletal Implementation
Appendix 5: Example OS Isolation Layer
Test Cases to Assure Substitutable Behavior
POSIX Implementation
Micrium RTOS Implementation
Win32 Implementation
Burden the Layer, Not the Application
Appendix 6: Bibliography
You May Be Interested In…
People also search for Test Driven Development for Embedded C 1st:
test driven development for embedded c pdf
test driven development for embedded c pdf github
test driven development for embedded c by james grenning pdf
test driven development for embedded c github
test driven development for embedded c by grenning
Tags: James Grenning, Test Driven, Embedded C


