简体   繁体   English

如何使用jenkins创建一个testng xml文件

[英]How to create a testng xml file using jenkins

I am displaying a HTML page to the user where I am providing users the options to select multiple test cases form jenkins. 我向用户显示一个HTML页面,向用户提供选择多种詹金斯测试用例的选项。 And based on the users selection I need to generate a XML file.Is it possible to generate a XMl based on user selection and If it is then what needs to be done to create XML.Please help 根据用户的选择,我需要生成一个XML文件,是否可以根据用户的选择生成一个XMl,如果是这样,那么创建XML需要做些什么。

One way would be to take the test names (exact method names) or class names from the user, let Jenkins pass it as arguments to your main method. 一种方法是从用户那里获取测试名称(确切的方法名称)或类名称,让Jenkins将其作为参数传递给您的主方法。

In the main you can build the code based on the arguments to invoke testng programmatically . 基本上,您可以基于参数构建代码以编程方式调用testng。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM