-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can we run Detox directly using apk/ipa independent of react-native app #3188
Comments
Make sure to specify also |
At Hudl we use the same pre-built APK (and androidTest APK) to run Detox Tests across multiple projects. As suggested by @noomorph above you need to build an APK as well as an androidTest APK. Your gradle command to generate these APKs would look something like this... ./gradlew clean assembleRelease assembleAndroidTest -DtestBuildType=release This will result in 2 APKs being generated which you can then reference in your "binaryPath": "path/to/your/apk/SomeApp.apk",
"testBinaryPath": "path/to/your/apk/SomeApp.apk-androidTest.apk" For iOS you just need the xcodebuild -quiet -workspace SomeApp.xcworkspace -scheme SomeApp -configuration Release -sdk iphonesimulator -derivedDataPath build/ Then you can reference the "binaryPath": "path/to/your/app/SomeApp.app" Hope that helps 😄 Also, I'm thinking this would have been a great Stack Overflow question as opposed to a Github issue 👍 |
Thanks for your response @noomorph @mrbrentkelly .Yes, I can sense where we're going regarding Build configuration (Building app). Just forget the build part. My question is : I have an app already (.apk / .ipa) . Now can i directly use this app and run detox test in simple detox project without dummy react-native project. ( refer screenshot attached above)If possible , Guide me on steps. |
Yes you can. All you need to do is have Detox configured in your project. Detox works in 2 parts; build and test. If you already have your Android APKs and iOS app created then you don't need to run the Detox |
@Avinash-Kannan Generally, you can use Detox for testing using existing binary files (put in other words, Please close the issue if that answers your question. |
Thanks for your brief response @d4vidi . My question is, similar to Appium, can we use only the path of apk or ipa in detox to run e2e tests? |
In that case, the answer is yes. Here is a good example of that practice: |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions! For more information on bots in this reporsitory, read this discussion. |
The issue has been closed for inactivity. |
getting error on running detox test The test APK could not be found at path: '/Users/axb/project-name/androidTest/project-name/ |
Hi @d4vidi, I can't find the example project. |
Hi @Avinash-Kannan I am looking for the same solution, are you able to setup a Detox test outside the react-native project? |
Hi @Avinash-Kannan , are you able to do the setup ? |
Description
Our Project involves a requirement where we need to generate Artifact( apk/ipa) as part of Dev(react-native app) and use generated apk/ipa to run detox in emulator for QA independent of any react-native app.
We generated artifact(apk) and provided .apk file path in binaryPath in separate Detox -Jest project (not a react-native project). But we couldn’t run detox test successfully.
Kindly guide us on possible ways/ solutions to install apk/ipa directly and run scripts using Detox in emulators
Environment
19.4.2
17.0.2
0.67.1
14.17.0
Android & iOS
latest
jest-circus
The text was updated successfully, but these errors were encountered: