in src/main/java/org/jenkinsci/plugins/awsdevicefarm/AWSDeviceFarmRecorder.java [277:395]
public AWSDeviceFarmRecorder(String projectName,
String devicePoolName,
String testSpecName,
String environmentToRun,
String appArtifact,
String runName,
@Nonnull String testToRun,
Boolean storeResults,
Boolean isRunUnmetered,
String eventCount,
String eventThrottle,
String seed,
String username,
String password,
String appiumJavaJUnitTest,
String appiumJavaTestNGTest,
String appiumPythonTest,
String appiumRubyTest,
String appiumNodeTest,
String calabashFeatures,
String calabashTags,
String calabashProfile,
String junitArtifact,
String junitFilter,
String uiautomatorArtifact,
String uiautomatorFilter,
String uiautomationArtifact,
String xctestArtifact,
String xctestFilter,
String xctestUiArtifact,
String xctestUiFilter,
String appiumVersionJunit,
String appiumVersionPython,
String appiumVersionTestng,
Boolean ifWebApp,
Boolean extraData,
String extraDataArtifact,
Boolean deviceLocation,
Double deviceLatitude,
Double deviceLongitude,
Boolean radioDetails,
Boolean ifBluetooth,
Boolean ifWifi,
Boolean ifGPS,
Boolean ifNfc,
Integer jobTimeoutMinutes,
Boolean ifVideoRecording,
Boolean ifAppPerformanceMonitoring,
Boolean ignoreRunError,
Boolean ifVpce,
Boolean ifSkipAppResigning,
String vpceServiceName ) {
this.projectName = projectName;
this.devicePoolName = devicePoolName;
this.testSpecName = testSpecName;
this.environmentToRun = environmentToRun;
this.appArtifact = appArtifact;
this.runName = runName;
this.storeResults = storeResults;
this.isRunUnmetered = isRunUnmetered;
this.eventCount = eventCount;
this.eventThrottle = eventThrottle;
this.seed = seed;
this.username = username;
this.password = password;
this.appiumJavaJUnitTest = appiumJavaJUnitTest;
this.appiumJavaTestNGTest = appiumJavaTestNGTest;
this.appiumPythonTest = appiumPythonTest;
this.appiumRubyTest = appiumRubyTest;
this.appiumNodeTest = appiumNodeTest;
this.calabashFeatures = calabashFeatures;
this.calabashTags = calabashTags;
this.calabashProfile = calabashProfile;
this.junitArtifact = junitArtifact;
this.junitFilter = junitFilter;
this.uiautomatorArtifact = uiautomatorArtifact;
this.uiautomatorFilter = uiautomatorFilter;
this.uiautomationArtifact = uiautomationArtifact;
this.xctestArtifact = xctestArtifact;
this.xctestFilter = xctestFilter;
this.xctestUiArtifact = xctestUiArtifact;
this.xctestUiFilter = xctestUiFilter;
this.ignoreRunError = ignoreRunError;
this.appiumVersionJunit = appiumVersionJunit;
this.appiumVersionPython = appiumVersionPython;
this.appiumVersionTestng = appiumVersionTestng;
this.extraData = extraData;
this.extraDataArtifact = extraDataArtifact;
this.vpceServiceName = vpceServiceName;
this.deviceLocation = deviceLocation;
this.deviceLatitude = deviceLatitude;
this.deviceLongitude = deviceLongitude;
this.ifVpce = ifVpce;
this.ifSkipAppResigning = ifSkipAppResigning;
this.radioDetails = radioDetails;
this.ifWifi = ifWifi;
this.ifGPS = ifGPS;
this.ifBluetooth = ifBluetooth;
this.ifNfc = ifNfc;
this.jobTimeoutMinutes = jobTimeoutMinutes;
this.ifVideoRecording = ifVideoRecording;
this.ifAppPerformanceMonitoring = ifAppPerformanceMonitoring;
this.ifWebApp = ifWebApp;
this.testToRun = transformTestToRunForWebApp(testToRun);
// This is a hack because I have to get the service icon locally, but it's copy-righted. So I pull it when I need it.
Path pluginIconPath = Paths.get(System.getenv("HOME"), "plugins", "aws-device-farm", "service-icon.svg").toAbsolutePath();
File pluginIcon = new File(pluginIconPath.toString());
if (!(pluginIcon.exists() && !pluginIcon.isDirectory())) {
System.out.println("Downloading service icon!");
try {
FileUtils.copyURLToFile(new URL("http://g-ecx.images-amazon.com/images/G/01/aws-device-farm/service-icon.svg"), pluginIcon);
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}