1) Is android_api/base/src/androidTest also getting built as part of scons?
No it is not getting build as part of scons. This is something that we are working on but is not done yet. 2) I wanted to know how Junit tests for android_api can be executed. Can it be executed through command line or do we need to run it through android studio ? please specify the step so I can run it. Two ways: First way go step-by-step: Edit the gradle.properties file add values: #actual values should come from scons build options. If the value was not specified use 0 except for target arch and release TARGET_ARCH=armeabi RELEASE=debug SECURED=0 WITH_CLOUD=0 RDMODE=0 WITH_MQ_BROKER=0 WITH_MQ_PUB=0 WITH_MQ_SUB=0 WITH_TRANSPORT_NFC=0 WITH_TRANSPORT_EDR=0 if behind proxy add systemProp.http.proxyHost=proxy-chain.intel.com systemProp.http.proxyPort=<your proxy port> systemProp.https.proxyHost=<your secure proxy host > systemProp.https.proxyPort=<secure proxy port> systemProp.http.nonProxyHosts=<proxy host exceptions> Run the test $ export ANDROID_NDK_HOME="<iotivity>/extlibs/android/ndk/android-ndk-r10d" $ cd <iotivity>/android/android_api $ dos2unix gradlew $ ./gradlew clean Start x86_64 emulator $ ./ gradlew installDebugAndroidTest alternate instructions $ ./gradlew assembleAndroidTest $ ./adb -s emulator-5554 install -r base/build/outputs/apk/base-debug-androidTest-unaligned.apk $ adb shell am instrument -w org.iotivity.base.test/android.test.InstrumentationTestRunner Second way: Cherry-pick this gerrit commit: https://gerrit.iotivity.org/gerrit/#/c/10991/ run scons build (recommend x86_64 for the script) cd android/android_api run_android_smoketests.py 3) Also, It will be very helpful if you can tell that How can we use Junit to find code coverage. I currently don?t know the answer to this question sorry. George From: Bell, Richard S Sent: Tuesday, November 8, 2016 11:42 AM To: nikhil.a7 at samsung.com; Nash, George <george.nash at intel.com> Cc: iotivity-dev at lists.iotivity.org Subject: RE: [dev] Running JUnit for android_api George, Can you response to these questions? Thanks, -Rick From: iotivity-dev-bounces at lists.iotivity.org<mailto:iotivity-dev-bounces at lists.iotivity.org> [mailto:[email protected]] On Behalf Of Nikhil Agrawal Sent: Tuesday, November 8, 2016 3:22 AM To: Kourt, Tim A <tim.a.kourt at intel.com<mailto:tim.a.kourt at intel.com>> Cc: iotivity-dev at lists.iotivity.org<mailto:iotivity-dev at lists.iotivity.org> Subject: [dev] Running JUnit for android_api Hi Mr. Tim Kourt, I am a Samsung (SRI-B) engineer. I am currently working on junit test cases for a service. I went through the android_api/base/src/androidTest which you have written to take some help. I have few doubts, so I want your help on this topic. 1) Is android_api/base/src/androidTest also getting built as part of scons? 2) I wanted to know how Junit tests for android_api can be executed. Can it be executed through command line or do we need to run it through android studio ? please specify the step so I can run it. 3) Also, It will be very helpful if you can tell that How can we use Junit to find code coverage. Thank You, Regards, Nikhil Agrawal SRI-B [cid:image002.jpg at 01D239C9.09C4AE20] [http://ext.samsung.net/mail/ext/v1/external/status/update?userid=nikhil.a7&do=bWFpbElEPTIwMTYxMTA4MTEyMjA1ZXBjbXM1cDY3ZDdiYTAzYmNiNTYwZWY2MjI0MWY1NmZhYzg5NjBiNSZyZWNpcGllbnRBZGRyZXNzPWlvdGl2aXR5LWRldkBsaXN0cy5pb3Rpdml0eS5vcmc_] -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20161108/ec3b256a/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 40267 bytes Desc: image002.jpg URL: <http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20161108/ec3b256a/attachment.jpg>
