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

com.saucelabs.rdc.model.SuiteReport Maven / Gradle / Ivy

Go to download

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.");
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy