What is the difference between BeforeTest and BeforeMethod in TestNG

前端 未结 9 934
南旧
南旧 2020-12-10 01:31

Both annotations runs before the @test in testNG then what is the difference between two of them.

9条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-10 01:47

    @BeforeTest To execute a set-up method before any of the test methods included in the < test > tag in the testng.xml file. @BeforeMethod To execute a set-up method before any of the test methods annotated as @Test.

提交回复
热议问题