• 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. 

  • 相关阅读:
    模拟——1031D
    线性dp——cf1032
    莫比乌斯反演——专题练习
    数论,质因数,gcd——cf1033D 好题!
    连通图,set——cf1037E
    线段树动态开点——cf1045G
    跳表上线性dp——1150D 好题!
    高斯消元求主元——模意义下的消元cf1155E
    汽车长期停放,毁车没商量?
    驾校都是错的?这才是日常驾驶正确的换挡方式
  • 原文地址:https://www.cnblogs.com/isister/p/4562141.html
Copyright © 2020-2023  润新知