2013/06/04

How to make testing work under Android Studio

(Geneve.Swiss)

It's such a pain to look for solutions for tasks on Android Studio. When can it be mature enough and more well documented for developers?

I would like to write some test cases for my small app, but I couldn't find a way for adding test cases into Android Studio project and have it run successfully.

After wandering around on the internet for a long time, eventually I found a link that did helped me out (see reference below). As Google I/O 2013 video said, a new android build system made of gradle is released, which will be more flexible, more powerful, more etc, etc. However, currently, it 's not well integrated into Android Studio. Some modification in Android Studio won't be directly reflected in gradle build scripts. Well... then, how do I know when I should modify build scripts my self? And to write it by myself, I have to learn groovy first, because that's the language Gradle used to write its build configuration files. How could I master these things in a short time...

Anyway, the solution for my pain point above is to modify build.gradle under the root directory of app project, and make sure all the instrument source folders are well set up. Now I can use cradle to run test cases and generate report files. However, I can't make it work in Android Studio still. orz...


REF:
http://blog.crowdint.com/2013/05/24/android-builds-on-travis-ci-with-gradle.html

沒有留言:

張貼留言

乩童警探 一二集

接連看了兩集。第一集還算新鮮,到了第二集就看得比較慢了。一來,劇情雖然常會提到乩童,但真的跟乩童又沒有什麼關係。第二集後半大概就猜出是怎麼一回事了,但還是很享受在作者解釋的過程。只是前面舖陳有點久,而且人物有點多,再加上我是斷斷續續的看,看到後來都快忘了誰是誰,或是誰曾經出過什麼...