Page tree
Skip to end of metadata
Go to start of metadata

Last updated: Jan 19, 2020 11:08

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:

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

  1. Create a Security Token.
  2. Download the UploadMedia function of PerfectoLabUtils.java.
  3. Test it.