在 testng 中使用 IMethodSelector 没有调用 @Beforemethod 和 @BeforeSuite
Usage of IMethodSelector in testng is not invoking the @Beforemethod and @BeforeSuite
我正在尝试 select 我想 运行 使用 testng.i 的 IMethodSelector 的测试在 select 测试中成功但是当我 运行 测试,@Beforemethod @BeforeSuite 没有得到 executed.here 是我的 xml 我使用 IMethodselect 或
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="methodsuite">
<test name="test1" preserve-order="true">
<method-selectors>
<method-selector>
<selector-class name="com.MethodSelector2"
priority="-1"/>
</method-selector>
</method-selectors>
<packages>
<package name=".*"></package>
</packages>
</test>
</suite>
请告诉我实施 IMethodSelector 是否会影响 @Beforemethod 功能或是否有任何解决方法
你能post一个MethodSelector2
来源吗?你确定,你没有过滤配置方法吗?在
中有一个特殊的标志来识别方法是配置方法还是测试方法
includeMethod(IMethodSelectorContext context, ITestNGMethod method, boolean isTestMethod)
(最后一个参数)
我正在尝试 select 我想 运行 使用 testng.i 的 IMethodSelector 的测试在 select 测试中成功但是当我 运行 测试,@Beforemethod @BeforeSuite 没有得到 executed.here 是我的 xml 我使用 IMethodselect 或
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="methodsuite">
<test name="test1" preserve-order="true">
<method-selectors>
<method-selector>
<selector-class name="com.MethodSelector2"
priority="-1"/>
</method-selector>
</method-selectors>
<packages>
<package name=".*"></package>
</packages>
</test>
</suite>
请告诉我实施 IMethodSelector 是否会影响 @Beforemethod 功能或是否有任何解决方法
你能post一个MethodSelector2
来源吗?你确定,你没有过滤配置方法吗?在
includeMethod(IMethodSelectorContext context, ITestNGMethod method, boolean isTestMethod)
(最后一个参数)