使用testNG

时间:2019-02-22 16:25:22

标签: testng

我是testNG框架的新手,我试图在测试用例中实现它,当我运行xml文件时,我收到了“空测试套件消息”

<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite thread-count="1" verbose="1" name="Account Agreement" 
  annotations="JDK" parallel="tests">
<test name="Account Agreement cases">
    <classes>
        <class name="com.mtrustcompany.avoka.accountagreement.MyTest"/>
    </classes>
  </test>
</suite>

TestFile

@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class MyTest extends BrowserStackSpec {
public static WebDriver driver;

public static void setDriver(WebDriver driver) {
    MyTest.driver = driver;
}

public static WebDriver getDriver() {
    return driver;
}

public driver() {
  driver = new RemoteWebDriver(serverUrl,caps)
    return driver;
}
@Test
 void runtest() {
 --code here--
}
}

控制台消息:

帐户协议

运行总测试:0,失败:0,跳过:0

进程完成,退出代码为0 空的测试套件。

我想念什么?

0 个答案:

没有答案