com.saucelabs.rdc.model.SuiteReport Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rdc-appium-junit4 Show documentation
Show all versions of rdc-appium-junit4 Show documentation
Library for running Appium test suites and updating test status on Sauce Labs Real Device Cloud (RDC)
The newest version!
package com.saucelabs.rdc.model;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Set;
@JsonIgnoreProperties(ignoreUnknown = true)
public class SuiteReport {
private final long id;
private final Set testReports;
@JsonCreator
public SuiteReport(@JsonProperty("id") long id, @JsonProperty("testReports") Set testReports) {
this.id = id;
this.testReports = testReports;
}
public long getId() {
return id;
}
public int getTestReportId(RdcTest test) {
for (TestReport testReport : testReports) {
if (testReport.getTest().equals(test)) {
return testReport.getId();
}
}
throw new IllegalArgumentException(
"There is no Sauce Labs test report for the current test.");
}
}