mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-03-14 14:48:53 +00:00
Merge pull request #22 from jimboatarm/techdebt
Tidying up a few tech debt backlog items
This commit is contained in:
commit
ba423ace32
BIN
wlauto/common/android/BaseUiAutomation$1.class
Normal file
BIN
wlauto/common/android/BaseUiAutomation$1.class
Normal file
Binary file not shown.
BIN
wlauto/common/android/BaseUiAutomation$ScreenOrientation.class
Normal file
BIN
wlauto/common/android/BaseUiAutomation$ScreenOrientation.class
Normal file
Binary file not shown.
Binary file not shown.
@ -35,6 +35,7 @@ import com.android.uiautomator.testrunner.UiAutomatorTestCase;
|
||||
public class BaseUiAutomation extends UiAutomatorTestCase {
|
||||
|
||||
public long waitTimeout = TimeUnit.SECONDS.toMillis(4);
|
||||
public enum ScreenOrientation { RIGHT, NATURAL, LEFT };
|
||||
|
||||
public void sleep(int second) {
|
||||
super.sleep(second * 1000);
|
||||
@ -251,4 +252,24 @@ public class BaseUiAutomation extends UiAutomatorTestCase {
|
||||
|
||||
view.performTwoPointerGesture(startPoint1, startPoint2, endPoint1, endPoint2, steps);
|
||||
}
|
||||
|
||||
public void setScreenOrientation(ScreenOrientation orientation) throws Exception {
|
||||
switch (orientation) {
|
||||
case RIGHT:
|
||||
getUiDevice().setOrientationRight();
|
||||
break;
|
||||
case NATURAL:
|
||||
getUiDevice().setOrientationNatural();
|
||||
break;
|
||||
case LEFT:
|
||||
getUiDevice().setOrientationLeft();
|
||||
break;
|
||||
default:
|
||||
throw new Exception("No orientation specified");
|
||||
}
|
||||
}
|
||||
|
||||
public void unsetScreenOrientation() throws Exception {
|
||||
getUiDevice().unfreezeRotation();
|
||||
}
|
||||
}
|
||||
|
@ -29,10 +29,19 @@ class Gmail(AndroidUiAutoBenchmark):
|
||||
view = [package+'/com.google.android.gm.ConversationListActivityGmail',
|
||||
package+'/com.google.android.gm.ComposeActivityGmail']
|
||||
description = """
|
||||
A workload to perform standard productivity tasks within Gmail.
|
||||
A workload to perform standard productivity tasks within Gmail. The workload carries out
|
||||
various tasks, such as creating new emails and sending them, whilst also producing metrics for
|
||||
action completion times.
|
||||
|
||||
The workload carries out various tasks, such as creating new emails and
|
||||
sending them, whilst also producing metrics for action completion times.
|
||||
Test description:
|
||||
|
||||
1. Open Gmail application
|
||||
2. Click to create New mail
|
||||
3. Enter recipient details in the To: field
|
||||
4. Enter text in the Subject edit box
|
||||
5. Enter text in the Compose edit box
|
||||
6. Attach five images from the local Images folder to the email
|
||||
7. Click the Send mail button
|
||||
"""
|
||||
|
||||
regex = re.compile(r'uxperf_gmail.*: (?P<key>\w+) (?P<value>\d+)')
|
||||
|
@ -39,6 +39,8 @@ public class UiAutomation extends UxPerfUiAutomation {
|
||||
public void runUiAutomation() throws Exception {
|
||||
parameters = getParams();
|
||||
|
||||
setScreenOrientation(ScreenOrientation.NATURAL);
|
||||
|
||||
clearFirstRunDialogues();
|
||||
|
||||
clickNewMail();
|
||||
|
@ -30,24 +30,26 @@ class Googlephotos(AndroidUiAutoBenchmark):
|
||||
package+'/com.google.android.apps.photos.onboarding.AccountPickerActivity',
|
||||
package+'/com.google.android.apps.photos.onboarding.IntroActivity']
|
||||
description = """
|
||||
A workload to perform standard productivity tasks with googlephotos.
|
||||
A workload to perform standard productivity tasks with Google Photos. The workload carries out
|
||||
various tasks, such as browsing images, performing zooms, post-processing and saving a selected
|
||||
image to file.
|
||||
|
||||
The workload carries out various tasks, such as browsing images, performing
|
||||
zooms, post-processing and saving a selected image to file.
|
||||
Although this workload attempts to be network independent it requires a network connection
|
||||
(ideally, wifi) to run. This is because the welcome screen UI is dependent on an existing
|
||||
connection.
|
||||
|
||||
gesture test - browsing through the wa-working gallery using swipe
|
||||
gestures and performing pinch gestures for zooming
|
||||
color test - selects a photograph, increments, resets and decrements color balance
|
||||
crop test - uses image straightener facility to simultaneously rotate and
|
||||
crop a selected photograph
|
||||
rotate tests - selects a photograph and performs 90 degree rotations
|
||||
|
||||
NOTE: This workload requires four jpeg files to be placed in the
|
||||
dependencies directory to run.
|
||||
|
||||
Although this workload attempts to be network independent it requires a
|
||||
network connection (ideally, wifi) to run. This is because the welcome
|
||||
screen UI is dependent on an existing connection.
|
||||
Test description:
|
||||
1. Four images are copied to the devices
|
||||
2. The application is started in offline access mode
|
||||
3. Gestures are performed to swipe between images and pinch zoom in and out of the selected
|
||||
image
|
||||
4. The Colour of a selected image is edited by selecting the colour menu, incrementing the
|
||||
colour, resetting the colour and decrementing the colour using the seek bar.
|
||||
5. A Crop test is performed on a selected image. UiAutomator does not allow the selection of
|
||||
the crop markers so the image is tilted positively, reset and then negatively to get a
|
||||
similar cropping effect.
|
||||
6. A Rotate test is performed on a selected image, rotating anticlockwise 90 degrees, 180
|
||||
degrees and 270 degrees.
|
||||
"""
|
||||
|
||||
parameters = [
|
||||
|
Binary file not shown.
@ -43,12 +43,14 @@ public class UiAutomation extends UxPerfUiAutomation {
|
||||
public void runUiAutomation() throws Exception {
|
||||
parameters = getParams();
|
||||
|
||||
setScreenOrientation(ScreenOrientation.NATURAL);
|
||||
confirmAccess();
|
||||
dismissWelcomeView();
|
||||
gesturesTest();
|
||||
editPhotoColorTest();
|
||||
cropPhotoTest();
|
||||
rotatePhotoTest();
|
||||
unsetScreenOrientation();
|
||||
|
||||
writeResultsToFile(timingResults, parameters.getString("output_file"));
|
||||
}
|
||||
|
@ -30,11 +30,22 @@ class Reader(AndroidUiAutoBenchmark):
|
||||
package+'/com.adobe.reader.viewer.ARSplitPaneActivity',
|
||||
package+'/com.adobe.reader.viewer.ARViewerActivity']
|
||||
description = """
|
||||
A workload to perform standard productivity tasks within Adobe Reader.
|
||||
The Adobe Reader workflow carries out the following typical productivity tasks using
|
||||
Workload-Automation.
|
||||
|
||||
The workload carries out various tasks, such as opening PDF documents,
|
||||
scrolling and searching through them, whilst also producing metrics for
|
||||
action completion times.
|
||||
Test description:
|
||||
|
||||
1. Open the application and sign in to an Adobe Cloud account over wifi
|
||||
2. Select the local files browser list - a test measuring the time taken to navigate through the
|
||||
menus and for the list to be created.
|
||||
3. Search for a specific file from within the - a test measuring the entry of a search string
|
||||
and time taken to locate the document within the file list.
|
||||
4. Open the selected file - a test measuring the time taken to open the document and present
|
||||
within a new view.
|
||||
5. Gestures test - measurement of fps, jank and other frame statistics, via dumpsys, for swipe
|
||||
and pinch gestures.
|
||||
6. Search test - a test measuring the time taken to search a large 100+ page mixed content
|
||||
document for specific strings. Steps 2-4 are repeated to open the Cortex M4 manual.
|
||||
"""
|
||||
|
||||
parameters = [
|
||||
|
@ -44,17 +44,23 @@ public class UiAutomation extends UxPerfUiAutomation {
|
||||
public void runUiAutomation() throws Exception {
|
||||
parameters = getParams();
|
||||
|
||||
dismissWelcomeView();
|
||||
setScreenOrientation(ScreenOrientation.NATURAL);
|
||||
|
||||
dismissWelcomeView();
|
||||
signInOnline(parameters);
|
||||
<<<<<<< HEAD
|
||||
|
||||
confirmAccess();
|
||||
|
||||
=======
|
||||
confirmLocalFileAccess();
|
||||
>>>>>>> 3991e73... Add setScreenOrientation to BaseUiAutomation class
|
||||
gesturesTest("Getting Started.pdf");
|
||||
|
||||
String[] searchStrings = {"Glossary", "cortex"};
|
||||
searchPdfTest("cortex_m4", searchStrings);
|
||||
|
||||
unsetScreenOrientation();
|
||||
|
||||
writeResultsToFile(timingResults, parameters.getString("output_file"));
|
||||
}
|
||||
|
||||
|
@ -30,17 +30,16 @@ class Skype(AndroidUiAutoBenchmark):
|
||||
|
||||
name = 'skype'
|
||||
description = '''
|
||||
Workload that makes Skype calls
|
||||
A workload to perform standard productivity tasks within Skype. The workload logs in to the
|
||||
Skype application, selects a recipient from the contacts list and then initiates a 5 second
|
||||
call.
|
||||
|
||||
It allows for the agenda to decide whether to make a voice call or a video call.
|
||||
Credentials for the user account used to log into the Skype app have to be provided
|
||||
in the agenda, as well as the display name and skype ID of the contact to call.
|
||||
|
||||
Other optional arguments allow controlling the duration of the call, whether the
|
||||
call includes video or voice only, and whether to collect sys dumps.
|
||||
|
||||
For reliable testing, this workload requires a good and stable internet connection,
|
||||
preferably on Wi-Fi.
|
||||
Test description:
|
||||
|
||||
1. Open Skype application
|
||||
2. Log in to a pre-defined account
|
||||
3. Select a recipient from the Contacts list
|
||||
4. Initiate a 5 second video Call
|
||||
'''
|
||||
package = 'com.skype.raider'
|
||||
view = [package+'/com.skype.android.app.calling.CallActivity',
|
||||
|
@ -62,6 +62,8 @@ public class UiAutomation extends UxPerfUiAutomation {
|
||||
outputDir = parameters.getString("output_dir", "/sdcard/wa-working");
|
||||
dumpsysEnabled = Boolean.parseBoolean(parameters.getString("dumpsys_enabled"));
|
||||
|
||||
setScreenOrientation(ScreenOrientation.NATURAL);
|
||||
|
||||
// Run tests
|
||||
handleLoginScreen(loginName, loginPass);
|
||||
confirmAccess();
|
||||
@ -72,6 +74,8 @@ public class UiAutomation extends UxPerfUiAutomation {
|
||||
voiceCallTest(callDuration);
|
||||
}
|
||||
|
||||
unsetScreenOrientation();
|
||||
|
||||
// Save results
|
||||
writeResultsToFile(results, resultsFile);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user