2012-04-26 61 views
0

這裏我使用Jmeter 2.6來測試.net應用程序。 通過正則表達式提取器提取動態值時,我無法繼續並獲得匹配計數= 0。用於捕獲代碼內動態值的Jmeter正則表達式提取器

我的表達是:

window.open('ConsumptionBatchSerial.aspx?Quantity='+ReturnQty+'&ItemCode='+ItemCode+'&Batch='+Batch+'&Serial='+Serial+'&StDetailsId='+StDetailsId+'','','width=810,height=350,left=100,top=150,resizable=1') 

從這個我想提取Itemcode,Quantity,Serial,Batch,StDetailsId

任何人都可以對這個概念有任何想法嗎? 如果您知道這種情況,請發帖。

在此先感謝。

回答

0

如果您想捕獲解析的數據,這是瀏覽器中顯示的內容,應該這樣做。

(??)Quantity=([^&]*)&ItemCode=([^&]+)&Batch=([^&]+)&Serial=([^&]+)&StDetailsID=([^,]+)

如果該字符串是要匹配的確切字符串,那麼這樣的事情應該工作。

(??)Quantity='\+([^\+]*)\+&ItemCode='\+([^\+]*)\+&Batch='\+([^\+]*)\+&Serial='\+([^\+]*)\+&StDetailsID=\+([^\+]+)

(仍然不能評論任何地方要求澄清,抱歉)

0

正則表達式的格式得到以下值

1. Quantity 
2. Itemcode 
3. Batch 
4. Serial 
5. StDetailsId 

正則表達式

Quantity=(.+)&ItemCode=(.+)&Batch=(.+)&Serial=(.+)&StDetailsId=(.+)','', 
相關問題