Skip to main content

Generate Email Address

String genEmail(String prefix)

This custom command creates an email address based on a prefix string, which will be added to the beginning of the email address. The prefix is used to identify a specific participant within the test, such as their name or ID. The generated email address will have the format of {prefix}-{runID}@{domain}. The "runID" and "domain" parts of the email address will be automatically filled in.

caution

Manually formatting email address in this format is not recommended, as it may lead to errors in the test. Use this custom command instead.

public void test() {
String addr = genEmail("test");
System.out.println("Generated email address: " + addr);
}