我需要通過測量點擊導航應用加載時間做性能測試。我使用了Watir-webdriver性能的寶石。它適用於Chrome並且不支持Firefox。請讓我知道如何在Firefox上做到這一點的指導?如何衡量的Watir-webdriver的加載時間爲Firefox
謝謝
我需要通過測量點擊導航應用加載時間做性能測試。我使用了Watir-webdriver性能的寶石。它適用於Chrome並且不支持Firefox。請讓我知道如何在Firefox上做到這一點的指導?如何衡量的Watir-webdriver的加載時間爲Firefox
謝謝
我有同樣的問題,以及之前我發現有關性能的寶石。
我發現只有出現一個元素時負載動作完成
,等待它是可用的:
browser.element.present?
林意識到它的一個非常粗略的解決方法,但是這是唯一的事情我想到了。 它給你一個關於行動時間的粗略估計。
這是我要做的事:
require 'watir-webdriver-performance'
$response = $browser.performance.summary[:response_time]
$first_byte = $browser.performance.summary[:time_to_first_byte]
$last_byte = $browser.performance.summary[:time_to_last_byte]
def performance_check
puts ("#{$browser.url}: Response time: #{$response}ms.")
puts ("#{$browser.url}: Time to first byte: #{$first_byte}ms.")
puts ("#{$browser.url}: Time to last byte: #{$last_byte}ms.")
end
def test_site_01
$browser.goto("http://www.google.com/")
performance_check
end
見我對的Watir-webdriver的性能寶石的問題。寶石的開發人員會根據第一個/最後一個和響應時間之間的差異做出響應。
關閉我的頭頂,我要麼看到鍍鉻應該並添加了對Firefox的支持,或者寫一個頁面加載功能到你的框架來衡量它。 – 2013-03-20 00:50:32