How to write test cases for databse related functions

This page summarizes the projects mentioned and recommended in the original post on /r/elixir

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • ex_machina

    Create test data for Elixir applications

    The well known FactoryBot (FactoryGirl) from rails has a pretty good equivalent in Phoenix as ExMachina (https://github.com/thoughtbot/ex_machina) and does the job really well (thoughtbot is a pretty good and stable contributor too, so a nice Omakase plug-in!)

  • faker

    Faker is a pure Elixir library for generating fake data. (by elixirs)

    Generating the data structs for the views can be automated using libraries like Faker and Blacksmith - and honestly writing your own generators is a fun and easy exercise in really understanding your data and how it's manipulated (which I would argue is critical to writing clean software).

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

  • blacksmith

    Data generation framework for Elixir

    Generating the data structs for the views can be automated using libraries like Faker and Blacksmith - and honestly writing your own generators is a fun and easy exercise in really understanding your data and how it's manipulated (which I would argue is critical to writing clean software).

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts