and more in a single search tool across platforms. Read the announcement here. |
02/03/2023 12:24 AM - edited 02/03/2023 12:25 AM
Hi,
Is there any other way to check the system username generation code that we have written, instead of creating a user everytime?
We have a lot of use cases in our system username generation code, and to test all of it, we may have to create a lot of users.
Just as how we can test email generation via User Update rules and username generation by attaching a workflow to create user form, and then rejecting the approval so that too many redundant users do not get created.
Is there any such method to test the system username generation?
02/03/2023 12:48 PM
You can create test user and test
02/03/2023 03:58 PM
Since you're trying to check if the system username is getting generated on not, kindly try to use the same logic in email generation rule and concat the domain part. Trigger the email generation rule through user update rule for a test user. Once the email is generated, validate the pre- domain part of the email got generated as per your logic or not. EX: if email generated is abc@test.com, validate if 'abc' is generated as per your system username generation logic used.
Please try if this approach serves the purpose instead of creating new user every time you're testing the system username generation logic.
Thanks