How to set the environment for testing an apk file only in Appium?

Hello everyone.

I really need a help and support. I need to test ang apk file and and ios application, I have to set up the settings and environment for testing an apk file in Appium. I have read that the Appium can perform test for an .apk file, can someone help me in setting up? I cannot run the test, I don’t know what to do, when I click Run in Appium, it says that “Appium server process ended”, what does that mean? Thank you for your response.

1 Like

Try to post also all your configuration:
OS, Client version (ruby, python, etc), Server version, etc.

Hello, I’m using Windows 8, for the client version, I don’t know…
I also connected an android device, I checked it in cmd, it is already connected, but I don’t know how to start the test.

By the way, how to test in Appium using an emulator? I already installed eclipse and android studio.

Paste full log from the server when you press Run

Checking if an update is available
Update not available
Launching Appium server with command: C:\Program Files (x86)\Appium\node.exe lib\server\main.js --address --port 4723 --app --avd --platform-name Android --platform-version 22 --automation-name Appium --log-no-color
usage: main.js [-h] [-v] [–shell]
[–localizable-strings-dir LOCALIZABLESTRINGSDIR] [–app APP]
[–ipa IPA] [-U UDID] [-a ADDRESS] [-p PORT]
[-k] [-r BACKENDRETRIES] [–session-override] [–full-reset]
[–no-reset] [-l] [-lt LAUNCHTIMEOUT] [-g LOG]
[–log-level {info,info:debug,info:info,info:warn,info:error,warn,warn:debug,warn:info,warn:warn,warn:error,error,error:debug,error:info,error:warn,error:error,debug,debug:debug,debug:info,debug:warn,debug:error}]
[–log-timestamp] [–local-timezone] [–log-no-colors]
[-G WEBHOOK] [–native-instruments-lib]
[–app-wait-package ANDROIDWAITPACKAGE]
[–app-wait-activity ANDROIDWAITACTIVITY]
[–android-coverage ANDROIDCOVERAGE] [–avd AVD]
[–avd-args AVDARGS]
[–device-ready-timeout ANDROIDDEVICEREADYTIMEOUT] [–safari]
[–device-name DEVICENAME] [–platform-name PLATFORMNAME]
[–platform-version PLATFORMVERSION]
[–automation-name AUTOMATIONNAME] [–browser-name BROWSERNAME]
[–default-device] [–force-iphone] [–force-ipad]
[–language LANGUAGE] [–locale LOCALE]
[–calendar-format CALENDARFORMAT] [–orientation ORIENTATION]
[–instruments INSTRUMENTSPATH] [–show-sim-log]
[–show-ios-log] [–nodeconfig NODECONFIG] [-ra ROBOTADDRESS]
[-rp ROBOTPORT] [–selendroid-port SELENDROIDPORT]
[–chromedriver-port CHROMEDRIVERPORT]
[–chromedriver-executable CHROMEDRIVEREXECUTABLE]
[–use-keystore] [–keystore-path KEYSTOREPATH]
[–keystore-password KEYSTOREPASSWORD] [–key-alias KEYALIAS]
[–key-password KEYPASSWORD] [–show-config] [–no-perms-check]
[–command-timeout DEFAULTCOMMANDTIMEOUT] [–keep-keychains]
[–strict-caps] [–isolate-sim-device] [–tmp TMPDIR]
[–trace-dir TRACEDIR] [–intent-action INTENTACTION]
[–intent-category INTENTCATEGORY] [–intent-flags INTENTFLAGS]
[–dont-stop-app-on-reset] [–debug-log-spacing]
[–suppress-adb-kill-server] [–async-trace]

main.js: error: argument “–app”: Expected one argument. null

Appium server process ended

It seems that you are trying to run a test, not only running the server, so if you are trying to run a test, you need to provide an .apk and also a devicName.

Try to look at the server log to find the issues :wink:

I think that’s the problem, I really don’t have an idea on how to use Appium. And yes, I want to run a test using apk file, can I ask what to do to run a test for apk file? I tried searching, but I couldn’t find any tutorial that would help me.

I made everything in mac so I’m not sure about what info exists for windows (but what I’m sure in is that there is a lot of).
Anyway I will do a little explanation:

To run a test is needed that you programmed one.
When you run a test it launch a driver instance which connects with the appium server, so for doing that the test requires some information like: Where is the apk, which platform will run, version, etc, etc. Those parameters for the driver are called capabilities, so try to find out how to pass those capabilities to appium driver from your test.

I hope this can be helpful for your beggining

1 Like

Thank you for sharing, because I only have .apk file, I was not the one who created this application, I’m just going to test it. :slight_smile:

No problem with that! you should be able anyways

Try using this framework,