2016-07-13 23 views

回答

0
  1. 最簡單的解決方法是使用Simple Data Writer經過時間和/或延遲保存標籤,到一個CSV文件,它會產生這樣的原始輸出:

    elapsed,label 
    423,sampler1 
    452,sampler2 
    958,sampler1 
    152,sampler1 
    

    而且你可以從這裏把它到任何其他工具(awk,Excel等)來過濾你想要的結果。

  2. 另一種選擇是使用BeanShell Listener即時生成此類報告。事情是這樣的:

    long responseTime = sampleResult.getEndTime() - sampleResult.getStartTime(); 
    if(responseTime < 400) { 
        FileOutputStream f = new FileOutputStream("myreport.csv", true); 
        PrintStream p = new PrintStream(f); 
        this.interpreter.setOut(p); 
        print(sampleResult.getSampleLabel() + "," + responseTime); 
        f.close(); 
    } 
    

    這種方法,雖然可能沒有足夠的高性能如果你打算用多(超過200-300)用戶和許多操作運行壓力測試「適合」的過濾器。

-1

JMeter用戶提供開箱即用的一個Web報告,提供噸使用標準的指標,例如Apdex的,百分關於負載測試信息的。 ..

看到這個:

如果你還想要這個,請執行下列操作:

添加爲您的要求的孩子添加Duration Assertion

Duration Assertion

它下面的所有響應會被標記爲失敗。 而在報告中,您將有成功的請求數量符合SLA標準。