All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.testvagrant.optimus.core.remote.ConfigLoader Maven / Gradle / Ivy

Go to download

Optimus Lite API to manage test devices and create appium driver based on platform

There is a newer version: 0.1.7-beta
Show newest version
package com.testvagrant.optimus.core.remote;

import com.testvagrant.optimus.commons.filehandlers.GsonParser;
import com.testvagrant.optimus.core.models.CloudConfig;

import java.io.InputStream;
import java.io.InputStreamReader;

public class ConfigLoader {

  public CloudConfig loadConfig() {
    String file = String.format("cloudConfig/%s.json", System.getProperty("hub", "browserstack"));
    InputStream resourceAsStream = this.getClass().getClassLoader().getResourceAsStream(file);
    if (resourceAsStream == null) return new CloudConfig();
    return GsonParser.toInstance()
        .deserialize(new InputStreamReader(resourceAsStream), CloudConfig.class);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy