Detroit.Code() Sessions tagged tdd

Awesome C#: Unit Testing

Unit testing can make you a faster developer. Good tests let us move forward more confidently, give us instant feedback when checking regression, and help us pinpoint bugs when things go wrong. In this workshop, we'll look at the qualities of good tests, including isolation, repeatability, runnability, and more. And we'll look at specific techniques that make our tests easy to ready, easy to write, and easy to run.

We'll go hands-on with TDD (Test-Driven Development) to see the red-green-refactor cycle in action. Some code is tricky to test: we'll look at how to test for exceptions and error states, and we'll use a mocking framework to create mocks and stubs. Tools include MSTest and NUnit (for testing) and MOQ (for mocking), but the skills easily translate to other frameworks.

Objectives 1. Why Unit Test? Getting the actual benefits 2. Characteristics of a good unit test and how to implement them (including isolation, repeatability, runnability, and more) 3. Basics of TDD 4. Parameterizing tests 5. Techniques for testing exceptions 6. Using a mocking framework to isolate dependencies

Pre-Requisites Basic understanding of C# and object-oriented programming (classes, inheritance, methods, and properties). In addition, experience with interfaces and other forms of abstraction is very helpful. No prior experience with unit testing is necessary; we'll take care of that as we go.

Speaker

Jeremy Clark

Jeremy Clark

Developer Betterer, JeremyBytes.com

Write Better JavaScript with TDD

JavaScript has become one of the most popular programming languages. Many of us who have been working with statically typed, OOP-orient languages like C# or Java have started working more and more in JavaScript. But while most of these developers who been using TDD in their previous language come to JavaScript, they often leave this practice behind. And it's understandable why. Developers who are familiar with unit testing in C# or Java can struggle with TDD in JavaScript. The language is different, the tooling is different, and all those cool frameworks that we use to build our applications can add complexity to the situation.

The good news is that unit testing your JavaScript is easy, and most frameworks have testability already built in! In this session, you'll see how to make sure your JavaScript is easy to test. You'll learn about the most modern testing tools that help you write tests, even for JavaScript that uses frameworks like jQuery, Angular, and React. And you'll see how TDD can help you start writing better JavaScript.

Speaker

James Bender

James Bender

Product Manager, Infragistics

Testing Embedded Code

Enterprise java and C# get all the love in the testing world. But if you write embedded software for microcontrollers, you too can get in on the fun! We'll walk through examples of test driven embedded code and look at different testing frameworks that can help you solve your problems.

Speaker

Clay Dowling

Clay Dowling

Agile Software Consultant, Pillar Technology

Advanced TDD with Mocks

All the talk about Test Driven Development is great, but how do you make that work when you have complex systems that need to interact? Either you have complex, brittle tests, or you can use a Mock version of your system. In this one hour session we will work through implementing a mock database connection and the tests around it.

Speaker

Clay Dowling

Clay Dowling

Agile Software Consultant, Pillar Technology