创建测试脚本的工作流程:
1、plan(gather relevant test information)
2、record(record a web vuser script)
3、enhance(transactions,verification,parameters,correlation)
4、test(play back script. to verify success)
录制脚本的过程:
1、create a new vuser script
2、select web(http/html)protocol to record
3、set recording options
4、click start recording
5、enter the URL of the application under test and click ok
6、perform. user steps with web application
7、click stop recording once all of the user steps have been recorded
8、save the script
脚本两种形式的展示方式:
Tree View
Script. View
两种录制模式
HTML(browser/contest sensitive)
URL(http/analog)
脚本的结构:
Vuser_init:脚本启动的时候运行一次。
Action:脚本的主体函数,可以运行任意次,由run-time setting进行设置。
Vuser_end:脚本退出的时候运行一次。
在vugen回访脚本的目的:
1、The goal is to perform. a sanity check before the script. is assigned in the controller.
2、Test the script. with just one vuser to verify basic functionality.
3、Configure run-time settings to test specific aspects of the script.
4、It is strongly recommended that you re-run the script. after any modifications or enhancement go verify the integrity of the script.
常用的调试工具:
1、Test results window
2、Execution log(replay log)
3、Snapshot results window:page view,server response,client request
4、Run-time viewer