Stay organized with collections
Save and categorize content based on your preferences.
TestFilePushSetup
public
class
TestFilePushSetup
extends BaseTargetPreparer
implements
IDiscoverDependencies
A ITargetPreparer
that pushes one or more files/dirs from a IDeviceBuildInfo.getTestsDir()
folder onto device.
This preparer will look in alternate directories if the tests zip does not exist or does not
contain the required apk. The search will go in order from the last alternative dir specified to
the first.
Summary
Public constructors
TestFilePushSetup
public TestFilePushSetup ()
Public methods
reportDependencies
public reportDependencies ()
public void setUp (TestInformation testInfo)
Parameters |
testInfo |
TestInformation |
Protected methods
addTestFileName
protected void addTestFileName (String fileName)
Adds a file to the list of items to push
clearTestFileName
protected void clearTestFileName ()
getFailedToPushFiles
protected getFailedToPushFiles ()
Returns the set of files that failed to be pushed. Can only be used if 'throw-if-not-found'
is false otherwise the first failed push will throw an exception.
getLocalPathForFilename
protected File getLocalPathForFilename (IBuildInfo buildInfo,
String fileName,
ITestDevice device)
Resolve the host side path based on testing artifact information inside build info.
Parameters |
buildInfo |
IBuildInfo : build artifact information |
fileName |
String : filename of artifacts to push |
device |
ITestDevice |
Returns |
File |
a ERROR(/File) representing the physical file/path on host |
getTestFileNames
protected getTestFileNames ()
Retrieves the list of files to be pushed from test zip onto device
setThrowIfNoFile
protected void setThrowIfNoFile (boolean throwIfNoFile)
Parameters |
throwIfNoFile |
boolean |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2023-03-08 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-03-08 UTC."],[],[]]