[英]A way to allow testers to run tests on Selenium Grid
This is basically a question asking for advice, not sure if that's frowned upon so feel free to close if inappropriate. 基本上,这是一个寻求建议的问题,不确定是否会皱眉,因此如果不适当,请随时关闭。
I've got a Selenium project running remotely on Selenium Grid through Maven on TeamCity. 我有一个Selenium项目,通过TeamCity上的Maven在Selenium Grid上远程运行。 A test is run by calling
通过调用运行测试
mvn clean verify -DsomeParameter=parameter -DtestSuite=**/SomeTestSuite
We're trying to find a way to allow our testers to run the tests by means of choosing suites and pressing one button. 我们正在尝试找到一种方法,允许我们的测试人员通过选择套件并按一个按钮来运行测试。
Now, the easiest way would be to give them access to TeamCity where they could change the build step parameter -DtestSuite. 现在,最简单的方法是让他们访问TeamCity,在这里他们可以更改构建步骤参数-DtestSuite。 However, that is not an ideal solution as it could lead to testers potentially making a mistake or being overwhelmed.
但是,这不是理想的解决方案,因为它可能导致测试人员可能犯错或不知所措。
We'd like to have a simpler (from tester's point of view) solution - some way where they could get a list of suites, choose one and click Run. 我们希望有一个更简单的(从测试人员的角度来看)解决方案-他们可以通过某种方式获得套件列表,选择一个套件,然后单击“运行”。
I know that TeamCity jobs can also take parameters, but I haven't been able to make this work. 我知道TeamCity作业也可以使用参数,但是我还无法完成这项工作。 The Maven build step is run though a Command Line command because TC needs to connect to the remote server/Grid, so a regular Maven step with additional parameters is not a possibility.
Maven构建步骤通过命令行命令运行,因为TC需要连接到远程服务器/网格,因此不可能执行带有附加参数的常规Maven步骤。
Okay, I found the mistake I've been doing - for command line parameters it's necessary to define them as environmental variables and use them in the build steps. 好的,我发现我一直在做的错误-对于命令行参数,有必要将它们定义为环境变量,并在构建步骤中使用它们。 Works fine now!
现在工作正常!
ps thanks @daggett for the hint ps感谢@daggett的提示
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.