# Problem with random test data

DevFeed: [Problem with random test data](<https://devfeed.tech/articles/problem-with-random-test-data-27273.md>)

Original publisher: [Read original article](<https://blog.pchudzik.com/201706/random-test-data/>)

Published: 2017-06-13T00:00:00Z

Content type: opinion

Language: en

Sources: [Paweł Chudzik](<https://devfeed.tech/sources/pawe-chudzik.md>)

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [data](<https://devfeed.tech/topics/data.md>), [Groovy](<https://devfeed.tech/topics/groovy.md>)

Tags: [business-logic](<https://devfeed.tech/tags/business-logic.md>), [data](<https://devfeed.tech/tags/data.md>), [groovy](<https://devfeed.tech/tags/groovy.md>), [object](<https://devfeed.tech/tags/object.md>), [test-data](<https://devfeed.tech/tags/test-data.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tests](<https://devfeed.tech/tags/tests.md>)

## AI overview

The article explains why random test data can make tests hard to reproduce, understand, and maintain once domain objects contain business logic. It recommends using object factories to create valid, predictable test objects.

## Source excerpt

Some time ago I noticed new library in our code base - Random Beans which as the name suggests is a tool developed to easily create random data and random objects for testing purposes. Unfortunately, we used it in the wrong way. Here's how we backed up from the random test data to regain control over testing. Read more