Example usage for com.amazonaws.services.devicefarm.model Suite getName

List of usage examples for com.amazonaws.services.devicefarm.model Suite getName

Introduction

In this page you can find the example usage for com.amazonaws.services.devicefarm.model Suite getName.

Prototype


public String getName() 

Source Link

Document

The suite's name.

Usage

From source file:org.jenkinsci.plugins.awsdevicefarm.AWSDeviceFarmRecorder.java

License:Open Source License

private Map<String, FilePath> getSuites(AWSDeviceFarm adf, ScheduleRunResult run, Map<String, FilePath> jobs)
        throws IOException, InterruptedException {
    Map<String, FilePath> suites = new HashMap<String, FilePath>();
    String runArn = run.getRun().getArn();
    String components[] = runArn.split(":");
    // constructing job ARN for each job using the run ARN
    components[5] = "job";
    for (Map.Entry<String, FilePath> jobEntry : jobs.entrySet()) {
        String jobArn = jobEntry.getKey();
        components[6] = jobArn;//  w  ww  . j a  v  a  2  s . com
        String fullJobArn = StringUtils.join(components, ":");
        ListSuitesResult result = adf.listSuites(fullJobArn);
        for (Suite suite : result.getSuites()) {
            String arn = suite.getArn().split(":")[6];
            suites.put(arn, new FilePath(jobs.get(jobArn), suite.getName()));
            suites.get(arn).mkdirs();
        }
    }
    return suites;
}