Testng中的测试方法和测试标签有什么区别 [英] What is the difference between test method and test tag inTestng
问题描述
我现在使用 TestNG 有一段时间了,但我仍然不知道这两个的预期目的是什么(@Test
和
在套件中.xml) 以及它们要表达的抽象.
I'm using TestNG for some time now but still I don't know what's the intended purpose of those two (@Test
and < test>
in suite.xml)and what abstractions they are meant to express.
另外,如果有人可以分享他们在 TestNG 中其他元素的行为差异.例如 @AfterTest
@BeforeTest
由 @Test
或
触发,>@Test
和
进入最终执行报告.
Also if anyone can share the difference in their behavior regarding other elements in TestNG. For example are @AfterTest
@BeforeTest
triggered by @Test
or <test>
and which one of @Test
and < test>
gets into the final execution report.
推荐答案
@Test
表示测试方法.<test>
是您在 testng.xml
中将多个类组合在一起的方式.
@Test
denotes a test method. <test>
is a how you group several classes together in your testng.xml
.
这篇关于Testng中的测试方法和测试标签有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!