LoadRunner指令碼評審Checklist

TIB發表於2010-02-02

LR指令碼應該像軟體的開發程式碼一樣進行適當的評審和檢查,防止指令碼開發的各種錯漏,為此建立一個Checklist是個好辦法。

參考:
http://performancecheck.blog.co.in/2008/08/11/script-development-checklist/

If you are pretty new to scripting with LoadRunner VUGen, chances that you will miss one or two important steps, that may be missing out of the think time settings, number of iterations, insufficient parameters, location of load generators, areas to encompass a transaction, etc… Therefore, it will be a good idea to have a checklist to keep track of the things done for each script….


TEST PROJECT: LOADRUNNER ADMINISTRATOR:
{project name} {LR admin name}

Script 1

Real-time think times? X
Check strings inserted in the script? X
Parameters defined? X
Are data files complete (incl userid/passwords)? X
Correlation complete? X
Exceptions handled? X
Are script set to run multiple iterations? X
Comment header block included? X
Comments within the script? X
Start/Stop transactions defined? X
Start/Stop sub transactions defined? X
“Are the scenarios designed to meet real time execution?” X

 

當然,如果做了這樣的檢查,然後還是出現了錯誤,則需要除錯和定位錯誤,可以採用這篇文章所介紹的系統化的分析方法來進行:
http://www.loadrunnertnt.com/errors/why-are-my-scriptsvusers-failing/

問題可能出現在VUGen,那麼可採用下面分析步驟:
1. The application that you are replaying against is not running.

2. There were changes to the application 

3. There are dynamic values that needs to be correlated.

4. The parameterization may be causing the problem
For (1) to (4), it’s recommended to turn on Full Extended Log (all options enabled: Advanced Trace, Parameter Subsitution, Data Returned From Server) in the Runtime Settings (Vugen) to verify the data that is been transmitted between the server and the client (script). Through this, you can find out what and where that could have gone wrong in the replay.

 
問題可能分析出現在Controller:

5. Does it happen at the start of the scenario execution?
If the script/vuser fail at the start of the execution, verify the script again in Vugen

6. Does it fail on a particular Load Generator (LG)?

7. Does it happen at the middle of the scenario execution?
When this happens, the Application Under Test (AUT) maybe under load and unable to process all requests from the scripts/vusers and therefore returning errors to them.

 

相關文章