The calabash-android gem provides a command to automatically generate a standard Cucumber project sample. We are now ready to write our first test and make sure that our installation is completed. Then, run:Ĭalabash-android build /path_your_app/app_name.apk Which will use your default keystore to resign your app. We are now ready to write and run our first automated acceptance test!īefore all, we'll need to sign our packaged application file (.apk file) and build a test server using the same keystore.Ĭalabash-android resign /path_your_app/app_name.apk (for more details about this step, check the installation page on the calabash-android Github repository page) You need to have Ruby installed on your machine. Set PATH=%PATH% %ANDROID_HOME%\tools %ANDROID_HOME%\platform-tools Set ANDROID_HOME=C:\YOUR_PATH_TO\android-sdk-windows Type the following lines in the Windows console: (don't forget to run the "source" command on your ".bash_profile" file to take the modifications into account) bash_profile file:Įxport ANDROID_HOME=/YOUR_PATH_TO/android-sdkĮxport PATH=$ANDROID_HOME/platform-tools:$PATH However, to make calabash-android work, you'll have to define the ANDROID_HOME variable in your system.Īdd the following lines in your. It has been already done all over the Internet, including obviously the official Android SDK website, so just follow this link. I am not going to describe here the full installation process of the Android SDK. Furthermore, the source code of this application is open-source (get it here) and it's nearly indispensable to have an access to the source code when you have to simulate the users actions on your application.īefore going further, you will need to setup the Android SDK (if you are using your development environment, it should be already done) and the calabash-android gem on your machine. I thought it would be more relevant to use a real application rather than a simple one like a calculator or a random sample, because it would be closer to your own real-life case, with the same difficulties you will -surely- encounter when automating your own tests. In this tutorial, I will take the Wikipedia Android application as an example to write my acceptance tests. HipTest, our test management platform in the cloud, to write and export our tests cases as executable files- Calabash, and more precisely, the calabash-android gem, to interact with the GUI of our application and to automate the tests steps we will write in HipTest In this step-by-step tutorial, we are going to see how to write and execute automated acceptance tests for an Android application. To do this, we are going to use these tools:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |