Custom code is a lightweight scripting option that gives you more flexibility inside your test. Current functions supported in custom action:

{email} - Autonomously generate a random email address.

{last_name} - Autonomously generate a random first name.

{first_name} - Autonomously generate a random first name.

{password} - Autonomously generate a random set of characters and numbers.

{today} - Set today's date in the format MM/DD/YYYY.

You can always append a static text to you dynamically generated one. For example, a common use case we see is the need to create a random email address with your domain name:

function name (){

var stringLen = 7

var result = '';

var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';

for ( var i = 0; i < stringLen; i++ ) {

result += characters.charAt(Math.floor(Math.random() * characters.length));

}

return result + "@yourdomain.com"

}

Need additional custom actions? Tap the chatbot and let us know or send an email to your contact person at 21.

Did this answer your question?