sauce-uploader
v1.0.5
Published
Uploading apk & ipa to Sauce Labs from nodejs
Downloads
10
Readme
sauce-uploader
Are you planning to run some Appium tests on Sauce Labs ? Make sure you upload your app first. Use sauce-uploader, let him handle it for you.
#Install
npm install --save sauce-uploader
#Usage API
import uploader from 'sauce-uploader'
let settings = {user: keys["user"], access_key: keys["accessKey"], app_path: "full_path_to_app"}
uploader.upload(settings, (err, response) {
/* handle callback response
* { username: 'vrunoa',
* size: 1423095,
* md5: '68e280e4de9116e2d095e13cca25cd68',
* filename: 'app-debug.apk' }
*/
// set the capabilities for your appium tests
let app = ["sauce-storage", response["filename"]].join(":")
let capabilities = {
"deviceName":"Android",
"host":"ondemand.saucelabs.com",
"port":80,
"app" : app,
"username" : keys["user"],
"accessKey": keys["accessKey"],
"app-package":"com.urucas.kriket",
"appWaitActivity": "com.urucas.kriket.activities.LoginActivity",
"browserName" : "",
"platformName":"Android",
"deviceName": "Android Emulator",
"platformVersion": "5.0",
"appium-version" : "1.4.7"
}
// set the wd capabilities and run your tests
// ...
});
// sync
let [err, response] = uploader.uploadSync(settings);
Now run your appium test on Sauce Labs cloud!
CLI
npm install -g sauce-uploader
sauce-uploader <user> <access_key> <full_path_to_app> [--verbose]
#Example Before running the example inside example folder, make sure you addd your current Sauce Labs keys.
cd examples
npm install
npm test
Go to Sauce Labs dashboard and watch it running!