mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-03-13 22:28:36 +00:00
Add parameters for filename and search strings
Remove hard coded strings used for the gesture and word search tests and instead pass these in as parameters from an agenda file.
This commit is contained in:
parent
aa7029d074
commit
64f6720a36
@ -67,6 +67,21 @@ class Reader(AndroidUiAutoBenchmark):
|
||||
description="""
|
||||
Password for Adobe online services.
|
||||
"""),
|
||||
Parameter('document_name', kind=str, default="Getting_Started.pdf",
|
||||
description="""
|
||||
The document name to use for the Gesture and Search test.
|
||||
Note: spaces must be replaced with underscores in the document name.
|
||||
"""),
|
||||
Parameter('first_search_word', kind=str, default="read",
|
||||
description="""
|
||||
The first test string to use for the word search test.
|
||||
Note: Accepts single words only.
|
||||
"""),
|
||||
Parameter('second_search_word', kind=str, default="the",
|
||||
description="""
|
||||
The second test string to use for the word search test.
|
||||
Note: Accepts single words only.
|
||||
"""),
|
||||
]
|
||||
|
||||
instrumentation_log = ''.join([name, '_instrumentation.log'])
|
||||
@ -80,6 +95,9 @@ class Reader(AndroidUiAutoBenchmark):
|
||||
self.uiauto_params['email'] = self.email
|
||||
self.uiauto_params['password'] = self.password
|
||||
self.uiauto_params['dumpsys_enabled'] = self.dumpsys_enabled
|
||||
self.uiauto_params['filename'] = self.document_name
|
||||
self.uiauto_params['first_search_word'] = self.first_search_word
|
||||
self.uiauto_params['second_search_word'] = self.second_search_word
|
||||
|
||||
def initialize(self, context):
|
||||
super(Reader, self).initialize(context)
|
||||
|
Binary file not shown.
@ -43,6 +43,9 @@ public class UiAutomation extends UxPerfUiAutomation {
|
||||
|
||||
public void runUiAutomation() throws Exception {
|
||||
parameters = getParams();
|
||||
String filename = parameters.getString("filename").replace("_", " ");
|
||||
String[] searchStrings = {parameters.getString("first_search_word"),
|
||||
parameters.getString("second_search_word")};
|
||||
|
||||
setScreenOrientation(ScreenOrientation.NATURAL);
|
||||
|
||||
@ -51,9 +54,7 @@ public class UiAutomation extends UxPerfUiAutomation {
|
||||
|
||||
confirmAccess();
|
||||
|
||||
String filename = "Getting Started.pdf";
|
||||
gesturesTest(filename);
|
||||
String[] searchStrings = {"read", "the"};
|
||||
searchPdfTest(filename, searchStrings);
|
||||
|
||||
unsetScreenOrientation();
|
||||
|
Loading…
x
Reference in New Issue
Block a user