O'Reilly logo

Functional Programming: A PragPub Anthology by Michael Swaine

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 22Building Test Data with Elixir

by Bruce Tate

In Chapter 21, A Testing Framework for Elixir, I described a new unit and functional test framework we’ve built. In this article, I’ll describe how we use macros to build fake test data.

At icanmakeitbetter, Elixir has made a huge difference. Because it is a functional language that fully supports concurrency and distribution, we are able to get much more performance out of our website. Elixir is also one of the first languages to support both a higher-level syntax and macros, and I’m going to talk about putting those features to good use to build beautiful test data.

Yes, I said beautiful.

Business applications need business data, and tests for those applications need fake data. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required