I would like to add integration testing/automated acceptance testing for a mobile app calling a registration API from the backend. I will register a sample user on the test feature then delete the user on tearDown. Something like this:
test('registration test'){
RegistrationRobot registrationRobot = RegistrationRobot();
registrationRobot.inputEmail('sample@email.com');
registrationRobot.inputPassword('SAMPLEPW');
registrationRobot.tapSignUpButton();
assert(NextScreen, isPresent);
}
tearDown(){
deleteUser('sample@email.com');
}
Is this considered bad practice?