How to use firebase TestLab with react native

Viewed 5219

I was trying to run a robo test for my react native app on firebase TestLab, but I couldn't get the robo test pass login.

The first problem is that it doesn't type in email and password.

In my js file I had:

<Input ... testID="usernameInput" />
<Input ... testID="passwordInput" />

and I put this in my firebase console

enter image description here

However, it didn't work at all. I checked the video recording, it was not typed in.

Second problem is that even if I hard code my username and password in debug apk, it won't even click on the login button which is defined as:

<Button onClick={() => {this.handleLogin()}}>Login</Button>

I wonder what is happening here. Did anyone ever got firebase TestLab robo test working with react native app?

2 Answers

My suggestion is to do one of these:

  1. Create a "deep link" with a long random key that will auto-login as a test user to your app (and bypass the login flow), you can provide this deep link to the robo test as an initial start point. (e.g. myapp://6zOOT9b1duKykHqE8bLFROGymYQDsRXn)

  2. Create a "special" binary to test using the robo test which has the user name and password for your test user as a default in the text inputs (so the robo test will just sign in by clicking on the button)

Related