【问题标题】:Detox: How to Provide bitrise build path to Detox configurations to test E2E on bitriseDetox:如何为 Detox 配置提供 bitrise 构建路径以在 bitrise 上测试 E2E
【发布时间】:2019-08-04 01:17:12
【问题描述】:

为了缩短构建时间,我们计划使用 bitrise 构建来测试 e2e 与 detox。

我发现我们可以在运行时使用 --device-name 提供设备名称 即 detox test -c android.emu.release --device-name Nexus 5X,但我找不到任何标志来提供 buildPath

是否可以以任何方式提供相同的内容?

【问题讨论】:

    标签: build path detox bitrise


    【解决方案1】:

    我找到了在运行时通过修改 e2e 文件夹中的 init.js 文件来配置 detox 的方法,如下所示

    import { BUILD_PATH } from 'react-native-dotenv';
    
    const detox = require('detox');
    const adapter = require('detox/runners/jest/adapter');
    
    const config = require('../package.json').detox;
    
    jest.setTimeout(120000);
    jasmine.getEnv().addReporter(adapter); // eslint-disable-line
    
    beforeAll(async () => {
      config.configurations['ios.sim.cli'].binaryPath = BUILD_PATH;
      await detox.init(config);
    });
    

    【讨论】:

      猜你喜欢
      • 2020-03-07
      • 2021-05-10
      • 1970-01-01
      • 2019-10-19
      • 2018-03-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-01-03
      相关资源
      最近更新 更多