DEV Community

Cover image for I built a tool to generate relationship-aware test data for Database (no seed scripts)
Dhanmoni Nath
Dhanmoni Nath

Posted on

I built a tool to generate relationship-aware test data for Database (no seed scripts)

I wanted to share a side project I’ve been working on and get some honest feedback from the community.

The idea came from a problem I kept running into - both at work and on my own side projects. Features would work perfectly in development, tests would pass, and everything would seem fine. But once the same code hit production, issues would start appearing. More often than not, the problem wasn’t the code - it was the data.

In development and testing, our datasets were usually small, clean, and unrealistic. Seed scripts helped initially, but as the application grew, schemas evolved, and relationships became more complex, those scripts became harder to maintain. Updating or rewriting scripts for every collection or schema change was time-consuming, easy to postpone, and often skipped entirely.

That frustration is what led me to start building Drawline.

What Drawline Does

Drawline is designed to make working with realistic test data easier:

  • You can connect an existing database or start with a fresh project
  • It automatically infers the database structure and relationships
  • You can visualize and tweak the schema using a visual interface
  • With one click, it populates a dev or test database with realistic, relationship-aware data
  • Schema versions can be tracked and restored, similar to how version control works for code

The goal is to help developers get meaningful data early-for testing, debugging, and demos - without having to write or constantly maintain seed scripts.

The product is still early, but I’m already using it for my own projects and iterating based on real usage.
If you’re curious, you can check it out at Drawline.

I’d Love Your Feedback

I’m sharing this not as a pitch, but to learn from other developers who’ve dealt with similar problems:

  • How do you currently handle test data for web applications?
  • Is this something you’d actually use, or do existing tools and scripts work well enough for you?
  • What would make a tool like this a hard “no”?

Thanks for reading, and I’d really appreciate any feedback or thoughts.

Top comments (3)

Collapse
 
sauvik_nath_98 profile image
Sauvik Nath

This looks promising @dhanmoni. How do you currently generate and maintain realistic test data as your schema evolves?

Collapse
 
dhanmoni profile image
Dhanmoni Nath

Without this tool, i used to generate scripts. But it was time consuming. Needed to provide the structure and also change it everytime something changes in schema. Now I just connect the DB to Drawline and it automatically handles everything. Now I just click populate button and the selected collections get populated within seconds.

Collapse
 
sauvik_nath_98 profile image
Sauvik Nath

This resonates a lot. Maintaining seed scripts as schemas evolve is honestly one of those things everyone knows is painful but keeps putting off until it breaks.

How does Drawline handle more complex relationships (many-to-many, self-referencing tables, optional foreign keys)?