Java @BeforeMethod被跳过,测试失败
我有以下问题,当我在jenkins上运行我的测试套件时,我的一些测试被跳过了180个测试中的45个。这是我的@before方法Java @BeforeMethod被跳过,测试失败,java,jenkins,selenium-webdriver,Java,Jenkins,Selenium Webdriver,我有以下问题,当我在jenkins上运行我的测试套件时,我的一些测试被跳过了180个测试中的45个。这是我的@before方法 @Parameters({"subModel", "moduleName", "testName", "testLinkName"}) @BeforeMethod public void beforeTest(String subModel, String moduleName, String testName, String testLinkName) { t
@Parameters({"subModel", "moduleName", "testName", "testLinkName"})
@BeforeMethod
public void beforeTest(String subModel, String moduleName, String testName, String testLinkName)
{
this.subModel=subModel;
this.moduleName = moduleName;
this.testName = testName;
this.testLinkName = testLinkName;
}
@BeforeMethod
public void handleTestMethodName(Method method) throws Exception
{
this.testMethod = method.getName();
this.testClass = method.getDeclaringClass().getSimpleName();
initializeSelenium();
String modulo = "";
if(subModel.equalsIgnoreCase("ISSUER")){
modulo = PropertiesManager.getInstance().getProperty(EPropertiesNames.MOD_ISSUER);
}else{
modulo = PropertiesManager.getInstance().getProperty(EPropertiesNames.MOD_ACQUIRER);
}
setCMSModulo(modulo);
startAccess();
}
失败的方法是HandleteSMethodName,我不知道会出现什么问题。我收到以下异常:无法启动新会话。可能的原因是远程服务器地址无效或浏览器启动失败
我有最新的镀铬机
任何帮助都将不胜感激。这里有两种@before方法。您的测试运行程序支持倍数吗?我正在testNG上运行测试,没有任何问题扫描您保证它们将以什么顺序运行?如果HandleteSMethodName在beforeTest之前运行,这将是一个问题?不,我不能保证我假设它们是按照编写的顺序运行的。