[ 
https://issues.apache.org/jira/browse/CB-11332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15310049#comment-15310049
 ] 

ASF GitHub Bot commented on CB-11332:
-------------------------------------

Github user vladimir-kotikov commented on a diff in the pull request:

    https://github.com/apache/cordova-paramedic/pull/7#discussion_r65332533
  
    --- Diff: lib/paramedic.js ---
    @@ -284,7 +380,147 @@ ParamedicRunner.prototype.uninstallApp = function() {
         logger.info("Uninstalling the app.");
         var paramedicAppUninstall = new 
ParamedicAppUninstall(this.tempFolder.name, this.config.getPlatformId());
         
paramedicAppUninstall.uninstallApp(this.targetObj,util.PARAMEDIC_DEFAULT_APP_NAME);
    -}
    +};
    +
    +
    +ParamedicRunner.prototype.getPackageFolder = function() {
    +    var packageFolder;
    +    switch (this.config.getPlatformId()) {
    +        case 'android':
    +            packageFolder = path.join(this.tempFolder.name, 
'platforms/android/build/outputs/apk/');
    +            break;
    +        case 'ios':
    +            packageFolder = path.join(this.tempFolder.name, 
'platforms/ios/build/emulator/');
    +            break;
    +        default:
    +            throw new Error('Unsupported platform for sauce labs testing: 
' + this.config.getPlatformId());
    +    }
    +    return packageFolder;
    +};
    +
    +ParamedicRunner.prototype.getPackageName = function () {
    +    var packageName;
    +    switch (this.config.getPlatformId()) {
    +        case 'ios':
    +            packageName = 'HelloCordova.zip';
    +            break;
    +        case 'android':
    +            packageName = this.getBinaryName();
    +            break;
    +        default:
    +            throw new Error('Unsupported platform for sauce labs testing: 
' + this.config.getPlatformId());
    +    }
    +    return packageName;
    +};
    +
    +ParamedicRunner.prototype.getBinaryPath = function() {
    +    var binaryPath;
    +    switch (this.config.getPlatformId()) {
    +        case 'android':
    +            binaryPath = path.join(this.tempFolder.name, 
'platforms/android/build/outputs/apk', this.getBinaryName());
    +            break;
    +        case 'ios':
    +            binaryPath = path.join(this.tempFolder.name, 
'platforms/ios/build/emulator/', this.getBinaryName());
    +            break;
    +        default:
    +            throw new Error('Unsupported platform for sauce labs testing: 
' + this.config.getPlatformId());
    +    }
    +    return binaryPath;
    +};
    +
    +ParamedicRunner.prototype.getBinaryName = function() {
    +    var binaryName;
    +    switch (this.config.getPlatformId()) {
    +        case 'android':
    +            binaryName = 'android-debug.apk';
    +            break;
    +        case 'ios':
    +            binaryName = 'HelloCordova.app';
    +            break;
    +        default:
    +            throw new Error('Unsupported platform for sauce labs testing: 
' + this.config.getPlatformId());
    +    }
    +    return binaryName;
    +};
    +
    +ParamedicRunner.prototype.getAppName = function() {
    +    var appName;
    +    switch (this.config.getPlatformId()) {
    +        case 'android':
    +            appName = 'mobilespec.apk';
    +            break;
    +        case 'ios':
    +            appName = 'HelloCordova.zip';
    +            break;
    +        default:
    +            throw new Error('Unsupported platform for sauce labs testing: 
' + this.config.getPlatformId());
    +    }
    +    return appName;
    +};
    +
    +ParamedicRunner.prototype.runSauceTests = function() {
    +    logger.info('cordova-paramedic: running sauce tests');
    +    var self = this;
    +
    +    return self.packageApp()
    +    .then(self.uploadApp.bind(self))
    +    .then(function() {
    +        logger.normal('cordova-paramedic: app uploaded; starting tests');
    +
    +        var user = process.env[SAUCE_USER_ENV_VAR];
    --- End diff --
    
    It would be useful if we could set this parameters from command line too


> Run core plugins tests on Saucelabs
> -----------------------------------
>
>                 Key: CB-11332
>                 URL: https://issues.apache.org/jira/browse/CB-11332
>             Project: Apache Cordova
>          Issue Type: Test
>          Components: AllPlugins
>            Reporter: Alexander Sorokin
>            Assignee: Alexander Sorokin
>
> Use Appium to deploy the app and gather results via paramedic's tunnel.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to