Is there a way to specify parameters for included methods in TestNG suite.xml?

前端 未结 2 1539
借酒劲吻你
借酒劲吻你 2021-01-24 08:01

I\'m writing a suite.xml for an own testframework based on TestNG. My xml file looks like:


&l         


        
2条回答
  •  南方客
    南方客 (楼主)
    2021-01-24 08:07

    For this rather than assigning parameters in test suite xml you can assign parameters for your tests individually . for that you don't have to add each parameter in suite.xml .

    @Parameters({ "datasource", "jdbcDriver" })
    @test
    public void sampleTest(String ds, String driver) {
    // your test method
    }
    

    Hope this will help you 1

    http://testng.org/doc/documentation-main.html#parameters

提交回复
热议问题