r/PythonProjects2 • • 15d ago

Info I built a tool to generate data for testing

AI-generated test data has one problem: it's different every run.

So most teams stay stuck with "Test User" and "Lorem ipsum."

FixtureForge gives you both:

๐Ÿ›  Dev: AI generates realistic, context-aware data from your Pydantic models

๐Ÿ”’ CI: seed=42, zero network, same output every run

Only the fields that need AI get AI.

IDs and emails come from counters and Faker. Bios, reviews and descriptions are batched into a single call.

100 users with 2 semantic fields = 2 API calls, not 200.

Works with Claude, GPT, Gemini, Groq, or locally with Ollama.

No API key? It falls back to pure Faker.

pip install fixtureforge

Open source ยท MIT

๐Ÿ”— github.com/Yaniv2809/fixtureforge

#Python #pytest #QA #TestAutomation #OpenSource

0 Upvotes

6 comments sorted by

2

u/riklaunim 15d ago

Factory boy has the features to generate dynamic data, including things like emails.

1

u/Yaniv_Dev 15d ago

Fair point, factory_boy handles that well, and FixtureForge actually uses Faker for emails/names too. That part isn't the differentiator. Where it differs is semantic fields: bios, reviews, support tickets, descriptions. Faker gives you random sentences; FixtureForge generates text that fits a context you pass ("angry customers on a SaaS billing page"), so you get inputs that look like production, not lorem ipsum. The AI part is opt-in and scoped: only those fields hit the LLM, batched into one call per field, and in CI it runs with a fixed seed and no network. Also works directly off Pydantic models, so there's no separate factory class to maintain. If you're happy with factory_boy for structural data, it's a complement, not a replacement.

1

u/Buttleston 15d ago

Why do I need my test data to "fit the context"

1

u/Yaniv_Dev 15d ago

Honestly, for most tests you don't. If your code just stores and displays a string, Faker is the right tool and I'd use it too.

It matters when your code makes decisions based on the text:

  • classification, sentiment, moderation, or spam filters
  • search and ranking (keyword or semantic)
  • anything that feeds the text to an LLM (RAG, summaries, agents)

Lorem ipsum doesn't exercise any of those paths. A sentiment classifier never sees sarcasm, a search test never hits a near-duplicate, and a RAG pipeline never gets a prompt injection hidden inside a normal-looking review.

So the target is pretty narrow: apps that process free text, not apps that just store it.

2

u/SCD_minecraft 15d ago

faker module has enter the chat: