zoukankan      html  css  js  c++  java
  • Jmeter- Building a Web test plan(2)

    3. Adding Cookie Support

    Nearly all web testing should use cookie support, unless your application specifically doesn't use cookies. To add cookie support, simply add an HTTP Cookie Manager to each Thread Group in your test plan. This will ensure that each thread gets its own cookies, but shared across all HTTP Request objects.

    To add the HTTP Cookie Manager, simply select the Thread Group, and choose Add-->Config Element--> HTTP Cookie Manager, either from the Edit Menu, or from the right-click pop-up menu. 

    4. Adding HTTP Requests

    In our Test Plan, we need to make two HTTP requests. The first one is for the JMeter home page (http://jmeter.apache.org/), and the second one is for the Changes page (http://jmeter.apache.org/changes.html).

    note: JMeter sends requests in the order that they appear in the tree. 

    Start by adding the first HTTP Request to the JMeter Users element(Add-->Sampler-->HTTP Request). Then, select the HTTP Request element in the tree and edit the following properties.

      1) Change the Name field to "Home Page".

      2) Set the Path field to "/". Remember that you do not have to set the Server Name field because you already specified this value to the HTTP Request Defaults element.

    Next, add the second HTTP Request and edit the following properties, see figure below.

      1) Change the Name field to "Changes".

      2) Set the Path field to "/changes.html". 

    5. Adding a Listener to View Store the Test Results

    The final element you need to add to your Test Plan is a Listener. This element is responsielbe for storing all of the results of your HTTP requests in a file and presenting a visual modle of the data.

    Select the JMeter User element and add a Graph Results listener (Add -->Listener-->Graph Results). Next, you need to specify a directory and filename of the output file. You can either type it into the filename field, or select the Browse button and browse to a directory and then enter a file name. 

  • 相关阅读:
    【摄影】延时摄影
    【sas sql proc】统计
    【分析模板】excel or sas
    JavaScript的方法和技巧
    好书推荐
    七招制胜ASP.NET应用程序开发
    .Net中使用带返回值的存储过程(VB代码)
    ASP.NET 2.0构建动态导航的Web应用程序(TreeView和Menu )
    简单查询和联合查询两方面介绍SQL查询语句
    数字金额大小写转换之存储过程
  • 原文地址:https://www.cnblogs.com/isister/p/4562141.html
Copyright © 2011-2022 走看看