function generate_lastname() { var lastname = ""; var lower_alphabets = "abcdefghijklmnopqrstuvwxyz"; var upper_alphabets = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; var digits = "0123456789"; lastname += upper_alphabets.charAt(Math.floor(Math.random() * upper_alphabets.length)); for( var i=0; i < 8; i++ ) lastname += lower_alphabets.charAt(Math.floor(Math.random() * lower_alphabets.length)); for( var j=0; j < 3; j++ ) lastname += digits.charAt(Math.floor(Math.random() * digits.length)); return lastname; } function generate_firstname() { var firstname = "Runscope"; var digits = "0123456789"; for( var j=0; j < 3; j++ ) firstname += digits.charAt(Math.floor(Math.random() * digits.length)); return firstname; } var firstname = generate_firstname(); var lastname = generate_lastname(); var email = firstname + lastname + "@atko.com"; variables.set("okta_user_firstname", firstname); variables.set("okta_user_lastname", lastname); variables.set("okta_user_fullname",firstname + " " + lastname) var firstnameupdate = firstname + "update"; variables.set("okta_user_firstname_update", firstnameupdate); variables.set("okta_user_fullname_update",firstnameupdate + " " + lastname) variables.set("okta_user_email", email); variables.set("okta_user_title", "Engineer"); variables.set("okta_user_primaryphone", "415.123.4567");