Android NDK - how to run tests using Catch C++ Test Framework - android-studio

How to configure cmake/gradle to quickly run tests using Catch Test Framework inside Android Studio? Ideally, with a single click or using a shortcut.

Related

KMM Project Build for iOS Without Running

Maybe I'm just missing something but is there a way to trigger the iOS build in Android Studio for a KMM project that doesn't launch the simulator once the build is done?
When looking at the iosApp run configuration I see it has "Build iOS application" listed under "Before Launch" which makes me suspect this is possible but I didn't see it listed as a gradle task or anywhere else I could think of.
I've been doing the iOS work in Xcode and when I make changes to the shared code I want to rebuild it without running the app (which I've been doing from inside Xcode).
Not exactly a solution, but I found that when you hit build in Xcode it builds the Kotlin code so any changes to the shared module are included automatically. No need to do iOS builds from Android Studio.

kotlin multiplatform testing does not work in new project template

I'm trying to follow the steps on https://kotlinlang.org/docs/kmm-create-first-app.html#run-tests-on-android to get started with multiplatform development. Except no tests are run when I click the icon in the gutter or when I use gradle test

The difference between running tests from AndroidStudio and gradle task

I have local tests which use mockito and powerMockito in my project. There are about 300 of them.
When I run them from the Android Studio (Run -> Run test configuration), all of them passed.
But our CI system launch it using gradle task testDebugUnitTest, which fails about 90 of them with different errors.
The question is: what is the difference between these mechanisms?
Are you using Android Gradle(https://developer.android.com/studio/releases/gradle-plugin.html) plugin?
One must be aware that Android Studio build system is based on Gradle, and the Android plugin for Gradle adds several features that are specific to building Android apps. Although the Android plugin is typically updated in lock-step with Android Studio, the plugin (and the rest of the Gradle system) can run independent of Android Studio and be updated separately.
Official docs here: https://developer.android.com/studio/releases/gradle-plugin.html
So, if there are version and platform related differences, we should expect the results to be different.
Hope this helps!

NUnit Test Adapter 2 assembly not found

I'm facing with a strange issue with Visual Studio 2012 Update 5.
I have to add Unit tests to an existing project and I have installed NUnit 2 Test Adapter via Tools->Extension Manager.
The intallation works fine and Visual studio is restarted but I cannot find the NUnit assembly to add to my test project.
Where I'm wrong?
Thanks
The adapter is... well, an adapter... It allows you to run NUnit tests within Visual Studio by making them look like tests that VS understands.
In order to write NUnit tests, you have to actually install NUnit. Probably, the simplest way to do that is to use the NUnit nuget package, which will install it into your test project and add the necessary reference.

How to develop MobileFirst shell component using Android Studio

I am trying to understand on how to build a shell component native code on Android with MFP 7.1 using Android Studio instead of ADT.
I got the MyProject/components/ShellComponent/android/native folder created after build the component, but there is no option to Run As > Android Studio project. I wanted to add Java classes to run under src. The ADT version uses a separate project tree, but with Android Studio, there is no separate tree.
I also tried to open native folder as an Android Studio project and it shows an empty project.
I ran the ShellDevelopment sample on Android Studio and it works fine.
Open the project in Eclipse -> Right Click on Android environment -> Run As -> Android Studio Project. When Android Studio is opened DON'T MIGRATE PROJECT TO GRADLE!
Anyway it is not recommended! if you want to make changes - use Eclipse to make these changes.

Resources