I am writing automated test cases in Visual Studio 2017 test frame work. I am testing the ‘create user’ part of a web API. A user needs to be created with a unique email address. Once a user is created they cannot be deleted.
Is there way to write automated (run on check-in) test cases, that need unique input data for each test run?
In the example below Username, must be unique on each call. Username can be up to 30 characters long.
ProcessStudent( string StudentAuthId, string FirstName, string MiddleName, string LastName, string UserName, string UserPassword );
(My thoughts) Since there is no way (I can think of) to make this test atomic, there needs to be unique input values each time the test is run. This could be done by appending some version of a time stamp to the UserName passed in. I am not sure this is the best way of doing this so I am asking this question.