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

au.com.agic.apptesting.utils.ThreadDetails Maven / Gradle / Ivy

package au.com.agic.apptesting.utils;

import au.com.agic.apptesting.profiles.configuration.UrlMapping;

import org.openqa.selenium.WebDriver;

import java.util.List;
import java.util.Map;
import java.util.Optional;

import javax.validation.constraints.NotNull;

/**
 * Represents the details required by a feature to run in a particular thread.
 */
public interface ThreadDetails {

	/**
	 *
	 * @param sleep How long to sleep between steps
     */
	void setDefaultSleep(final long sleep);

	/**
	 *
	 * @return How long to sleep between steps
     */
	long getDefaultSleep();

	/**
	 * @return The url associated with this instance of the test
	 */
	UrlMapping getUrlDetails();

	/**
	 * @return The web driver associated with this instance of the test
	 */
	WebDriver getWebDriver();

	/**
	 * @return The data set associated with this instance of the test
	 */
	Map getDataSet();

	/**
	 * @param dataSet The data set associated with this instance of the test
	 */
	void setDataSet(Map dataSet);

	/**
	 * @return true if there was a failed scenario, and false otherwise
	 */
	boolean getFailed();

	/**
	 * @param failed true if there was a failed scenario, and false otherwise
	 */
	void setFailed(final boolean failed);

	/**
	 * @return The directory where reports and other test output is saved
	 */
	String getReportDirectory();

	/**
	 *
	 * @return The optional details of the proxy being used
	 */
	List> getProxyInterface();

	/**
	 *
	 * @param name The name of the proxy to find
	 * @return The proxy that matches the name, or an empty result
	 */
	Optional> getProxyInterface(@NotNull final String name);

	/**
	 *
	 * @param proxies The optional details of the proxy being used
	 */
	void setProxyInterface(final List> proxies);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy