ExMachina is part of the thoughtbot Elixir family of projects. ExMachina makes it easy to create test data and associations. It works great with Ecto, but is configurable to work with any persistence library. And start the ExMachina application. For most projects (such as Phoenix apps) this will mean adding :ex_machina to the list of applications in mix.exs. You can skip this step if you are using Elixir 1.4 or later. Add your factory module inside test/support so that it is only compiled in the test environment. build/2 is a function call. As such, it gets evaluated immediately. By default, ExMachina will merge the attributes you pass into build/insert into your factory. But if you want full control of your attributes, you can define your factory as accepting one argument, the attributes being passed into your factory.

Features

  • Full control of factory
  • Delayed evaluation of attributes
  • Non-map factories
  • Split factories into separate files
  • Ecto Associations
  • Flexible Factories with Pipes

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow ExMachina

ExMachina Web Site

You Might Also Like
Component Content Management System for Software Documentation Icon
Component Content Management System for Software Documentation

Great tool for serious technical writers

Paligo is an end-to-end Component Content Management System (CCMS) solution for technical documentation, policies and procedures, knowledge management, and more.
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of ExMachina!

Additional Project Details

Programming Language

Elixir

Related Categories

Elixir Software Development Software, Elixir Software Testing Tool

Registered

2022-10-07