我正在关注junit测试
package test.java.com.unit;
import com.saucelabs.common.SauceOnDemandAuthentication;
import com.saucelabs.common.SauceOnDemandSessionIdProvider;
import com.saucelabs.junit.Parallelized;
import com.saucelabs.junit.SauceOnDemandTestWatcher;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestName;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.openqa.selenium.Platform;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import java.net.URL;
import java.util.LinkedList;
import static org.junit.Assert.assertEquals;
@RunWith(Parallelized.class)
public class WebDriverTest implements SauceOnDemandSessionIdProvider {
public SauceOnDemandAuthentication authentication = new SauceOnDemandAuthentication("USER_NAME", "ACCESS_KEY");
private String browser;
private String os;
private String version;
public @Rule SauceOnDemandTestWatcher resultReportingTestWatcher = new SauceOnDemandTestWatcher(this, authentication);
public @Rule TestName testName = new TestName(); …Run Code Online (Sandbox Code Playgroud)