Example usage for com.amazonaws.services.devicefarm.model ListSuitesResult getSuites

List of usage examples for com.amazonaws.services.devicefarm.model ListSuitesResult getSuites

Introduction

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

Prototype


public java.util.List<Suite> getSuites() 

Source Link

Document

Information about the suites.

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;/*from  www  . ja 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;
}