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('[email protected]');
registrationRobot.inputPassword('SAMPLEPW');
registrationRobot.tapSignUpButton();
assert(NextScreen, isPresent);
}
tearDown(){
deleteUser('[email protected]');
}
Is this considered bad practice?