1. testng的测试方法不能有返回值,即必须是void返回值类型。

测试方法前加入了@Test, 但以testNG方式运行,run test为0

以下public WebDriver ...应改为public void ...

@Test
public WebDriver webRegister() throws InterruptedException, IOException{ WebRegister wr = new WebRegister(); webRegisterURL = wr.getRegisterData("webRegisterURL");
userName = wr.getRegisterData("userName");
userPwd = wr.getRegisterData("userPwd");
userPwdck = wr.getRegisterData("userPwdck");
userPhone = wr.getRegisterData("userPhone");
successStringCk = wr.getRegisterData("successStringCk");
outComePath = CommonClass.getBaseData(testDataPath, "outComePath");
screenshotDir = CommonClass.getBaseData(testDataPath, "screenshotDir");
Logger.getLogger(WebRegister.class).info(
"-------------------register start--------------------------"); WebDriver driver = CommonClass.startBrowser("chrome");
     ...
05-11 03:26