IntelliJ IDEA
 
Get IntelliJ IDEA

Generate test data

Last modified: 03 December 2024

Some tests rely on test data, and IntelliJ IDEA can generate it for you. It might be names, dates, email addresses, passwords, hostnames, and so on. You can quickly insert a single entry or use more advanced options to generate massive files in CSV, JSON, or any other custom format.

In addition to predefined dictionaries, you can use a custom one.

The Test Data plugin also supports regular expressions. To use them, you have to create a regex-based generator.

After you have specified a custom dictionary or a regex, they appear in the Generate menu under Custom. You can use them to generate literals just like with the predefined generators.

Custom generators

If you need to generate multiple entries in a specific format, that's also possible. The Test Data plugin allows you to create a custom generator that handles bulk data generation and custom formats.