This repository was archived by the owner on Jan 15, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 122
Port Facebook from WA2 #720
Open
JaviMerino
wants to merge
7
commits into
ARM-software:next
Choose a base branch
from
JaviMerino:facebook
base: next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e4aad58
framework/workload: Let ApkWorkloads specify their activity
JaviMerino ff51736
framework/workload: Check maximum apk version supported for workloads…
JaviMerino 4505b41
workloads: add facebook
JaviMerino 56f38c3
workloads/facebook: More reliable click on search result
JaviMerino 9e9a1c4
workloads/facebook: simulate typing speed
JaviMerino 9b74b26
workloads/facebook: scroll down on the profiles
JaviMerino db89f2d
Revert "AndroidTarget: Ensure permissions are granted for installed a…
JaviMerino File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| # Copyright 2013-2015 ARM Limited | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The commit message references the wrong issue, it should be #704 |
||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
|
|
||
|
|
||
| import os | ||
| import sys | ||
|
|
||
| from wa import ApkUiautoWorkload | ||
|
|
||
|
|
||
| class Facebook(ApkUiautoWorkload): | ||
|
|
||
| name = 'facebook' | ||
| description = """ | ||
| Uses com.facebook.patana apk for facebook workload. | ||
| This workload does the following activities in facebook | ||
|
|
||
| Login to facebook account. | ||
| Send a message. | ||
| Check latest notification. | ||
| Search particular user account and visit his/her facebook account. | ||
| Find friends. | ||
| Update the facebook status | ||
|
|
||
| .. note:: This workload starts disableUpdate workload as a part of setup to | ||
| disable online updates, which helps to tackle problem of uncertain | ||
| behavier during facebook workload run.] | ||
|
|
||
| """ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This workload require an internet connection so the workload attribute |
||
| package_names = ['com.facebook.katana'] | ||
| activity_name = '.LoginActivity' | ||
| max_apk_version = '3.4' | ||
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| apply plugin: 'com.android.application' | ||
|
|
||
| def packageName = "com.arm.wa.uiauto.facebook" | ||
|
|
||
| android { | ||
| compileSdkVersion 25 | ||
| buildToolsVersion "25.0.3" | ||
| defaultConfig { | ||
| applicationId "${packageName}" | ||
| minSdkVersion 18 | ||
| targetSdkVersion 25 | ||
| testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | ||
| } | ||
| buildTypes { | ||
| applicationVariants.all { variant -> | ||
| variant.outputs.each { output -> | ||
| output.outputFile = file("$project.buildDir/apk/${packageName}.apk") | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| dependencies { | ||
| compile fileTree(dir: 'libs', include: ['*.jar']) | ||
| compile 'com.android.support.test:runner:0.5' | ||
| compile 'com.android.support.test:rules:0.5' | ||
| compile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2' | ||
| compile(name: 'uiauto', ext:'aar') | ||
| } | ||
|
|
||
| repositories { | ||
| flatDir { | ||
| dirs 'libs' | ||
| } | ||
| } |
13 changes: 13 additions & 0 deletions
13
wa/workloads/facebook/uiauto/app/src/main/AndroidManifest.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
| package="com.arm.wa.uiauto.facebook" | ||
| android:versionCode="1" | ||
| android:versionName="1.0"> | ||
|
|
||
|
|
||
| <instrumentation | ||
| android:name="android.support.test.runner.AndroidJUnitRunner" | ||
| android:targetPackage="${applicationId}"/> | ||
|
|
||
| </manifest> | ||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is the correct place to be doing this check as this would cause the workload to fail unnecessarily late in the execution and will not deal with multiple versions of the apk being available correctly. Both in the case of there being multiple apks available on the host system, which could result in an incorrect apk being selected during
initializationonly to fail here insetupand in the event of a pre-installed version on the target whenprefer_host_packageisFalse.I would suggest instead that the maximum version is passed as an extra parameter during the initialization of the
ApkFileobject and used when matching for an apk on the host system inresolve_package_from_hostand the installed version on the target will also need to be checked inresolve_package_from_targetwith the appropriate error message added to theresolve_packagemethod ofworkload.