Custom code is a lightweight scripting option that gives you more flexibility inside your test. Custom code is expected to be a function. When the custom code is executed, the function will be invoked, and the result will be stored in the specified variable.

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 + ""

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?