appium-boilerplate: I can't run local android test
Hello, I have done :
- clone repo (master branch)
- put Android-NativeDemoApp-0.4.0.apk on folder ./apps
- run npm install
- trial run “npm run android.app”
But :

This is My wdio.android.app.conf.ts
import { join } from 'path';
import config from './wdio.shared.local.appium.conf';
// ============
// Specs
// ============
config.specs = [
'./tests/specs/**/app*.spec.ts',
];
// ============
// Capabilities
// ============
// For all capabilities please check
// http://appium.io/docs/en/writing-running-appium/caps/#general-capabilities
config.capabilities = [
{
// The defaults you need to have in your config
platformName: 'Android',
maxInstances: 1,
// For W3C the appium capabilities need to have an extension prefix
// http://appium.io/docs/en/writing-running-appium/caps/
// This is `appium:` for all Appium Capabilities which can be found here
'appium:deviceName': 'device',
//'appium:udid' : 'emulator-5554',
'appium:platformVersion': '11.0',
'appium:orientation': 'PORTRAIT',
'appium:automationName': 'UiAutomator2',
// The path to the app
'appium:app': join(process.cwd(), './apps/Android-NativeDemoApp-0.4.0.apk'),
// @ts-ignore
'appium:appWaitActivity': 'com.wdiodemoapp.MainActivity',
// Read the reset strategies very well, they differ per platform, see
// http://appium.io/docs/en/writing-running-appium/other/reset-strategies/
'appium:noReset': true,
'appium:newCommandTimeout': 240,
},
];
exports.config = config;
Environment (please complete the following information):
- Node.js version: [17.6.0]
- NPM version: [8.5.1]
- Platform: [Android]
- Platform version: [11.0]
- Appium Desktop version : [1.22.x]
- Emulator/Simulator/Real Device: [Emulator]
Please help and give me best practice to run test
Thank You
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 19 (11 by maintainers)
Hi @samaysimantbarik
Thanks for your response, but what did you change to make it work now? Your code and my code look the same, except for the
log-property.The new Appium Inspector uses a different basePath then a normal Appium server (Appium 1.x versions) would spin up. By default Appium Server uses
/wd/hub/, but it needs to be/. If you’ve installed Appium globally then you can then start a server with thisWhere:
appiumis the start-server command--base /tells Appium to use/instead of the default/wd/hubbasePath--relaxed-securitymeans to automatically download the ChromeDriver (amongst other things, see this)--log-timestampadds a nice timestamp to the logsRunning this will give this give the following logs
As you can see it will automatically start on port 4723, also the port that Appium Inspector uses.
I’m going to close this issue now because this is not related to this boilerplate anymore, but it’s still open for conversation