test driven development

Test-Driven Development and Unit Testing

Description

Software Quality & Test
Spring 2018
2 days
SEK 15.200
DKK 13.500

Request more information

Lena Bernhardsson
+46 (0) 40 59 22 09
lena.bernhardsson@nohau.se

Training material and lunch are included.

The Test Driven Development process implies in its purest form:

  • 1st, define what/how the feature shall be tested
  • 2nd, implement code forming the feature and make its test(s) to pass
  • 3rd, refactor the code in order to fit into an appropriate standard – i.e., an architecture.

The driving force to behind TDD is the Unit Test.

The principal goal of unit testing, in embedded systems, is to take the smallest piece of testable code in an application e.g., a device driver. Then isolate it from the rest of the code, and determine whether it behaves as expected. Chiefly it is the outer observable behavior we are verifying.

Each unit is tested separately before integrated into higher order modules. Unit testing has proven its worth in that a large percentage of defects are identified during its use.

Goal/Benefits

This training provides the participant with a number of concepts around TDD in terms of unit testing:

  • Test-Driven Development – TDD
  • Decoupling
  • Software Architecture with Testability in Mind
  • Embedded TDD Strategies
  • DRY: Don’t Repeat Yourself!

Audience/Participants

This training is aimed for embedded system software designers/C-programmers dealing with development of new features, as well as maintaining existing legacy systems.

Outline

  1. Test-Driven Development – TDD
    • Why TDD?
    • What’s TDD
    • Benefits of TDD in an Embedded System Context
  2. Decoupling – The Art of Decreasing Links and Dependencies in order to Achieve Unit Testability
    • Why:
      • Facilitates Testing
      • Facilitates Extension/Replacement
        • Variants
      • Facilitates Porting
    • Architecture with Decoupling in mind
      • Legacy – How to Tackle a Monolith
      • Blank Paper – Just go for it!
      • Hybrid – Legacy and New Features in Harmony
  3. Designing Code with Testability in mind
    • The Fewer Execution Paths, the Better!
    • Controlling Behavior – or avoiding if-else
      • Function Pointers
      • Tables
  4. Embedded TDD Strategies – an Overview
    • Dual Targeting – Target- vs. Development Environment
    • Mocking – Provide and Expect
    • Dealing with Legacy Code

Önskar du mer information?

Behöver du en offert, information eller råd. Kontakta oss!