-1
我已經優先考慮TestNG框架中每個類的方法。當我運行套件時。我看到每個類首先被觸發的Priority 1方法,然後是每個類的下一個優先級。TestNG優先級註釋衝突順序執行
我也試過在preserve.xml中使用「preserve-order =」true「>」,但是讓問題變得不可思議。
..to闡述
Class A
{@Test(priority =1)
method A1()
@Test(priority =2)
method A2}
Class B
{@Test(priority =1)
method B1()
@Test(priority =2)
method B2}
當套件是trigerred-執行順序是A1,B1,A2和B2。對於在不同的包中相同的項目類似的場景,我看到TestNG的的執行順序A1,A2,B1和B2