LoadRunner Note-2

来源:互联网 发布:美工软件有哪些 编辑:程序博客网 时间:2024/04/29 09:11

1. LoadRunner中的View:

   Script View, Tree View, Thumbnail View

   The Script and Tree views are available for most Vuser types. Many protocols also support the Thumbnail view.

2. 创建脚本所需要的步骤:

    Task                                        Sub Tasks
    Recording                               Record Application, Recording Summary (recordable protocols)
    Script Creation                        Create Script, Creation Summary (for Web Services, C))
    Verification                              Verify Replay
    Enhancements                        Introduction, Transactions, Parameterization, Content Checks (for Web Vusers)
    Prepare for Load                     Introduction, Iterations, Concurrent Users

3. Vuser Script的创建与执行:

  • 脚本的创建

         通过recording的日志生成脚本?       

  • 脚本的执行  

       When you run a Vuser script, it is processed by aninterpreter and then executed. You do not need to compile the script.

       If you  modify a script, any syntax errors introduced into the script are noted by the interpreter.

4. Vuser Function:

    ➤ General Vuser Functions
    ➤ Protocol-Specific Vuser Functions

    Standard ANSI C functions

     The general Vuser functions and the protocol-specific functions together form the LoadRunner API.

     This API enables Vusers to communicate directly with a server.

5.Correlating Statements

    The primary reasons for correlating statements are:

  • to simplify or optimize your code
  • For example, if you perform a series of dependent queries one after another, your code may become very long. In order to reduce the size of the code, you can nest the queries, but then you lose precision and the code becomes complex and difficult to understand. Correlating the statements enables you to link queries without nesting.

  • for dynamic data
  • Many applications and Web sites identify a session by the current date and time. If you try to replay a script, it will fail, because the current time is different than the recorded time. Correlating the data enables you to save the dynamic data and use it throughout the scenario run.

  • to accommodate unique data records
  • Certain database applications require the use of unique values. A value which was unique during recording is no longer unique for script execution. For example, suppose you record the process of opening a new bank account. Each new account is assigned a unique number which is unknown to the user. This account number is inserted into a table with a unique key constraint during recording. If you try to run the script as recorded, it will try to create an account with the recorded number, rather than a new unique number. An error will result because the account number already exists.

     If you encounter an error when running your script, examine the script at the point where the error occurred.

     In many cases, a correlated query will solve the problem, by enabling you to use the results of one statement as input to another.

6.  Vuser如何录制跨多个协议的脚本?

7. 单协议脚本支持多action是什么意思?

    For single-protocol Vuser scripts that support multiple actions (Oracle NCA, Web, RTE, C Vusers, WAP, i-Mode,

    and VoiceXML), you can add a new section by selecting Actions > Create New Action and specify a new action name.

 

 

 

原创粉丝点击