본문 바로가기

2. Automation/2.6 Detox

Detox react-native automation testing framework

E2E (end to end) 테스트를 지원하는 React Native Javascript test framework.


React Native이다보니 당연히 cross-platform을 지원함.  아래 예제 코드를 보아하니 Jasmine과 유사 ㅎ

예제 코드

describe('Login flow', () => {
    
  it('should login successfully', async () => {
    await device.reloadReactNative();
    await expect(element(by.id('email'))).toBeVisible();
      
    await element(by.id('email')).typeText('john@example.com');
    await element(by.id('password')).typeText('123456');
    await element(by.text('Login')).tap();
      
    await expect(element(by.text('Welcome'))).toBeVisible();
    await expect(element(by.id('email'))).toNotExist();
  });
  
});


https://github.com/wix/detox

'2. Automation > 2.6 Detox' 카테고리의 다른 글

iOS typeText()  (0) 2018.08.14
Detox iOS System Pop up Control  (0) 2018.08.13