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

Other Useful Business Software
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
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