- Newest
- Most votes
- Most comments
Hello QAtesterAWS,
Uploads are done via our CreateUpload API, which returns an ARN and an upload URL for use in uploading your app. When the app is uploaded, you can view the status of the upload via the GetUpload or ListUploads APIs. If the upload failed to process, you will see the reason why in the metadata.
To view the logs for your run or job, we provide the ListArtifacts API to allow you to fetch them. If using the console, they are several download links to view the artifacts for your job when it is finished. The URL for the console webpage that has your job and links to your artifacts will resemble: https://us-west-2.console.aws.amazon.com/devicefarm/home?region=us-west-2#/projects/xxxx-xx-xxxx/runs/xxxxx-xxxxx-xx-xxx/jobs/xxxxx
References
API reference - CreateUpload: https://docs.aws.amazon.com/devicefarm/latest/APIReference/API_CreateUpload.html
CLI Reference - ListUploads: https://docs.aws.amazon.com/cli/latest/reference/devicefarm/list-uploads.html
Developer Guide - Working with Test Reports: https://docs.aws.amazon.com/devicefarm/latest/developerguide/how-to-use-reports.html#how-to-use-reports-displaying-results
Hi,
I have looked through Test suite, Test spec output and Customer Artifacts but do not see any errors related to the apk.
In the logs it seems to boot up Appium just fine and attempt to runt the test but fails because app is unable to load, surely it should never get to this point if there is an issue with the app is this correct?
Hello QAtesterAWS,
As long as the app installs, it will enter the test phase of the testspec file. Generally, if the app fails to launch, you can check either the Appium logs, or the ADB / iOS crash reports for errors that may have occurred on the apps launch.
Hi,
I have already looked at the Appium logs and everything on there, it does not show any error or crashes. I have looked through it all numerous times and there is nothing to indicate anything is wrong.
Hello,
May you provide a run URL for the run where you are experiencing this problem so that we can see if there is an issue?
Hi,
This is the run URL: https://us-west-2.console.aws.amazon.com/devicefarm/home?region=eu-west-2#/projects/0a7b64a7-ea2f-4821-8901-1d0a174f3358/runs/11aa8104-3154-4b71-ba9b-a209736476e5
Hello QAtesterAWS,
From our side, your app shows that it was successfully installed on our side. The appium logs that were saved to your $DEVICEFARM_LOG_DIR show that the appium server started and was waiting for a request:
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
but it does not receive a POST /wd/hub/session request to start a session after this. Can you confirm that your test application is initializing a driver to start a session at localhost with port 4723? In webdriverio, that can be done through the exports.config file. For instance:
exports.config = {
runner: 'local',
port: 4723,
capabilities: [{
platformName: 'Android',
automationName: 'UiAutomator2',
...
]}
}
Hi,
The config works locally so I'm not sure why it wouldn't work when running on device farm, the only thing I have changed in my config is i've commented out the capabilities as they are set in the yaml file.
This is my current config:
const appiumHost = '127.0.0.1';
const appiumPort = 4723;
const app = process.env.APK_PATH
const browserExtensions = require('../extensions/BrowserExtensions.js')
const waitforTimeout = 30000;
const commandTimeout = 30000;
exports.config = {
debug: false,
specs: ['./features/enterPointScenarios.feature',
'./features/articleScenarios.feature',
'./features/feedScenarios.feature',
'./features/onboardingScenarios.feature',
'./debugFeatures/debugScenarios.feature'],
suites: {
articleScenarios: [
'./features/articleScenarios.feature'
],
feedScenarios: [
'./features/feedScenarios.feature'
],
onboardingScenarios: [
'./features/onboardingScenarios.feature'
],
debugScenarios: [
'./debugFeatures/debugScenarios.feature'
]
},
reporters: ['allure', 'spec'],
reporterOptions: {
allure: {
outputDir: './allure-results/'
}
},
host: appiumHost,
port: appiumPort,
maxInstances: 1,
capabilities: [
{
/*appiumVersion: '1.17.1',
browserName: '',
platformName: 'Android',
app,
platformVersion: '9',
deviceName: 'Pixel 2 API 28 Pie',
automationName: 'UiAutomator2',
waitforTimeout: waitforTimeout,
commandTimeout: commandTimeout,
newCommandTimeout: 30000*/
}
],
services: [
['appium', {
waitStartTime: 6000,
waitforTimeout: waitforTimeout,
command: 'appium',
logFileName: 'appium.log',
args: {
address: appiumHost,
port: appiumPort,
commandTimeout: commandTimeout,
sessionOverride: true,
debugLogSpacing: true
}
}]
],
logLevel: 'silent',
coloredLogs: true,
framework: 'cucumber',
cucumberOpts: {
backtrace: true,
failFast: false,
ignoreUndefinedDefinitions: false,
timeout: 30000,
require: ['./stepDefinitions/CompositeSteps.js',
'./stepDefinitions/BasePageSteps.js',
'./stepDefinitions/LandingPageSteps.js',
'./stepDefinitions/LoginPageSteps.js',
'./stepDefinitions/ArticleBrowsePageSteps.js',
'./stepDefinitions/AddListingSteps.js',
'./stepDefinitions/ArticleSteps.js',
'./stepDefinitions/MessagesPageSteps.js',
'./stepDefinitions/ProfileSteps.js',
'./stepDefinitions/FeedSteps.js',
'./stepDefinitions/MyListingsSteps.js',
'./stepDefinitions/OnboardingSteps.js',
'./stepDefinitions/MyAccountSteps.js',
'./stepDefinitions/SignUpSteps.js',
'./stepDefinitions/ProductBrowseSteps.js']
},
onPrepare:() => {
console.log('<<< NATIVE APP TESTS STARTED >>>');
},
before: function (capabilities, specs) {
// Add commands to WebdriverIO
Object.keys(browserExtensions).forEach(key => {
browser.addCommand(key, browserExtensions[key]);
})
//driver.removeApp('com.olioex.android.dev');
//driver.installApp(app);
//driver.launchApp();
},
afterScenario:() => {
browser.screenshot();
console.log('<<< SCENARIO FINISHED >>>')
},
afterFeature: function (uri, feature, scenarios) {
browser.screenshot();
console.log('<<< FEATURE FINISHED >>>')
},
onComplete:() => {
console.log('<<< TESTING FINISHED >>>');
}
};
Hello QAtesterAWS,
You have logLevel set to 'silent' in your config, which is hiding some of the errors from you. Try setting this to 'debug' or 'info' to view them. One of the errors I can see is that you are missing wdio-allure-reporter from your node modules / dependencies. It is not in your bundledDependencies in your package.json, and thus might have not been bundled when you ran your npm-bundle command. Alternatively, you can also install the dependencies during the install phase in your testspec file.
Relevant content
- asked a year ago
- asked 2 years ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 7 months ago