I am looking to setup automated end to end UI testing for React Native App and its my first time doing it using detox.
I followed exact steps as mentioned in this article:
https://varunon9.medium.com/e2e-testing-of-react-native-app-android-using-detox-a-step-by-step-guide-bfb520c1a9ac
But every time I try to run build command i.e: detox build -c android.emu.debug. I get the following error:
[Here is the console log from when I run the command]
[1]: https://i.stack.imgur.com/zbLlO.png
Any help would be greatly appreciated
I was able to solve this. It was a stupid mistake instead of ./gradlew in build command I was supposed to use just gradlew as that's how the file was saved inside my android folder of the project
Related
Could someone help me with the issue? I added in my project allure-kotlin for androidTests, and when I run them via command line: ./gradlew connectedEnvstageDebugAndroidTest folder "allure-results" in the android emulator doesn't exist.
Also, I created this folder manually and ran it again results were the same.
BUT, when I run any test via IntelliJ Idea (via "run" button), folder generating and report exists. And if I'll run tests via command line report will be generated as well, but just after when I'll run a test via the "run" button.
Could someone help me with it?
Thank you in advance!
I'm a developer developing react-native using VSC on Windows. The build succeeds, but it turns out not to run
The react-native run-android command printed BUILD SUCCESSFUL.
But unfortunately in the next line
Access is denied.
With only a message, the app is installed on the device, but it doesn't run. When I run it, I see the make sure blabla error screen that appears when there is no node server.
This problem eliminated my two days.
I want to get help.
Ps. Note that project asd is a new project for testing. If you look at the existing project and test project, I guess it might be Java configuration, but ... I am suffering because there is no proper solution.
I am trying to build my app using kivy, and it is looking great so far. Everything compiles and runs just fine with buildozer.
I am trying to incorporate ads into my app with AdBuddiz according to this website
https://github.com/kivy/kivy/wiki/AdBuddiz-Android-advertisements-integration-for-Kivy-apps
I am stuck in 4th step, as I it gives the error that says
jnius.jnius.JavaException: javaclass definition missing
I installed jnius by downloading this
https://github.com/kivy/pyjnius
and used the command: sudo python setup.py install
If you could help me fix this error or help me understand the error, I would appreciate so much.
Thank you.
The adbuddiz code won't run on the desktop, you have to run this stuff on the Android device. If you want to run the program without it on linux, put it in an if statement that checks kivy.platform.
I am working on a new project for Android. Currently, I am using Android studio as IDE. I need to run Unit test and System (CI) test flows which can be run on both Local machine (JVM) and Emulator/Real Device for instrumentation.
Note that I am running all unit tests via command line.
For get the code coverage of the Emulator/Real Device I am using Jacoco.
and running the following command: gradlew createDebugCoverageReport
However, I can't find any way to run the Local machine unit test with coverage report from command line.
The only way is to run it from the android studio by selecting "Run XXX with Code Coverage":
Can you please advise if it is possible to run local unit test from command line with coverage. And get the report as an html file?
Thanks,
Zachi
If I understood correctly, you are trying to run the tests with coverage ability of the IntelliJ-based Android studio.
It basicly can be done using a Command Line Tool of the IntelliJ.
You can read more about it here, but it generally allows you to accomplish everything that can be done from GUI via the command line:
IntelliJ creating command line tools
For more general info regarding the coverage of the IntelliJ tools you can read here:
IntelliJ Code coverage
Hope it helps, good luck.
At this moment there is no default task to create reporting for Junit (local) tests in the gradle Android tools.
However, it's easy to create those.
Just follow the instructions to integrate the custom jacoco.gradle file here:
https://gist.github.com/mrsasha/384a19f97cdeba5b5c2ea55f930fccd4
You will then have tasks like these: test[Flavor]UnitTestCoverage
So to generate the reports, you just have to:
$ ./gradlew test[Flavor]UnitTestCoverage
The report can be generated using the android studio, after you run the test with coverage the results window appears, click the button bordered with red
Check this image:
By running ./gradlew tasks in the terminal if you are using the gradle wrapper or gradle tasks you will have a list of the available verification tasks (see the screenshot below):
You can refer to this link for more thorough test command lines.
You can use testDebugUnitTest, run it as ./gradlew <your_module_name>:testDebugUnitTest and it will run tests related to this particular module + it will generate an html report under your_module/build/reports/tests/testDebugUnitTest folder, with the coverage.
I am trying to set up a CI environment with Jenkins and Robotium. I want to use the same project for both built and test, but seems so tricky to get all working. I was wondering if someone had something like that working and if it can publish at least build.gradle and the project structure. Thanks.
Have been running in production for a few months now. See this question for a sample project and video of how to use robotium with gradle.
https://stackoverflow.com/a/23295849/1965124
As for the jenkins side of things:
Install the android sdk on the machine that will be running jenkins
set up android home variable
install the android plugin
run the following tasks from inside a jenkins job: clean connectedAndroidTest
after running 1 build (it will fail the first time), change the local.properties file to point to the local installation of the android sdk.
Let me know if you need any more pointers, its not as hard as I initially thought it would be.
I configured TeamCity as CI server. Also, project builds by Gradle.
The main idea is to execute gradle connectedInstrumentTest, that task will execute all project's tests on all connected devices, then it will put the test results in standard ant-junit format, so then you can set Jenkins to parse app-folder/build/instrumentTest-results/connected/*.xml test results.
If you got more questions, you can post them to the comments.