简体   繁体   English

硒网格上的并行执行会影响执行时间吗

[英]Will parallel execution on selenium grid affect the execution time

I'm writing automated scripts to load thousands of records into the web application and the time frame in which data has to be loaded is very less. 我正在编写自动脚本,以将数千条记录加载到Web应用程序中,并且必须加载数据的时间框架要少得多。 So I thought of using Selenium Grid to run the scripts in parallel to achieve lesser time. 因此,我想到了使用Selenium Grid并行运行脚本以减少时间的方法。 Now, My question is will this affect the execution time of the automated scripts or the hub machine. 现在,我的问题是,这是否会影响自动化脚本或集线器计算机的执行时间。 There will be around 20 machines or maybe even more connected to the hub. 集线器将连接约20台机器,甚至更多。

Also, Is using selenium grid the best option for this or I could use some other approach as well. 另外,使用硒网格是对此的最佳选择,否则我也可以使用其他方法。 And, feeding data from database or using web services is not possible. 而且,无法从数据库或使用Web服务提供数据。

Thanks in advance. 提前致谢。

will this affect the execution time of the automated scripts or the hub machine 这会影响自动化脚本或集线器计算机的执行时间吗

Maybe. 也许。 It depends on the rest of your stack. 这取决于堆栈的其余部分。 Is the underlying server multi-threaded; 基础服务器是多线程的吗? will each Selenium Grid instance be provisioned its own process on the server? 服务器上是否将为每个Selenium Grid实例提供自己的进程? What about your database - will transaction locking block the other processes? 那您的数据库呢-事务锁定会阻止其他进程吗? Will any of your servers hit some performance bottleneck? 您的任何服务器都会遇到性能瓶颈吗? Is the database ACID compliant ? 数据库ACID是否兼容 - Ie Will running multiple Selenium instances like this cause race condition errors? -即,像这样运行多个Selenium实例是否会导致竞争条件错误?

There's only one way to know for sure: Do a trial run, and benchmark it. 只有一种方法可以确定:试运行并进行基准测试。

Is using selenium grid the best option for this or I could use some other approach as well 使用硒网格是最好的选择,否则我也可以使用其他方法

If you have direct access to the database, then you could seed the data directly (using SQL, presumably). 如果您可以直接访问数据库,则可以直接播种数据(大概使用SQL)。 This would be much faster, if it's a viable option. 这将是更快 ,如果它是一个可行的选择。

Also, it depends what you're typing to achieve here. 此外,这取决于您要在此处输入的内容。 Are you simply seeding the application with a tonne of data? 您是否只是在为应用程序填充大量数据? (In which case, SQL is a better option.) Or, are you actually performance-testing the website? (在那种情况下,SQL是一个更好的选择。)或者,您实际上是在对网站进行性能测试吗? (In which case, intense parallel execution may be part of the specs.) (在这种情况下,严格的并行执行可能是规范的一部分。)

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

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