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
Self-hosted n8n: No-code AI workflows Icon
Self-hosted n8n: No-code AI workflows

Connect workflows. Integrate data

A free-to-use workflow automation tool, n8n lets you connect all your apps and data in one customizable, no-code platform. Design workflows and process data from a simple, unified dashboard.
Learn 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