Кто настраивал Cucumber (Calabash) для тестирования Android app ?
а есть какие-то непонятные моменты в инструкции https://github.com/calabash/calabash-android/blob/master/README.md или просто что-то не получается сделать?
Когда собираю с помощью Ant, то просит указать key.store файл:
-sign:[signjar] Signing JAR: C:\Users\htl\calabash-android\bin\Test_unsigned.apk to C:\Users\htl\calabash-android\bin\Test.apk as androiddebugkey[signjar] jarsigner error: java.lang.RuntimeException: keystore load: C:\Users\htl\.android\debug.keystore (The system cannot find the file specified)
По указаному пути нету файла такого.
В "build.properties" есть такое:
#You might have to update these valueskey.store=${user.home}/.android/debug.keystorekey.store.password=androidkey.alias=androiddebugkeykey.alias.password=android
А как ёго создать то правильно ? Без него никак ?
Пробовал так:
keytool -list -alias androiddebugkey -keystore "C:\android" -storepass android -keypass android
Выдаёт:
keytool error: java.lang.Exception: Keystore file exists, but is empty: C:\android
С этими траблами разобрался, теперь другое вылазиет:
ant test - запустить тестовый скрипт
[exec]
[exec] Scenario: As a valid user I can log into my app # features\login_dummy.feature:2
[exec] 66 KB/s (311570 bytes in 4.588s)
[exec] 2012-04-12 15:53:09 - Is first scenario - reinstalling apps
[exec] 2012-04-12 15:53:09 - Uninstalling: sh.calabash.test.test
[exec] 2012-04-12 15:53:11 - Success
[exec]
[exec] 2012-04-12 15:53:11 - Uninstalling: sh.calabash.test
[exec] 69 KB/s (311570 bytes in 4.396s)
[exec] 2012-04-12 15:53:12 - Failure
[exec]
[exec] 2012-04-12 15:53:12 - Installing: bin/Test.apk
[exec] 2012-04-12 15:53:23 - Success
[exec] 2012-04-12 15:53:23 - Installing: Test.apk
[exec] 2012-04-12 15:53:29 - #Failure
[exec] 2012-04-12 15:53:29 - '"C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" install Test.apk ' said:
[exec] 2012-04-12 15:53:29 - pkg: /data/local/tmp/Test.apk
[exec]
[exec] Failure [INSTALL_FAILED_ALREADY_EXISTS]
[exec] Could not install app Test.apk (RuntimeError)
[exec] C:/Users/htl/calabash-android/features/support/app_installation.rb:12:in `install_app'
[exec] C:/Users/htl/calabash-android/features/support/app_installation_hooks.rb:11:in `Before'
[exec] unexpected return (LocalJumpError)
[exec] C:/Users/htl/calabash-android/features/support/app_life_cycle_hooks.rb:3:in `Before'
[exec] When I press "Login" # features/step_definitions/press_button_steps.rb:17
[exec] Then I see "Welcome to coolest app ever" # features/step_definitions/assert_steps.rb:5
[exec] 2012-04-12 15:53:29 - Closing connection to test
[exec] uninitialized class variable @@client in Object (NameError)
[exec] C:/Users/htl/calabash-android/features/support/app_life_cycle.rb:20:in `disconnect_from_test_server'
[exec] C:/Users/htl/calabash-android/features/support/app_life_cycle_hooks.rb:25:in `After'
[exec]
[exec] Failing Scenarios:
[exec] cucumber features\login_dummy.feature:2 # Scenario: As a valid user I can log into my app
[exec]
[exec] 1 scenario (1 failed)
[exec] 2 steps (2 skipped)
[exec] 0m19.709s
пробовал вручную поставить через "adb install <APPNAME.APK>" - не идет
У вас в build.properties есть что-то вроде следующего?
tested.package_name=io.your.app
tested.main_activity=io.your.app.MainActivity
tested.project.apk=YourApp.apk
P.S. А вручную сработает так: adb install -r <APPNAME.APK>