擅长:python、mysql、java
<p>不建议通过Selenium进行性能测试,因为它没有针对工作进行优化。硒<a href="https://selenium.dev/documentation/en/worst_practices/performance_testing/" rel="nofollow noreferrer">team</a>将其列为最差实践之一:</p>
<blockquote>
<p>It may seem ideal to performance test in the context of the user but a suite of WebDriver tests are subjected to many points of external and internal fragility which are beyond your control; for example browser startup speed, speed of HTTP servers, response of third party servers that host JavaScript or CSS, and the instrumentation penalty of the WebDriver implementation itself. Variation at these points will cause variation in your results. It is difficult to separate the difference between the performance of your website and the performance of external resources, and it is also hard to tell what the performance penalty is for using WebDriver in the browser, especially if you are injecting scripts.</p>
</blockquote>