📜  什么是 testng 中的工厂注释 - 无论代码示例

📅  最后修改于: 2022-03-11 14:59:33.251000             🧑  作者: Mango

代码示例1
The @Factory annotation is useful when we want to run multiple test 
cases through a single test class. It is mainly used for the dynamic 
execution of test cases.

Let's say we have in 2 different classes, there are 2 different test cases.
If we want to run both in the same class. We use @Factory annotaions which
takes Object[] array. We put the test cases into it. it returns Object array 
value.