mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-03-20 17:48:44 +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 class BaseUiAutomation extends UiAutomatorTestCase {
|
||||||
|
|
||||||
public long waitTimeout = TimeUnit.SECONDS.toMillis(4);
|
public long waitTimeout = TimeUnit.SECONDS.toMillis(4);
|
||||||
|
public enum ScreenOrientation { RIGHT, NATURAL, LEFT };
|
||||||
|
|
||||||
public void sleep(int second) {
|
public void sleep(int second) {
|
||||||
super.sleep(second * 1000);
|
super.sleep(second * 1000);
|
||||||
@ -251,4 +252,24 @@ public class BaseUiAutomation extends UiAutomatorTestCase {
|
|||||||
|
|
||||||
view.performTwoPointerGesture(startPoint1, startPoint2, endPoint1, endPoint2, steps);
|
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',
|
view = [package+'/com.google.android.gm.ConversationListActivityGmail',
|
||||||
package+'/com.google.android.gm.ComposeActivityGmail']
|
package+'/com.google.android.gm.ComposeActivityGmail']
|
||||||
description = """
|
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
|
Test description:
|
||||||
sending them, whilst also producing metrics for action completion times.
|
|
||||||
|
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+)')
|
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 {
|
public void runUiAutomation() throws Exception {
|
||||||
parameters = getParams();
|
parameters = getParams();
|
||||||
|
|
||||||
|
setScreenOrientation(ScreenOrientation.NATURAL);
|
||||||
|
|
||||||
clearFirstRunDialogues();
|
clearFirstRunDialogues();
|
||||||
|
|
||||||
clickNewMail();
|
clickNewMail();
|
||||||
|
@ -30,24 +30,26 @@ class Googlephotos(AndroidUiAutoBenchmark):
|
|||||||
package+'/com.google.android.apps.photos.onboarding.AccountPickerActivity',
|
package+'/com.google.android.apps.photos.onboarding.AccountPickerActivity',
|
||||||
package+'/com.google.android.apps.photos.onboarding.IntroActivity']
|
package+'/com.google.android.apps.photos.onboarding.IntroActivity']
|
||||||
description = """
|
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
|
Although this workload attempts to be network independent it requires a network connection
|
||||||
zooms, post-processing and saving a selected image to file.
|
(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
|
Test description:
|
||||||
gestures and performing pinch gestures for zooming
|
1. Four images are copied to the devices
|
||||||
color test - selects a photograph, increments, resets and decrements color balance
|
2. The application is started in offline access mode
|
||||||
crop test - uses image straightener facility to simultaneously rotate and
|
3. Gestures are performed to swipe between images and pinch zoom in and out of the selected
|
||||||
crop a selected photograph
|
image
|
||||||
rotate tests - selects a photograph and performs 90 degree rotations
|
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.
|
||||||
NOTE: This workload requires four jpeg files to be placed in the
|
5. A Crop test is performed on a selected image. UiAutomator does not allow the selection of
|
||||||
dependencies directory to run.
|
the crop markers so the image is tilted positively, reset and then negatively to get a
|
||||||
|
similar cropping effect.
|
||||||
Although this workload attempts to be network independent it requires a
|
6. A Rotate test is performed on a selected image, rotating anticlockwise 90 degrees, 180
|
||||||
network connection (ideally, wifi) to run. This is because the welcome
|
degrees and 270 degrees.
|
||||||
screen UI is dependent on an existing connection.
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
parameters = [
|
parameters = [
|
||||||
|
Binary file not shown.
@ -43,12 +43,14 @@ public class UiAutomation extends UxPerfUiAutomation {
|
|||||||
public void runUiAutomation() throws Exception {
|
public void runUiAutomation() throws Exception {
|
||||||
parameters = getParams();
|
parameters = getParams();
|
||||||
|
|
||||||
|
setScreenOrientation(ScreenOrientation.NATURAL);
|
||||||
confirmAccess();
|
confirmAccess();
|
||||||
dismissWelcomeView();
|
dismissWelcomeView();
|
||||||
gesturesTest();
|
gesturesTest();
|
||||||
editPhotoColorTest();
|
editPhotoColorTest();
|
||||||
cropPhotoTest();
|
cropPhotoTest();
|
||||||
rotatePhotoTest();
|
rotatePhotoTest();
|
||||||
|
unsetScreenOrientation();
|
||||||
|
|
||||||
writeResultsToFile(timingResults, parameters.getString("output_file"));
|
writeResultsToFile(timingResults, parameters.getString("output_file"));
|
||||||
}
|
}
|
||||||
|
@ -30,11 +30,22 @@ class Reader(AndroidUiAutoBenchmark):
|
|||||||
package+'/com.adobe.reader.viewer.ARSplitPaneActivity',
|
package+'/com.adobe.reader.viewer.ARSplitPaneActivity',
|
||||||
package+'/com.adobe.reader.viewer.ARViewerActivity']
|
package+'/com.adobe.reader.viewer.ARViewerActivity']
|
||||||
description = """
|
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,
|
Test description:
|
||||||
scrolling and searching through them, whilst also producing metrics for
|
|
||||||
action completion times.
|
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 = [
|
parameters = [
|
||||||
|
@ -44,17 +44,23 @@ public class UiAutomation extends UxPerfUiAutomation {
|
|||||||
public void runUiAutomation() throws Exception {
|
public void runUiAutomation() throws Exception {
|
||||||
parameters = getParams();
|
parameters = getParams();
|
||||||
|
|
||||||
dismissWelcomeView();
|
setScreenOrientation(ScreenOrientation.NATURAL);
|
||||||
|
|
||||||
|
dismissWelcomeView();
|
||||||
signInOnline(parameters);
|
signInOnline(parameters);
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
confirmAccess();
|
confirmAccess();
|
||||||
|
|
||||||
|
=======
|
||||||
|
confirmLocalFileAccess();
|
||||||
|
>>>>>>> 3991e73... Add setScreenOrientation to BaseUiAutomation class
|
||||||
gesturesTest("Getting Started.pdf");
|
gesturesTest("Getting Started.pdf");
|
||||||
|
|
||||||
String[] searchStrings = {"Glossary", "cortex"};
|
String[] searchStrings = {"Glossary", "cortex"};
|
||||||
searchPdfTest("cortex_m4", searchStrings);
|
searchPdfTest("cortex_m4", searchStrings);
|
||||||
|
|
||||||
|
unsetScreenOrientation();
|
||||||
|
|
||||||
writeResultsToFile(timingResults, parameters.getString("output_file"));
|
writeResultsToFile(timingResults, parameters.getString("output_file"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,17 +30,16 @@ class Skype(AndroidUiAutoBenchmark):
|
|||||||
|
|
||||||
name = 'skype'
|
name = 'skype'
|
||||||
description = '''
|
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.
|
Test description:
|
||||||
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.
|
1. Open Skype application
|
||||||
|
2. Log in to a pre-defined account
|
||||||
Other optional arguments allow controlling the duration of the call, whether the
|
3. Select a recipient from the Contacts list
|
||||||
call includes video or voice only, and whether to collect sys dumps.
|
4. Initiate a 5 second video Call
|
||||||
|
|
||||||
For reliable testing, this workload requires a good and stable internet connection,
|
|
||||||
preferably on Wi-Fi.
|
|
||||||
'''
|
'''
|
||||||
package = 'com.skype.raider'
|
package = 'com.skype.raider'
|
||||||
view = [package+'/com.skype.android.app.calling.CallActivity',
|
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");
|
outputDir = parameters.getString("output_dir", "/sdcard/wa-working");
|
||||||
dumpsysEnabled = Boolean.parseBoolean(parameters.getString("dumpsys_enabled"));
|
dumpsysEnabled = Boolean.parseBoolean(parameters.getString("dumpsys_enabled"));
|
||||||
|
|
||||||
|
setScreenOrientation(ScreenOrientation.NATURAL);
|
||||||
|
|
||||||
// Run tests
|
// Run tests
|
||||||
handleLoginScreen(loginName, loginPass);
|
handleLoginScreen(loginName, loginPass);
|
||||||
confirmAccess();
|
confirmAccess();
|
||||||
@ -72,6 +74,8 @@ public class UiAutomation extends UxPerfUiAutomation {
|
|||||||
voiceCallTest(callDuration);
|
voiceCallTest(callDuration);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsetScreenOrientation();
|
||||||
|
|
||||||
// Save results
|
// Save results
|
||||||
writeResultsToFile(results, resultsFile);
|
writeResultsToFile(results, resultsFile);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user