Android Studio - Empty report when running local unit tests - android

Im running local unit tests (located under src/test/java) either by clicking the verification/test gradle project or from the command line "./gradlew test --continue". When the execution completes with failed tests i get the following message:
What went wrong:
Execution failed for task ':MyProject:testDebug'.
There were failing tests. See the report at: file:///Users/asaf.k/AndroidStudioBranch/MyProject/build/reports/tests/debug/index.html
But when i examine the html file it is always empty
Why ?

Related

Execution failed for task ':stripe_stripe-react-native:compileDebugKotlin'. after updating #stripe/stripe-react-native to 0.21.0

Im getting the following error after running yarn run android:
* What went wrong:
Execution failed for task ':stripe_stripe-react-native:compileDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
> Compilation error. See log for more details
i had to update #stripe/stripe-react-native because mi app was getting an error in the new xcode 14, my app is running well in ios, but in android im getting this error, please i need help...
i tried workarounds but didnt work

What's the meaning of gradle task compileRdm in android build gradle tasks?

What is the rdm meaning, why it's name is compileRdmDebugSources but not just compileDebugSources?
I search every, but I cant't found some docs about Kotlin rdm. And my CI report some error in this task:
* What went wrong:Execution failed for task ':MainProj:compileRdmDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork
> Cannot run program "/tools/jdk/1.8.0_161/jre/bin/java": error=7, Argument list too long

Gradle error trying to run nativescript app on android emulator on mac

I'm trying to run a nativescript app on android using tns run android
I'm always getting gradle error:
FAILURE: Build failed with an exception.
* Where:
Build file:
'/Volumes/My_SSD/myproject/platforms/tempPlugin/kinvey_nativescript_sdk/bui
ld.gradle' line: 28
* What went wrong:
A problem occurred evaluating root project '`kinvey_nativescript_sdk`'.
> Failed to apply plugin [class 'org.gradle.api.plugins.BasePlugin']
> Could not create service of type OutputFilesRepository using ExecutionServices.createOutputFilesRepository().`
I tried the following:
Run ./gradlew --stacktrace but I got this error:
Caused by: org.gradle.cache.LockTimeoutException: Timeout waiting to lock
execution history cache
(/Volumes/My_SSD/myproject/platforms/tempPlugin/kinvey_nativescript_sdk/.gr
adle/5.1.1/executionHistory). It is currently in use by another Gradle
instance.
Owner PID: unknown
Our PID: 50331
Owner Operation: unknown
Our operation:
Lock file:
/Volumes/My_SSD/myproject/platforms/tempPlugin/kinvey_nativescript_sdk/.gra
dle/5.1.1/executionHistory/executionHistory.lock
Deleted .lock files manually and re-ran tns run android but I got the same error again
Run
chmod R+x/Volumes/My_SSD/myproject/platforms/tempPlugin/kinvey_nativescript_sdk
Didn't fix the problem
The app runs fine on ios emulator and but not on android
I was having the same problem, looks to be related with this Gradle issue.
The workaround I found here is to move the project to the home folder (~).

Android studio has stopped my project with an error execution failed for task ':app:buildInfoDebugLoader'

I run my android project, everything is correct and an error comes to say execution failed for task as shown on details.
Details :
Error:Execution failed for task ':app:buildInfoDebugLoader'. > Exception while doing past iteration backup : Source C:\Users\Abdulwahid\AndroidStudioProjects\More1Activity\app\build\intermediates\builds\debug\13727462725703\classes.dex and destination C:\Users\Abdulwahid\AndroidStudioProjects\More1Activity\app\build\intermediates\builds\debug\13727462725703\classes.dex must be different
It just need to rebuild the project.

Jenkins failing robolectric test cases...!

I am trying to build my android project on Jenkins 2.0 server on Ubuntu machine.
I am running the following commands for that purpose:-
./gradlew clean (this is working fine)
./gradlew build (this is failing random number of test cases)
However I also install Jenkins 2.0 on my Windows 7 machine and run the same commands as above, and it was passing all test cases every time. I am not understanding what is wrong with that.
I did lot of debugging but could not find any solution, please help me to get rid out of this thing...!
This is my 34th build log on Jenkins
testPreCondition FAILED
java.lang.NullPointerException at ConfigurationFragmentTest.java:36
handleBackButtonPressing FAILED
java.lang.NullPointerException at ConfigurationFragmentTest.java:36
48 tests completed, 2 failed
:app:testDebugUnitTest FAILED
This is my 35th build log on Jenkins without making any code changes
> handleBackButtonPressing FAILED
java.lang.NullPointerException at ConfigurationFragmentTest.java:36
> testPreCondition FAILED
java.lang.NullPointerException at ConfigurationFragmentTest.java:36
> testPreconditions FAILED
java.lang.NullPointerException at UpdateTabFragmentTest.java:30
> testPreconditions FAILED
java.lang.NullPointerException at ServiceTabFragmentTest.java:29
> testPreConditionIsNotNull FAILED
java.lang.NullPointerException at HomeActivityTest.java:63
48 tests completed, 5 failed
:app:testDebugUnitTest FAILED
You should check the Jenkins console output for something like
"WARNING: No manifest file found " in the console output.
Those NPEs are typical for missing resources.
The most common source for failing robolectric builds on different environmnets is probably robolectric not beeing able to load any resources.
Since robolectric needs to know where your Android Manifest is, you may have to provide a extra robolectric.properties for the build
http://robolectric.org/configuring/

Categories

Resources