wix / Detox

Gray box end-to-end testing and automation framework for mobile apps
https://wix.github.io/Detox/
MIT License
11.04k stars 1.91k forks source link

command in custom flavors #4272

Open YOEL311 opened 8 months ago

YOEL311 commented 8 months ago

Description

from your guide

https://wix.github.io/Detox/docs/introduction/project-setup

On the other hand, if your app has extra [productFlavors](https://developer.android.com/studio/build/build-variants#product-flavors) (let's imagine you have driver and passenger flavors of a taxi application), then you should rewrite your apps config for both debug and release configurations, e.g.:

   apps: {
     'driver.android.debug': {
       type: 'android.apk',
-      binaryPath: 'android/app/build/outputs/apk/debug/app-debug.apk',
+      binaryPath: 'android/app/build/outputs/apk/driver/debug/app-driver-debug.apk',
-      build: 'cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug',
+      build: 'cd android && ./gradlew assembleDriverDebug assembleDriverDebugAndroidTest -DtestBuildType=debug',
     },
     'passenger.android.debug': {
       type: 'android.apk',
-      binaryPath: 'android/app/build/outputs/apk/debug/app-debug.apk',
+      binaryPath: 'android/app/build/outputs/apk/passenger/debug/app-passenger-debug.apk',
-      build: 'cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug',
+      build: 'cd android && ./gradlew assemblePassengerDebug assemblePassengerDebugAndroidTest -DtestBuildType=debug',
     },

but in this case which command do I need to start the detox test or build? this not work

detox build --configuration android.emu.debug
stale[bot] commented 6 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest Detox and report back.

Thank you for your contributions!

For more information on bots in this repository, read this discussion.