Skip to content

mashimom/pseudo-random-test-data-generation

Repository files navigation

Pseudo Random Test Data Generation

A sample project for the article

ℹ️ This project is explained in the article: When you need to generate data for tests

This project was create using Gradle's init command:

gradle init --type java-application --test-framework spock

Minor changes to:

  • version of Spock being used bumped to latest.
  • plugins added idea, build-dashboard, project-report and ben manes' Versions
  • added Lombok

Then using the always 💖 SDKMan added recommended jdk, groovy, gradle versions. On how to take advantage of that see https://sdkman.io/usage#env.

It contains a single production class Book.
It is all about testing, Book is tested on BookSpec; there is a utility data generator at Generator and tests to verify it behaves appropriately GeneratorSpec

Special thanks to early reviewers!

About

Repository used in an article as example of pseudo random data generation for tests

Resources

License

Stars

Watchers

Forks

Packages

No packages published