IntelliJ IDEA
 
Get IntelliJ IDEA
You are viewing the documentation for an earlier version of IntelliJ IDEA.

Generate test data

Last modified: 10 August 2022

Some tests rely on test data, and IntelliJ IDEA can generate this data for you. This might be names, dates, email addresses, 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.

Test data 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.