Upload a file to the Perfecto Repository with secure authentication (FR)
You can upload a file to the Perfecto repository to have a central location from which your tests can retrieve, for example, the latest .apk
or .ipa
file.
The following example uploads the file emptyText.txt
, located in the same folder as the calling .java
file, to the "My Media" section of the repository of the cloud, in this case demo.perfectomobile.com
:
Copy
PerfectoLabUtils.uploadMedia("demo.perfectomobile.com", "pasteLongSecurityTokenHere!", "emptyText.txt", "PRIVATE:emptyText.txt");
You can use it as part of your testing or CI flow. If a new artifact is built, it could potentially be uploaded to the Perfecto Repository, making it instantly usable by all other testers and tests.
Step-by-step guide
- Create a security token.
- Download the
UploadMedia
function of PerfectoLabUtils.java. -
Test it.