SPA Conference session: Advanced Testing Techniques for Node.js

One-line description:A bouquet of interesting and helpful testing techniques.
Session format: Workshop style [read about the different session types]
Abstract:This workshop focuses on real life problems and solutions. It draws its inspiration from a web application we developed. This application is based on node.js with the express.js platform.

We tried to create the code with a naive and simplistic attitude. No fuzz. Only stuff that is useful and easy to trace. Of course, testing is a major concern and we developed some interesting techniques. Depending on the scope of the test we use different approaches and frameworks.

In the workshop, you will experience aspects like:

- How to stub indirect dependencies across layers (nested "require"s)
- How to configure an express based app for testing needs
- Testing DOM-based JavaScript when all you have is jade templates

In our session, we want to introduce these and other questions in detail, develop possible solutions with the participants, and finally present and discuss our solution.
Audience background:- Knowledge of JavaScript and Node.js required
- Relevant for developers
Benefits of participating:Attendees get insights into
- pitfalls and possible problems when testing a node.js application
- exchange with other participants about possible solutions
- how we solved these problems
Materials provided:All materials will be available at: Here you will find detailed installation information. Please be aware that the artifacts there are subject to change, so you should occasionally update it.
*Hint:* The materials contain the problems as well as our solutions to them, so peeking into the "solution" folders may spoil parts of the workshop for you.

Process:For each aspect, we will present the general problem, have a discussion with the audience on possible solutions for it, and we will demonstrate how we solved the problem.
Detailed timetable:The coverage of each aspect (presentation, discussion, solution) should take approx. 10 - 15 minutes, depending on the number of aspects we will focus on.
Outputs:If interesting new solutions come up in the session, we will document them in the wiki.
History:This session has not been presented before.
1. Nicole Rauch
msgGillardon AG
2. Andreas Leidig
msgGillardon AG