我正在尝试使用Selenium进行移动应用测试的自动化。 我使用了eclipse indigo和插件。 到目前为止,我尝试使用但我收到错误消息。
D:\Android\Android>java -jar selendroid.jar -app app.apk
Sep 24, 2015 3:50:58 PM io.selendroid.standalone.SelendroidLauncher main
INFO: ################# Selendroid #################
Sep 24, 2015 3:50:58 PM io.selendroid.standalone.SelendroidLauncher main
INFO: ################# Configuration in use #################
Sep 24, 2015 3:50:58 PM io.selendroid.standalone.SelendroidLauncher main
INFO: io.selendroid.standalone.SelendroidConfiguration@1270107[
port=4444
timeoutEmulatorStart=300000
supportedApps=[app.apk]
verbose=false
emulatorPort=5560
deviceScreenshot=false
selendroidServerPort=8080
keystore=<null>
keystorePassword=<null>
keystoreAlias=<null>
emulatorOptions=<null>
keepEmulator=false
registrationUrl=<null>
proxy=<null>
serverHost=<null>
keepAdbAlive=false
maxSession=5
maxInstances=5
registerCycle=0
noWebViewApp=false
noClearData=false
sessionTimeoutSeconds=1800
forceReinstall=false
logLevel=ERROR
deviceLog=true
serverStartTimeout=20000
printHelp=false
serverStartRetries=5
folder=<null>
deleteTmpFiles=true
]
Sep 24, 2015 3:50:58 PM io.selendroid.standalone.SelendroidLauncher launchServer
INFO: Starting Selendroid standalone on port 4444
Sep 24, 2015 3:50:58 PM io.selendroid.standalone.SelendroidLauncher launchServer
SEVERE: Error building server: Environment variable 'ANDROID_HOME' was not found
!
Exception in thread "main" io.selendroid.server.common.exceptions.SelendroidExce
ption: Environment variable 'ANDROID_HOME' was not found!
at io.selendroid.standalone.android.AndroidSdk.androidHome(AndroidSdk.ja
va:98)
at io.selendroid.standalone.android.AndroidSdk.platformToolsHome(Android
Sdk.java:87)
at io.selendroid.standalone.android.AndroidSdk.aapt(AndroidSdk.java:39)
at io.selendroid.standalone.android.impl.DefaultAndroidApp.deleteFileFro
mWithinApk(DefaultAndroidApp.java:107)
at io.selendroid.standalone.builder.SelendroidServerBuilder.deleteFileFr
omAppSilently(SelendroidServerBuilder.java:133)
at io.selendroid.standalone.builder.SelendroidServerBuilder.resignApp(Se
lendroidServerBuilder.java:142)
at io.selendroid.standalone.server.model.SelendroidStandaloneDriver.addT
oAppsStore(SelendroidStandaloneDriver.java:121)
at io.selendroid.standalone.server.model.SelendroidStandaloneDriver.init
ApplicationsUnderTest(SelendroidStandaloneDriver.java:155)
at io.selendroid.standalone.server.model.SelendroidStandaloneDriver.<ini
t>(SelendroidStandaloneDriver.java:94)
at io.selendroid.standalone.server.SelendroidStandaloneServer.initialize
SelendroidServer(SelendroidStandaloneServer.java:63)
at io.selendroid.standalone.server.SelendroidStandaloneServer.<init>(Sel
endroidStandaloneServer.java:52)
at io.selendroid.standalone.SelendroidLauncher.launchServer(SelendroidLa
uncher.java:65)
at io.selendroid.standalone.SelendroidLauncher.main(SelendroidLauncher.j
ava:117)
D:\Android\Android>set ANDROID_HOME=D:\Android\Android\sdk
D:\Android\Android>java -jar selendroid.jar -app app.apk
Sep 24, 2015 3:52:18 PM io.selendroid.standalone.SelendroidLauncher main
INFO: ################# Selendroid #################
Sep 24, 2015 3:52:18 PM io.selendroid.standalone.SelendroidLauncher main
INFO: ################# Configuration in use #################
Sep 24, 2015 3:52:18 PM io.selendroid.standalone.SelendroidLauncher main
INFO: io.selendroid.standalone.SelendroidConfiguration@1270107[
port=4444
timeoutEmulatorStart=300000
supportedApps=[app.apk]
verbose=false
emulatorPort=5560
deviceScreenshot=false
selendroidServerPort=8080
keystore=<null>
keystorePassword=<null>
keystoreAlias=<null>
emulatorOptions=<null>
keepEmulator=false
registrationUrl=<null>
proxy=<null>
serverHost=<null>
keepAdbAlive=false
maxSession=5
maxInstances=5
registerCycle=0
noWebViewApp=false
noClearData=false
sessionTimeoutSeconds=1800
forceReinstall=false
logLevel=ERROR
deviceLog=true
serverStartTimeout=20000
printHelp=false
serverStartRetries=5
folder=<null>
deleteTmpFiles=true
]
Sep 24, 2015 3:52:18 PM io.selendroid.standalone.SelendroidLauncher launchServer
INFO: Starting Selendroid standalone on port 4444
Sep 24, 2015 3:52:18 PM io.selendroid.standalone.io.ShellCommand exec
INFO: Executing shell command: D:\Android\Android\sdk\platform-tools\aapt.exe re
move D:\Android\Android\app.apk META-INF/MANIFEST.MF
Sep 24, 2015 3:52:19 PM io.selendroid.standalone.io.ShellCommand exec
INFO: Executing shell command: D:\Android\Android\sdk\platform-tools\aapt.exe re
move D:\Android\Android\app.apk META-INF/CERT.RSA
Sep 24, 2015 3:52:19 PM io.selendroid.standalone.io.ShellCommand exec
INFO: Executing shell command: D:\Android\Android\sdk\platform-tools\aapt.exe re
move D:\Android\Android\app.apk META-INF/CERT.SF
Sep 24, 2015 3:52:19 PM io.selendroid.standalone.io.ShellCommand exec
INFO: Executing shell command: D:\Android\Android\sdk\platform-tools\aapt.exe re
move D:\Android\Android\app.apk META-INF/ANDROIDD.SF
Sep 24, 2015 3:52:19 PM io.selendroid.standalone.io.ShellCommand exec
INFO: Executing shell command: D:\Android\Android\sdk\platform-tools\aapt.exe re
move D:\Android\Android\app.apk META-INF/ANDROIDD.RSA
Sep 24, 2015 3:52:19 PM io.selendroid.standalone.io.ShellCommand exec
INFO: Executing shell command: D:\Android\Android\sdk\platform-tools\aapt.exe re
move D:\Android\Android\app.apk META-INF/NDKEYSTO.SF
Sep 24, 2015 3:52:19 PM io.selendroid.standalone.io.ShellCommand exec
INFO: Executing shell command: D:\Android\Android\sdk\platform-tools\aapt.exe re
move D:\Android\Android\app.apk META-INF/NDKEYSTO.RSA
Sep 24, 2015 3:52:19 PM io.selendroid.standalone.io.ShellCommand exec
INFO: Executing shell command: C:\Program Files\Java\jdk1.7.0_71\jre\bin\jarsign
er.exe -sigalg MD5withRSA -digestalg SHA1 -signedjar D:\Android\Android\resigned
-app.apk -storepass android -keystore C:\Users\Soma0013\.android\debug.keystore
D:\Android\Android\app.apk androiddebugkey
Sep 24, 2015 3:52:19 PM io.selendroid.standalone.SelendroidLauncher launchServer
SEVERE: Error building server: An error occurred while resigning the app 'app.ap
k'.
Exception in thread "main" io.selendroid.server.common.exceptions.SessionNotCrea
tedException: An error occurred while resigning the app 'app.apk'.
at io.selendroid.standalone.server.model.SelendroidStandaloneDriver.addT
oAppsStore(SelendroidStandaloneDriver.java:123)
at io.selendroid.standalone.server.model.SelendroidStandaloneDriver.init
ApplicationsUnderTest(SelendroidStandaloneDriver.java:155)
at io.selendroid.standalone.server.model.SelendroidStandaloneDriver.<ini
t>(SelendroidStandaloneDriver.java:94)
at io.selendroid.standalone.server.SelendroidStandaloneServer.initialize
SelendroidServer(SelendroidStandaloneServer.java:63)
at io.selendroid.standalone.server.SelendroidStandaloneServer.<init>(Sel
endroidStandaloneServer.java:52)
at io.selendroid.standalone.SelendroidLauncher.launchServer(SelendroidLa
uncher.java:65)
at io.selendroid.standalone.SelendroidLauncher.main(SelendroidLauncher.j
ava:117)
Caused by: io.selendroid.standalone.exceptions.ShellCommandException: Error exec
uting shell command: C:\Program Files\Java\jdk1.7.0_71\jre\bin\jarsigner.exe -si
galg MD5withRSA -digestalg SHA1 -signedjar D:\Android\Android\resigned-app.apk -
storepass android -keystore C:\Users\Soma0013\.android\debug.keystore D:\Android
\Android\app.apk androiddebugkey
at io.selendroid.standalone.io.ShellCommand.exec(ShellCommand.java:53)
at io.selendroid.standalone.builder.SelendroidServerBuilder.signTestServ
er(SelendroidServerBuilder.java:296)
at io.selendroid.standalone.builder.SelendroidServerBuilder.resignApp(Se
lendroidServerBuilder.java:154)
at io.selendroid.standalone.server.model.SelendroidStandaloneDriver.addT
oAppsStore(SelendroidStandaloneDriver.java:121)
... 6 more
Caused by: io.selendroid.standalone.exceptions.ShellCommandException:
... 10 more
D:\Android\Android>
是否有任何文件可以参考selendroid测试