Hello,
We have created a react-native mobile app that accesses data through an API implemented by us as well.
We would like to create some regression testing for the API but all the endpoints are protected via auth0, as we compare the user accessToken with the /userinfo endpoint, from auth0.
From this point, I’m wondering how could I do automated regression testing on our API? We can’t have the mobile app authenticating us and if I do a machine to machine authentication, it won’t go through our middleware because I’m sure /userinfo will fail, as a machine to machine won’t create a valid user + user accessToken.
What is the standard scenario to create those tests when the routes are protected by user accessToken? How to refresh this token each time a regression test is (automatically) starting?
Thank you in advance