Native app test in Android by CodeseptJS-Appium

Hi, I want to create a test case for native application in Android.

I have an apk, but if I specify the corresponding local folder in codecept.conf.js, the existing input data disappears and the desired test cannot be performed.

The test is new installing to Android?
How to set the app location in Android direct?

My Environment
macOS Catalina 10.15.4
Appium 1.15.1 (application)
node 13.12.0(can use 8)
codeceptJS 2.6.1
Android 7
Original Android machine
Original APK (no-uploaded store)

exports.config = {
tests: ‘VisualTesting_xxx_main.js’,
output: ‘./output’,
helpers: {
Appium: {
platform: “Android”,
desiredCapabilities: {
platformName: “Android”,
deviceName: “xxxxxx”, #Original Device Name
platformVersion: “7”,
automationName: “Appium”,
include: {
I: ‘./steps_file.js’,
bootstrap: null,
mocha: {},
name: ‘appium’,
translation: ‘ja-JP’,
plugins: {
retryFailedStep: {
enabled: true
screenshotOnFail: {
enabled: true

Try to move the app property into desiredCapabilities
This is my config:

helpers: {
    Appium: {
        platform: "Android",
        waitForTimeout: 20000,
        smartWait: 20000,
        device: "emulator",
        desiredCapabilities: {
            app: "",
            appWaitActivity: "",
            platformName: "Android",
            platformVersion: "8.1",
            autoGrantPermissions: true,
            noReset: true,
            adbExecTimeout: 120000,
            noSign: true

When I run any test, at first the APK is installed. Note that Android app’s activity must match appWaitActivity otherwise test fails.
More details on

thanks, I will test to set apk on local network.
should I set the property from Android network IP, and APK name only? or find APK folder by $adb shell pm list packages -f | grep <xxx.apk>?

Is there a way to test the installed APK directly?
I am not able to get APK from developers always, and if new installing APK is mandatory, I have to create restore procedure all the settings such as tools to be installed at the beginning of the test case.

Haven’t tried it, but absolute path to local folder with APK (to be reachable by Appium) should be working:

I think that installation of APK is mandatory. Appium helper has the method I.installApp, but I’m using it only for test of upgrade (original APK must be installed based on config file)

Automatic running of my tests is handled by a Jenkins job. When new APK is built (or when I run the job), the job starts an emulator from Android Studio (e.g. /home/autotest/Android/Sdk/emulator/emulator @Nexus_9_API_27 -read-only) and then run CodeceptJS tests (npx codeceptjs run --debug, I have 3 tests). When the tests finish, the job kills the emulator. Ideally the emulator should be started before each test (to have always same clear environment for every test), but so far I didn’t have issue with my simple setup.

thanks, So should I use a mirroring tool and OS automation…?

I check the helper configuration.
but don’t know why it is set appPackage: "".
for example, package:/data/app/ by adb request, “”?