Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
为什么要使用testng.xml文件来运行Selenium代码?_Xml_Selenium_Testng - Fatal编程技术网

为什么要使用testng.xml文件来运行Selenium代码?

为什么要使用testng.xml文件来运行Selenium代码?,xml,selenium,testng,Xml,Selenium,Testng,我曾多次看到通过testng.xml文件执行selenium代码,但我无法理解为什么需要这样做?没有必要使用testng.xml来运行selenium代码。您可以直接运行selenium代码 您的问题:为什么要使用testng.xml 我的回答是:为了创建一个测试套件并运行不同的测试用例,您需要一些驱动自动化的框架。这里testng.xml可以称为“驱动程序”,它使用selenium代码驱动几个自动化的测试用例。希望答案能回答你的问题 祝你今天愉快, Sandeep如果您已经看过很多次,那么应该

我曾多次看到通过
testng.xml
文件执行selenium代码,但我无法理解为什么需要这样做?

没有必要使用testng.xml来运行selenium代码。您可以直接运行selenium代码

您的问题:为什么要使用testng.xml

我的回答是:为了创建一个测试套件并运行不同的测试用例,您需要一些驱动自动化的框架。这里testng.xml可以称为“驱动程序”,它使用selenium代码驱动几个自动化的测试用例。希望答案能回答你的问题

祝你今天愉快,
Sandeep

如果您已经看过很多次,那么应该很容易给出一个示例。如果因为它们是保密的,所以你不能这样做,你最好去问写它们的人,而不是我们。你如何执行selenium测试?