godaddy / ekke

Ekke is a test runner for React-Native, it allows you to execute your test code directly on the device enabling you to test in the same environment as your production users.
MIT License
133 stars 9 forks source link

Nothing happens #27

Open GabeConsalter opened 5 years ago

GabeConsalter commented 5 years ago

Hi. I made an app to try use Ekke and I'm having a problem that when I run it nothing happens.

image

Waiting minutes and nothing changes in console, what could be happening?

3rd-Eden commented 5 years ago

Sorry for the lack of responses from my side here. It seems like these issues have slipped through while I was on vacation.

What I'm guessing here is that you didn't start the iOS simulator , or android simulator your self. The project doesn't start it automatically for you as I made the assumption that most people will have that running already.

GabeConsalter commented 5 years ago

Hi @3rd-Eden, thank you for the response and sorry for the delay. I'm running test with app running on android device.

3rd-Eden commented 5 years ago

@GabeConsalter Are you running it on a physical device or an emulator? We currently follow the recommendations of the official Android simulator to use 10.0.2.2 as host loopback interface: https://developer.android.com/studio/run/emulator-networking so the <Ekke /> component in your app can communicate with your machine, if this address is different for you, or if you are using a physical device you might need to override the default hostname that we attempt to access:

You can configure this by supplying a hostname prop to the <Ekke /> component with the correct hostname or IP address over which it can communicate with your machine that started the ekke CLI to the tests:

<Ekke hostname="192.168.1.2" />
GabeConsalter commented 5 years ago

@3rd-Eden make sense but didn't work for me.

I was trying on a physical android device and now I tried on an android emulator. When I run react-native run-android I've the connection info:

...
info Starting the app on "192.168.56.103:5555"...
...

So I changed my App to:

const App = () => {
  return (<>
    <Ekke hostname="192.168.56.103" port={5555} />
    <View>
      <Text>Ekke test</Text>
    </View>
  </>);
};

When I run test nothing happens again.