0

How can I run multiple test cases in a single test suite independent of the other without relaunching the application. I am currently using only single it() function.

it('', async function(){ ...menutestcase, ..homescreenTestcase, ..SettingsTestcase, ...});

I want to run all test case independently, that means, if one test fails, the other will be continued. Currently this feature can be achieved using multiple it() functions for each test case. like

it('', async function(){ ...menutestcase);
it('', async function(){ ...homescreenTestcase,);

but the problem is that, for every it() function call , the app relaunches for every it() function call and I have to login each time the app launches.

Please help if there is any way to fix this.

abdul
  • 340
  • 6
  • 18

1 Answers1

0

gone through the reference https://github.com/wix/detox/blob/master/detox/test/e2e/f-device.js

I was using

// beforeEach(async () => await device.reloadReactNative());

Now, I commented it out and added device.reloadReactNative() only in the first test case. this way it worked.

// beforeEach(async () => await device.reloadReactNative());
it('', async function(){ 
         await device.reloadReactNative();
         ...menutestcase
  );
it('', async function(){ ...SettingsTestcase,);
it('', async function(){ ...homescreenTestcase,);
abdul
  • 340
  • 6
  • 18