关键词不能为空

当前您在: 主页 > 英语 >

在Jmeter中使用自定义编写的Java测试代码

作者:高考题库网
来源:https://www.bjmy2z.cn/gaokao
2021-02-13 11:13
tags:

-

2021年2月13日发(作者:flipside)







-



<


rss


xmlns:xsi


=


/2001/XMLSchema- instance




xmlns:xs d


=


/2001/XMLSchema



version


=


2.0

< p>



-


< br><


channel


>





<


tit le


>


jmeter - CSDN tag

< br>


title


>






<


link


>


/tag/jmeter/



link


>






<


description


>


jmeter - CSDN tag



description

< p>
>






<


generator


>




generator


>






<


pubDate

< br>>


Tue, 23 Jan 2007 18:21:13 GMT



pubDate


>




-



<


item


>





<


tit le


>



Jmeter


中使用自定义编写的


Java


测试代码



title


>






<


link


>


/Article/92c1e d77-4347-4964-a424-97ee871000




link


>






<


author


>


乐以忘忧

< br>


author


>






<


guid


>


92c1ed77-4347- 4964-a424-97ee87100036



guid


>






<


pubDate

< br>>


Fri, 19 Jan 2007 15:02:14 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/92c1ed77-4347-4964-a424- 97ee87100





Jmeter


中使用自定义编写的


Java

< p>
测试代码



source


>






<


description


>


       


我们在做性


能测试时


,


有时需要自己编写测试脚本


,


很多测试工具都支持自定 义编写测试脚本


,


比如


LoadRun ner


就有很多自定义脚本的协议


,


比 如


"C Vuser","Java


Vuser"


等协议


.

同样


,Jmeter


也支持自定义编写的测试代码


,


不过与


LoadRunner



同的是


,Jmeter


没有 自带编译器


,


需要借助第三方编译器才能实现

< br>.


下面举一个简单的


Java



定义测试代码例子


,


使用


Java


编译器编写测试代码


(Java

< p>
编译器可以用


Eclipse,JBulider



),


实现功能为


:

< br>在测试前输入任意一个字符串


,


然后判断该字符串的长度 是否大于


5,


如果大于


则测试结果成功


,


否则测试结果位失败


,


然后在放到


Jmeter


中模拟

10


个用户测试


,


同时运行这


段代码


,


具体实现如下

:        1.


打开


Java


编译器


,


新建一个项目


"TestLength&quo t;,


然后新建一个包


"app".&# 160;      &

#160;2.



Jmeter


的 安装目录


libext


中拷贝两个文件


"ApacheJMeter_"



&q uot;ApacheJMeter_"



&quo t;Tester"


的项目中


,

然后引入


这两个


JAR


文件


.(



description

< p>
>







item


>



-



<


item


>





<


tit le


>


Jmeter Validation

< br>


title


>






<


link


>


/Article/82097 3cb-4f74-40f8-8104-2105c6dce27



link


>






<


author


>


harshae

< p>


author


>






<


guid


>


820973cb-4f74- 40f8-8104-2105c6dce27b



guid


>






<


pubDate

< br>>


Sun, 14 Jan 2007 00:00:00 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/820973cb-4f74-40f8-8104- 2105c6dce2




Jmeter Validation



source


>






<


description


>


Hi I want to validate Meter testing anyone validated


previously?.Could you please anyone help me in writing a verification test


plan to validate Jmeter(related documents).Thanks in


advanceHarsha.



description


>






item


>



-



<


item


>





<


tit le


>


Apache JMeter


< /


title


>






<


link


>


/Article/aaf52 511-d0eb-453f-9cd1-39d57b86cbf



link


>






<


author


>


Steve



author


>






<


guid


>


aaf52511-d0eb- 453f-9cd1-39d57b86cbfa



guid


>






<


pubDate

< br>>


Sun, 14 Jan 2007 00:00:00 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/aaf52511-d0eb-453f-9cd1- 39d57b86cbf




Apache JMeter



source


>






<


description


>

< br>Hi all,I?ll apologise now as this is a little off topic, but I?m


getting


desparate I am using JMeter to regression test a Web based administration


console.I tried various JMeter, and non JMeter, related newsgroups,


mailing lists, IRC channels and forums but I haven?t had any


joy.



descrip tion


>







it em


>



-



<


item


>





<


tit le


>


JMeter problem



title


>






<


link


>


/Article/d2034 e74-17a5-49ee-9cd6-fa7f657c971



link


>






<


author


>


PRABUSHANKAR CHINNASAMY



author


>






<


guid


>


d2034e74-17a5-49ee-9cd6-fa7f657c9712



guid


>






<


pub Date


>


Sun, 14 Jan 2007 00:00:00 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/d2034e74-17a5-49ee-9cd6- fa7f657c97




JMeter problem



source


>< /p>






<


description


>


I?m using JMeter to test my webserver+components for runtime


application uses Struts framework.I couldn?t get my JMeter


someone suggest me some work around?



description

< br>>







item


>



-



<


item


>





<


tit le


>


JMeter Java Request



title


>






<


link


>


/Article/119b8 b4c-ac45-47ce-a6e6-174dae9abe9



link


>






<


author


>


David Brown< /p>



author


>





<


guid


>


119b8b4c-ac 45-47ce-a6e6-174dae9abe94



g uid


>






<


pubDate

< br>>


Sun, 14 Jan 2007 00:00:00 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/119b8b4c-ac45-47ce-a6e6- 174dae9abe




JMeter Java Request



source

< br>>






<


description


>


I am new to using JM


eter, I have been trying to use the ?Java


Request? within a Thread r when I run the test it executes


upto and including the Java Request but does not execute anything


afterwards.



description


>







item


>



-



<


item


>





<


tit le


>


使用



JMeter


完成常用的压力测试


< /


title


>






<


link


>


/Article/d93e2 32d-edf7-4d4a-887d-52c32649cf7



link


>






<


author


>


yzsind



author


>






<


guid


>


d93e232d-edf7- 4d4a-887d-52c32649cf79



guid


>






<


pubDate

< br>>


Thu, 11 Jan 2007 14:04:18 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/d93e232d-edf7-4d4a-887d- 52c32649cf




使用

< p>


JMeter


完成常用的压力测试

< p>


source


>






<


description


>


JMeter


完成常用的压力测试。


并以



JMeter


为例,


介绍了使用它来 完成最常用


的三种类型服务器,即



Web


服务器、数据库服务器和消息中间件,压力测试的方法 、步骤以


及注意事项。


4.


逻辑控制 器可以自定义


JMeter


发送请求的行为逻辑,它与


Sampler


结合


使用可以模拟复杂的请求序 列。它们都是请求主要发生的地点,请求频率较其它的节点要高,


而且处于请求序列的关 键路径之上。本文介绍了如何使用


JMeter


完成最常用的三 种类型服务


器的压力测试,这三种类型的压力测试涵盖了很大一部分的使用情形,然而需 要记住的是工具


毕竟是工具。



de scription


>







it em


>



-



<


item


>





<


tit le


>


如何区分


Server Time




Network Ti me



title


>





<


link


>


/Article/ 3af13249-5383-4c9c-bdc2-26e3dd80354




link


>






<


author


>


ACDSee



author


>






<


guid


>


3af13249-5383- 4c9c-bdc2-26e3dd803549



guid


>






<


pubDate

< br>>


Sun, 31 Dec 2006 23:27:44 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/3af13249-5383-4c9c-bdc2- 26e3dd8035




如何区分


Server Time




Network Time



sou rce


>






<


description


>


如何区分


Server Time




Network Time.




LR


中是有一个


"


网页


细分图


"


的,


通过这个图,


你可以比较容易的区分哪些请求的响应时间最长,


如果响应时< /p>


间过程,


是消耗在


server


处理的时候,


还是消耗在网络传输过程中


--- -


也就是所谓的



Server


time




Network time



JMeter


并没有提供 这么详细的区分


----


至少目前尚未发现,但


是在



JMeter


的执行结果中也有一个字段可以利用一下。在



ties


中找到



_format=csv


改为


_fo rmat=xml.



description


>







item


>



-



<


item


>





<


tit le


>


Database Connection Pooling with Tomcat



title


>






<


link


>


/Article/09c833a6-884c-4b7c-b789-b8a90 9aaeef




link

< p>
>






<


author



/>






<


guid


>


09c833a6-884c-4b7c-b789-b8a909aaeefc



guid


>






<


pubDate


>


Tue, 19 Dec 2006 00:00:00 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/09c833a6-884c-4b7c-b789- b8a909aaee




Databas e Connection Pooling with Tomcat


< p>
source


>






<


des cription


>


Pooled DB connections deviation (click for full-size


image)<img


src="/onj ava/2006/04/19/graphics/non_pooling_"


alt="Thumbnail, click for full- size image."


width="450" height="337" border="0"


/>Figure -pooled DB connections deviation (click for full-size


image)After several test runs, it turned out that connection pooling is at


least four times faster than explicitly creating a DB connection object from


the ground up.



d escription


>







it em


>



-



<


item


>





<


tit le


>


Using JMeter



title


>






<


link


>


/Article/51602 ac5-46e3-442f-9f3f-dd9cb75522b



link


>






<


author



/>






<


guid


>


51602ac5-46e3-442f-9f3f-dd9cb75522b2



guid


>






<


pubDate


>


Tue, 19 Dec 2006 00:00:00 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/51602ac5-46e3-442f-9f3f- dd9cb75522b




Using JMeter



source


>






<


description


>

< br>When I ran my test plan, I got the results like those shown in


Figure 4.<img


src="/onjava/2003/01/15/graphics/" />Figure 4:


A table report.A popularlistener is the Graph Results, as shown in Figure 5.


<img src="/onjava/2003/01/15/graphics/"


/>Figure 5: Graph 6 shows the detail page of aHTTP


Request Defaults element.<img


src="/onjava/2003/ 01/15/graphics/" />Figure 6:


HTTP request provides cookie



description


>







item


>



-



<


item


>





<


tit le


>


Using JMeter



title


>






<


link


>


/Article/2b52f e88-4350-4ade-b3e7-2fd604c000b



link


>






<


author



/>






<


guid


>


2b52fe88-4350-4ade-b3e7-2fd604c000b8



guid


>






<


pubDate


>


Tue, 19 Dec 2006 00:00:00 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/2b52fe88-4350-4ade-b3e7- 2fd604c000




Using J Meter



source


>





< p>
<


description


>

When I ran my test plan, I got the results like those shown in


Figure 4.<img


src="/onjava/2003/01/15/graphics/" />Figure 4:


A table report.A popularlistener is the Graph Results, as shown in Figure 5.


<img src="/onjava/2003/01/15/graphics/"


/>Figure 5: Graph 6 shows the detail page of aHTTP


Request Defaults element.<img


src="/onjava/2003/ 01/15/graphics/" />Figure 6:


HTTP request provides cookie



description


>







item


>



-



<


item


>





<


tit le


>


Using JMeter



title


>






<


link


>


/Article/850f1 32d-a5ea-4c26-a310-594a81dfc64



link


>






<


author



/>






<


guid


>


850f132d-a5ea-4c26-a310-594a81dfc64e



guid


>






<


pubDate


>


Tue, 19 Dec 2006 00:00:00 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/850f132d-a5ea-4c26-a310- 594a81dfc6




Using J Meter



source


>





< p>
<


description


>

When I ran my test plan, I got the results like those shown in


Figure 4.<img


src="/onjava/2003/01/15/graphics/" />Figure 4:


A table report.A popularlistener is the Graph Results, as shown in Figure 5.


<img src="/onjava/2003/01/15/graphics/"


/>Figure 5: Graph 6 shows the detail page of aHTTP


Request Defaults element.<img


src="/onjava/2003/ 01/15/graphics/" />Figure 6:


HTTP request provides cookie



description


>







item


>



-



<


item


>





<


tit le


>


Database Connection Pooling with Tomcat



title


>






<


link


>


/Article/9f1e0ec5-18f4-4822-844a-52955 10c763




link

< p>
>






<


author



/>






<


guid


>


9f1e0ec5-18f4-4822-844a-5295510c763b



guid


>






<


pubDate


>


Tue, 19 Dec 2006 00:00:00 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/9f1e0ec5-18f4-4822-844a- 5295510c76




Databas e Connection Pooling with Tomcat


< p>
source


>






<


des cription


>


Pooled DB connections deviation (click for full-size


image)<img


src="/onj ava/2006/04/19/graphics/non_pooling_"


alt="Thumbnail, click for full- size image."


width="450" height="337" border="0"


/>Figure -pooled DB connections deviation (click for full-size


image)After several test runs, it turned out that connection pooling is at


least four times faster than explicitly creating a DB connection object from


the ground up.



d escription


>







it em


>



-



<


item


>





<


tit le


>


Database Connection Pooling with Tomcat



title


>






<


link


>


/Article/df62ce6a-de85-4b69-8b59-82931 c2363f




link

< p>
>






<


author



/>






<


guid


>


df62ce6a-de85-4b69-8b59-82931c2363f7



guid


>






<


pubDate


>


Tue, 19 Dec 2006 00:00:00 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/df62ce6a-de85-4b69-8b59- 82931c2363




Databas e Connection Pooling with Tomcat


< p>
source


>






<


des cription


>


Pooled DB connections deviation (click for full-size


image)<img


src="/onj ava/2006/04/19/graphics/non_pooling_"


alt="Thumbnail, click for full- size image."


width="450" height="337" border="0"


/>Figure -pooled DB connections deviation (click for full-size


image)After several test runs, it turned out that connection pooling is at


least four times faster than explicitly creating a DB connection object from


the ground up.



d escription


>







it em


>



-



<


item


>





<


tit le


>


Using JMeter



title


>






<


link


>


/Article/2d0dd d68-3c41-46ca-8cb1-5d843cb195




link


>






<


author


>


Budi Kurniaw an



author


>





< br><


guid


>


2d0ddd68 -3c41-46ca-8cb1-5d843cb19525


guid


>






<


pub Date


>


Tue, 19 Dec 2006 00:00:00 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/2d0ddd68-3c41-46ca-8cb1- 5d843cb195




Using J Meter



source


>





< p>
<


description


>

JMeter is a Java-based tool for load testing client-server


1.8 requires a working JDK 1.4


x/UNIX, run JMeter by invoking the jmeter shell


1 showsJMeter?s main wi


ndow, which is a Swing


application.<img


src=&quo t;/onjava/2003/01/15/graphics/" />Figure 1:


JMeter?s main the number of threads used is 10and the ramp


-up


period is 20 seconds, JMeter will take 20 seconds to createthose 10


threads, creating one new thread eve



description


>







it em


>



-



<


item


>





<


tit le


>


Database Connection Pooling with Tomcat



title


>






<


link


>


/Article/78c64dbc-b5e1-40a9-8f64-e8a8b 54e455




link

< p>
>






<


author



/>






<


guid


>


78c64dbc-b5e1-40a9-8f64-e8a8b54e455d



guid


>






<


pubDate


>


Tue, 19 Dec 2006 00:00:00 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/78c64dbc-b5e1-40a9-8f64- e8a8b54e45




Databas e Connection Pooling with Tomcat


< p>
source


>






<


des cription


>


Pooled DB connections deviation (click for full-size


image)<img


src="/onj ava/2006/04/19/graphics/non_pooling_"


alt="Thumbnail, click for full- size image."


width="450" height="337" border="0"


/>Figure -pooled DB connections deviation (click for full-size


image)After several test runs, it turned out that connection pooling is at


least four times faster than explicitly creating a DB connection object from


the ground up.



d escription


>







it em


>



-



<


item


>





<


tit le


>


Database Connection Pooling with Tomcat



title


>






<


link


>


/Article/1512e337-59d1-4b91-ada2-3b81c 0a3c5




link


>






<


author



/>






<


guid


>


1512e337-59d1-4b91-ada2-3b81c0a3c5cb



guid


>






<


pubDate


>


Tue, 19 Dec 2006 00:00:00 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/1512e337-59d1-4b91-ada2- 3b81c0a3c5




Databas e Connection Pooling with Tomcat


< p>
source


>






<


des cription


>


Pooled DB connections deviation (click for full-size


image)<img


src="/onj ava/2006/04/19/graphics/non_pooling_"


alt="Thumbnail, click for full- size image."


width="450" height="337" border="0"


/>Figure -pooled DB connections deviation (click for full-size


image)After several test runs, it turned out that connection pooling is at


least four times faster than explicitly creating a DB connection object from


the ground up.



d escription


>







it em


>



-



<


item


>





<


tit le


>


Database Connection Pooling with Tomcat



title


>






<


link


>


/Article/404b3d97-11ba-4b69-abe1-dc975 2785f




link


>






<


author



/>






<


guid


>


404b3d97-11ba-4b69-abe1-dc9752785f88



guid


>






<


pubDate


>


Tue, 19 Dec 2006 00:00:00 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/404b3d97-11ba-4b69-abe1- dc9752785f




Databas e Connection Pooling with Tomcat


< p>
source


>






<


des cription


>


Pooled DB connections deviation (click for full-size


image)<img


src="/onj ava/2006/04/19/graphics/non_pooling_"


alt="Thumbnail, click for full- size image."


width="450" height="337" border="0"


/>Figure -pooled DB connections deviation (click for full-size


image)After several test runs, it turned out that connection pooling is at


least four times faster than explicitly creating a DB connection object from


the ground up.



d escription


>







it em


>



-



<


item


>





<


tit le


>


Database Connection Pooling with Tomcat



title


>






<


link


>


/Article/5896adc8-4687-4c4c-bf12-c4d68 2117bb




link

< p>
>






<


author



/>






<


guid


>


5896adc8-4687-4c4c-bf12-c4d682117bb6



guid


>






<


pubDate


>


Tue, 19 Dec 2006 00:00:00 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/5896adc8-4687-4c4c-bf12- c4d682117b




Databas e Connection Pooling with Tomcat


< p>
source


>






<


des cription


>


Pooled DB connections deviation (click for full-size


image)<img


src="/onj ava/2006/04/19/graphics/non_pooling_"


alt="Thumbnail, click for full- size image."


width="450" height="337" border="0"


/>Figure -pooled DB connections deviation (click for full-size


image)After several test runs, it turned out that connection pooling is at


least four times faster than explicitly creating a DB connection object from


the ground up.



d escription


>







it em


>



-



<


item


>





<


tit le


>


Using JMeter



title


>






<


link


>


/Article/4bac9 b4a-9308-4424-8ba3-5f592c65b07



link


>






<


author



/>






<


guid


>


4bac9b4a-9308-4424-8ba3-5f592c65b075



guid


>






<


pubDate


>


Tue, 19 Dec 2006 00:00:00 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/4bac9b4a-9308-4424-8ba3- 5f592c65b0




Using J Meter



source


>





< p>
<


description


>

When I ran my test plan, I got the results like those shown in


Figure 4.<img


src="/onjava/2003/01/15/graphics/" />Figure 4:


A table report.A popularlistener is the Graph Results, as shown in Figure 5.


<img src="/onjava/2003/01/15/graphics/"


/>Figure 5: Graph 6 shows the detail page of aHTTP


Request Defaults element.<img


src="/onjava/2003/ 01/15/graphics/" />Figure 6:


HTTP request provides cookie



description


>







item


>



-



<


item


>





<


tit le


>


Using JMeter



title


>






<


link


>


/Article/9e01d a44-3ae6-4231-92ef-db96ddfa239



link


>






<


author



/>






<


guid


>


9e01da44-3ae6-4231-92ef-db96ddfa239d



guid


>






<


pubDate


>


Tue, 19 Dec 2006 00:00:00 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/9e01da44-3ae6-4231-92ef- db96ddfa23




Using J Meter



source


>





< p>
<


description


>

When I ran my test plan, I got the results like those shown in


Figure 4.<img


src="/onjava/2003/01/15/graphics/" />Figure 4:


A table report.A popularlistener is the Graph Results, as shown in Figure 5.


<img src="/onjava/2003/01/15/graphics/"


/>Figure 5: Graph 6 shows the detail page of aHTTP


Request Defaults element.<img


src="/onjava/2003/ 01/15/graphics/" />Figure 6:


HTTP request provides cookie



description


>







item


>



-



<


item


>





<


tit le


>


Using JMeter



title


>






<


link


>


/Article/ca8d2 7ec-e66f-4f58-bde3-556be9c36c9



link


>






<


author



/>






<


guid


>


ca8d27ec-e66f-4f58-bde3-556be9c36c9d



guid


>






<


pubDate


>


Tue, 19 Dec 2006 00:00:00 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/ca8d27ec-e66f-4f58-bde3- 556be9c36c9




Using JMeter



source


>






<


description


>

< br>When I ran my test plan, I got the results like those shown in


Figure 4.<img


src="/onjava/2003/01/15/graphics/" />Figure 4:


A table report.A popularlistener is the Graph Results, as shown in Figure 5.


<img src="/onjava/2003/01/15/graphics/"


/>Figure 5: Graph 6 shows the detail page of aHTTP


Request Defaults element.<img


src="/onjava/2003/ 01/15/graphics/" />Figure 6:


HTTP request provides cookie



description


>







item


>



-



<


item


>





<


tit le


>


Using JMeter



title


>






<


link


>


/Article/ba529 ad6-663e-46b8-9444-1c93545ac9




link


>






<


author



/>






<


guid


>


ba529ad6-663e-46b8-9444-1c93545ac9d4



guid


>






<


pubDate


>


Tue, 19 Dec 2006 00:00:00 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/ba529ad6-663e-46b8-9444- 1c93545ac9




Using J Meter



source


>





< p>
<


description


>

When I ran my test plan, I got the results like those shown in


Figure 4.<img


src="/onjava/2003/01/15/graphics/" />Figure 4:


A table report.A popularlistener is the Graph Results, as shown in Figure 5.


<img src="/onjava/2003/01/15/graphics/"


/>Figure 5: Graph 6 shows the detail page of aHTTP


Request Defaults element.<img


src="/onjava/2003/ 01/15/graphics/" />Figure 6:


HTTP request provides cookie



description


>







item


>



-



<


item


>





<


tit le


>


Using JMeter



title


>






<


link


>


/Article/48607 b22-1620-425d-8da1-8c2b1291a9




link


>






<


author



/>






<


guid


>


48607b22-1620-425d-8da1-8c2b1291a932



guid


>






<


pubDate


>


Tue, 19 Dec 2006 00:00:00 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/48607b22-1620-425d-8da1- 8c2b1291a




Using JM eter



source


>






<


description


>


When I ran my test plan, I got the results like those shown in


Figure 4.<img


src="/onjava/2003/01/15/graphics/" />Figure 4:


A table report.A popularlistener is the Graph Results, as shown in Figure 5.


<img src="/onjava/2003/01/15/graphics/"


/>Figure 5: Graph 6 shows the detail page of aHTTP


Request Defaults element.<img


src="/onjava/2003/ 01/15/graphics/" />Figure 6:


HTTP request provides cookie



description


>







item


>



-



<


item


>





<


tit le


>


Jmeter


变量参数化及函数 应用



title


>





<


link


>


/Article/ 1a88cc8b-58f2-4461-b729-b275936cbe5




link


>






<


author


>


乐以忘忧

< br>


author


>






<


guid


>


1a88cc8b-58f2- 4461-b729-b275936cbe5b



guid


>






<


pubDate

< br>>


Mon, 18 Dec 2006 09:20:12 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/1a88cc8b-58f2-4461-b729- b275936cbe




Jmeter< /p>


变量参数化及函数应用



source


>






<


description


>


我们在使用


Jmeter

录制脚本后,经常会对已录制的脚本进行修改,需要把一些


参数使用一些变量替代,


Jmeter


是支持这些功能的,


不过 是通过函数实现的。


_javaScript



我个人认为这个函数是最好用的函数,通过它能使用


JavaScript


所支持的所有函数,比如当


前的系统日期,


系统时间等,


它的参数也有两个,


第一个是

"JavaScript expression


to evalua te"


,这个参数是


JavaScript


的语句表达式,我们可以输入任何的


JavaScript


支持语句,调用


JavaScript


自带的函数( 可惜不能使用自己写的


JavaScript


函数,有点遗憾) 。



description


>







item


>



-



<


item


>





<


tit le


>


Java


桌面应用


Jakarta JMeter 2.2


发布



title


>






<


link


>


/Article/11b7d a19-e525-4842-b754-f08fdfae6a7



link


>






<


author


>


javajia

< p>


author


>






<


guid


>


11b7da19-e525- 4842-b754-f08fdfae6a73



guid


>






<


pubDate

< br>>


Sat, 09 Dec 2006 00:00:00 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/11b7da19-e525-4842-b754- f08fdfae6a




Java


桌面应用


Jakarta JMeter 2.2

< br>发布



source


>





< p>
<


description


>

Jakarta JMeter


开发小组


14

< p>
日宣布,发布


Java


桌面应用程序


JMeter 2.2


1.0


新版本。


Apache JMeter



100


%用


Java


编写的桌面应用程序。它也可以对服务器、


网络等模拟


heavy load


,来测试整体的性能。同时,


JMete r


也可以帮助我们进行回归测试



re gression test


)。



description


>







it em


>



-



<


item


>





<


tit le


>


如何使用


Jmeter


录制网站性能测试脚本?



title


>






<


link


>


/Article/ebd26ded-14d6-4120-929c-b469e 6a04d




link


>






<


author

>


乐以忘忧



author


>






<


guid


>


ebd26ded-14d6-4120-929c-b469e6a04d03



guid


>






<


pubDate


>


Thu, 07 Dec 2006 10:18:21 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/ebd26ded-14d6-4120-929c- b469e6a04




如何使用


Jmeter


录制网站性能测试脚本?



source


>






<


des cription


>


1


、录制脚本:< /p>


(1)


选中


Test Plan


单击鼠标右键,在弹出菜单中选择


Add->Thread Gr oup



(6)


在地址中键入要录制页 面的


URL


对页面进行操作,


Jmet er


就会自动把所进行的操作录制成为脚本了,可以看到


Thr ead Group


节点下面多了许多的子


节点就是录制生成的 脚本;以上就是录制和运行的全部内容,如果有更复杂的操作需求,


Jmeter


也可以修改脚本和参数化变量,因为关于


Jmeter


的脚本录制方法是从网上转载的,


不能在下面添加,所以我会另写一遍关于


Jmeter


的脚本的修改和参数化变量的文章。

< br>


description


>







item


>



-



<


item


>





<


tit le


>


(


更新到



2006-12-12)


两个新的系列文章的写作计划< /p>


——



LoadRunner


没有告诉


你的》和《


JMeter


从入门到精通》



title

>






<


link


>


/Article/850894d1-65a5-40b5-bef5-04d715578f8




link


>

< p>





<


author


>


Jacke i



author


>





<


guid


>


850894d1- 65a5-40b5-bef5-04d715578f84



guid


>






<


pub Date


>


Mon, 04 Dec 2006 00:00:00 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/850894d1-65a5-40b5-bef5- 04d715578f




(


更新到



2006-12-12)


两个新的系列文章的写作计划


——


< br>LoadRunner



有告诉你的》和《

< p>
JMeter


从入门到精通》



source


>






<


des cription


>


(计划与


&quo t;


正确的分析和调优方法


"


一文合并)《


JMeter


从入门到


精通》



开始你的第一个


JMeter


脚本(已完成)



JMeter


测试结果分析入门



JMeter


脚本


的参数化



理 解


JMeter


中常用的组件



JMeter


测试结果分析详解



如何使用



JMeter




Schedule


功能来完成


LoadRunner



Controller


的功能



没有


LoadRunner


我们如何


获取各种性能计数器的数据?


[


翻译


]


如何解决使用



JMeter


时遇到的问题(已完成)



使用



JMeter


分布式性能测试(已完成)



使用命令行方式运行



JMeter


脚本(已完成)



使用


JMeter


测试数据库性能(已完成)



LoadRunner vs. JMeter </span#


//



description

< br>>







item


>



-



<


item


>





<


tit le


>




JMeter


压力测试工具中使用变量



title


>






<


link


>


/Article/f390c 300-636c-4c4f-969c-1d7aab27bf94


.html



link


>






<


author



/>






<


guid


>


f390c300-636c-4c4f-969c-1d7aab27bf94



guid


>






<


pubDate


>


Sun, 03 Dec 2006 00:00:00 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/f390c300-636c-4c4f-969c- 1d7aab27bf9




< p>


JMeter


压力测试工具中使用变量



source


>






<


description



/>







item


>



-



<


item


>





<


tit le


>


使用


JMeter


测试


JSP


应用程序性能


< /


title


>






<


link


>


/Article/4a4c9 680-f2d3-481f-9994-237dcee6b69



link


>






<


author



/>






<


guid


>


4a4c9680-f2d3-481f-9994-237dcee6b69f



guid


>






<


pubDate


>


Sat, 02 Dec 2006 00:00:00 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/4a4c9680-f2d3-481f-9994- 237dcee6b6




使用

< p>
JMeter


测试


JSP


应用程序性能



source


>






<


description



/>







item


>



-



<


item


>





<


tit le


>


Web


模块测试过程(利用


JMeter


工具)


< br>title


>






<


lin k


>


/Article/ae5c0fec-561a-44c c-b0bf-30f51938c45b


.html



link


>






<


author



/>






<


guid


>


ae5c0fec-561a-44cc-b0bf-30f51938c45b



guid


>






<


pubDate


>


Sat, 02 Dec 2006 00:00:00 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/ae5c0fec-561a-44cc-b0bf- 30f51938c45




Web


模块测试过程(利用


JMeter


工具)



source


>






<


description


>


关于性能测 试软件


Jmeter


的简单使用(图示)


1




首先要下载

< br>jmeter


这个软


件,现在最新的是

< br>2.03


版本的。


3




添加测试结果监听器,并选择测试结果输出的样式。基


本的使用方法就是以上内容,更多详细的资料请参考如下网址:


/jmeter /usermanual/


上一篇:



pal


翻译下一篇:



整合


PDF



Java


技术。



description


>







item


>



-



<


item


>





<


tit le


>


如此计算,是否合理,欢迎指正



title


>






<


link


>


/Article/2db52 93e-b215-4a1f-a46d-a8d68f4758c



link


>






<


author


>


coolwasp



author


>






<


guid


>


2db5293e-b215- 4a1f-a46d-a8d68f4758ca



guid


>






<


pubDate

< br>>


Fri, 01 Dec 2006 13:40:05 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/2db5293e-b215-4a1f-a46d- a8d68f4758




如此计算,是否 合理,欢迎指正



source


>< /p>






<


description


>


 


说明:以下表格数据均来自我们的培训平台统计数据,其中学员 数


9963


,教师数


222

< p>
,共计用户


10185


个。数据真实有效,是我们 评估培训平台其他各项数


据的最好依据。



 


每日文章数和访问数分析



 


日期



文章数



评论数



会员访




非会员访问



总访问



5 38719 6856< /p>



description


>







item


>



-



<


item


>





<


tit le


>


Jmeter


使用之脚本录制回 放



title


>

< br>





<


link


>


/Article/8 36298a9-239d-4e5b-a31b-de6c274aa3




link


>






<


author



/>






<


guid


>


836298a9-239d-4e5b-a31b-de6c274aa32a



guid


>






<


pubDate


>


Fri, 01 Dec 2006 00:00:00 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/836298a9-239d-4e5b-a31b- de6c274aa




Jmeter


使用之脚本录制回放



source


>






<


description


>


3



运行及记录结果 设置



(1)


完成脚本的录制后还需要 定义你所需的结果设置才算


完成了


Test Plan


的设置,首先要设置


Thread Group


(相当于虚拟用户组)的属性,单击


Thread Group


,在右边的窗口中设置


Number of Thr ead


(相当于虚拟用户数)为


5


,< /p>


Ramp-Up Period(in seconds)



1



Loop Cout

< br>选项取消选中


Forever


,在右边的框


中输入


2


。这里再附上我使用的一段脚本

< p>
----


设置浏览器代理服务器的脚本,功能是设置代理

< br>服务器为


localhost


,端口为

< br>8080


,并打开一个浏览器实例,关闭该实例则取消代理服务器


的设置。



description


>







item


>



-



<


item


>





<


tit le


>


Jmeter


用户思考时间



User think time




定时器,


和代理服务器



proxy server

< p>



title


>






<


link


>


/Art icle/9a10838b-d7cd-4eac-9871-d0064f0ce22




link


>





<


author


>


coolwasp< /p>



author


>





<


guid


>


9a10838b-d7 cd-4eac-9871-d0064f0ce22d



g uid


>






<


pubDate

< br>>


Wed, 22 Nov 2006 11:52:51 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/9a10838b-d7cd-4eac-9871- d0064f0ce2




Jmeter


用户思考时间(


User think time


),定时器,和代理服务器(


proxy

< p>
server




so urce


>






<


des cription


>



在负载测试中需 要考虑的的一个重要要素是思考时间(


think time


),



也就

< br>是在两次成功的访问请求之间的暂停时间。



有多种情形挥发导致延迟的发生:



用 户需要时间


阅读文字内容,或者填表,或者查找正确的链接等。未认真考虑思考时间经常 会导致测试结果


的失真。例如,估计数值不恰当,也就是被测系统可以支持的最多用户量 (并发用户)看起来


好像要少一些等。





Jmeter

提供了一整套的计时器(


timer


)来模拟思考时间(< /p>


think


time


),



但是仍旧存在一个问题:


:


如何确定适当的思考时间呢?幸运的是,



JMeter


提供


了一个不错的答案:使用



JMeter HTTP


代理服务器(


Proxy Server


)元件。





代理服


务器会记录在使用一个普通的 浏览器


(如


FireFox




Internet Explor er



浏览一个


web


应用时的操作。



另外,



JMeter


在记录操作的同时会建立一个测试计划(


test plan< /p>


)。这


个功能能提供以下便利:





不必手工建立


HTTP


访问请求,



尤其是当要设置一些令人 乏味


的参数时(然而,非英文的参数也许不能正常工作


)



JMeter


将会录制包括隐含字 段



description


>







item


>



-



<


item


>





<


tit le


>


如何建立和使用


Jmeter< /p>


测试环境(初学者)



title


>






<


link


>


/Article/40c4e807-bb80-47e8-83d3-c39ce 1d9df8




link

< p>
>






<


author

>


coolwasp



auth or


>






<


guid


>


40c4e807-bb80-47e8-83d3-c39ce1d9df80



guid


>






<


pubDate


>


Wed, 22 Nov 2006 11:36:27 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/40c4e807-bb80-47e8-83d3- c39ce1d9df




如何建立和使用


Jmeter


测试环境(初学者)



source


>






<


description


>


一、

< p>
 


工具描述


apache jmete r



100


%的


java


桌面应用程序,


它被


设计用 来加载被测试软件功能特性、


度量被测试软件的性能。


设计


jmeter


的初衷是测试


web


应用,


后来又扩充了其它的功能。


jmeter


可以完成针对静态资源和动态资源



s ervlets, perl


脚本


, java


对象


,


数据查询


s, ftp


服务等)的性能测试。



jme ter


可以模拟大量的服务器负


载、网络负载、软件对象负载, 通过不同的加载类型全面测试软件的性能。并且


jmeter


提 供


图形化的性能分析。



二、


 


使用环境


JMeter

< p>
可以运行在


solaris, linux, windows


(98, nt, 2000



2003). jdk1.4


以上。本文章主要介绍使用


JMeter


测试


windows



境的


web server



DB server


的环境搭建步骤,


以及使用


Jmeter


进行压力测试的入门。


三、


 

软件下载


JDK1.5 


/javase/downloads/che tomcat


5.5   /download-



description


>







item


>



-



<


item


>





<


tit le


>



JMeter


从入门到精通》之一


——


开始你的第一个


JMeter


脚本



ti tle


>






<


link


>


/Article/993ea08a-eeda-44ee-8615-daa40 58863




link


>






<


author

>


Jackei



author


>






<


guid


>


993ea08a-eeda-44ee-8615-daa4058863eb



guid


>






<


pubDate


>


Fri, 10 Nov 2006 00:00:00 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/993ea08a-eeda-44ee-8615- daa4058863





JMeter


从入门到精通》之一


——


开始你的第一个


JMeter


脚本

< br>


source


>






<


description


>


也许是一种推广 策略,


Badboy


提供了将


Web< /p>


测试脚本直接导出生成


JMeter


脚 本的功能,并且这个功能非常好用,也非常简单。点击这里下载本文中用到的示例脚本,其


中包括


yahoo_ Badboy


的脚本文件,可以直接用


Badboy


打开


yahoo_ JMeter


的脚本文件,可以直接用



JMeter


打开



Badboy


官方网站



/ JMeter


官方站点



/jmeter/ P.S.


这样短短一篇小文章,


从开始写到整理示例


脚本,到最后发布,两个半小时飞快的过去了。



description


>

< p>






item


>



-



<


item


>





<


tit le


>


使用


JMeter


进行性能测试



title


>






<


link


>


/Article/8eaff2f6-5d85-4de6-9ec7-273856af32fb.


html



link


>





< /p>


<


author


>


shielden



author


>





< /p>


<


guid


>


8 eaff2f6-5d85-4de6-9ec7-273856af32fb



guid


>






<


pub Date


>


Wed, 08 Nov 2006 23:47:50 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/8eaff2f6-5d85-4de6-9ec7- 273856af32f




使用


JMeter


进行性能测试



source


>






<


des cription


>


使用


JMeter


进行性能测试



文档选项



description


>






item


>



-



<


item


>





<


tit le


>


[


翻译


]


如何解决使用



JMeter


时遇到的问题



title


>






<


link


>


/Article/f3d6dc63-a804-4c37-9ddf-eddb7 d31edb




link

< p>
>






<


author

>


Jackei



author


>






<


guid


>


f3d6dc63-a804-4c37-9ddf-eddb7d31edb7



guid


>






<


pubDate


>


Mon, 06 Nov 2006 00:00:00 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/f3d6dc63-a804-4c37-9ddf- eddb7d31ed




[


翻译


]


如何解决使用



JMeter


时遇到的问题



source


>






<


des cription


>


This is normally in the launch (i.e. bin) directory, and is called


"".


查看



JMeter


的日志文件,通常这个日志文件在你启动



JMeter


的目录下,


例如


%JMeter_HOME%bin


目录,


文件名通常是





try


setting the logging level to DEBUG for some or all of the JMeter packages


(details are in the ties file)


尝试修改



JMeter


的日志级别为



DEBUG


,以获得更多的有关



JMeter


运行的信息,来确认问题的原因。



description


>






item


>



-



<


item


>





<


tit le


>


JMeter


中的如何区分



Server Time




Network Ti me



title


>





<


link


>


/Article/ 96a59d90-fd7e-43c3-a5f2-967036d1788




link


>






<


author


>


Jackei



author


>






<


guid


>


96a59d90-fd7e- 43c3-a5f2-967036d17881



guid


>






<


pubDate

< br>>


Wed, 27 Sep 2006 00:00:00 GMT



pubDate


>






<


comments



xmlns


=


/rss/1.0/modules/s lash/



0


comments


>






<


source


url


=


/Article/96a59d90-fd7e-43c3-a5f2- 967036d178




JMeter


中的如何区分



Server Time




Network Ti me



source


>





< br><


description


>




ties


中找到



_format=csv < /p>


改为


_format=xml


重新启动< /p>



JMeter


,执行一个脚本


并保存测试结果。



descriptio n


>







item


>



-



<


item


>





<


tit le


>


使用



JMeter


分布式性能测试



title


>






<


lin k


>


/Article/aa895adc-866e-420 0-aeab-e7bbd6a8c9f



< br>link


>






<


aut hor


>


Jackei


< p>
author


>






<


gui d


>


aa895adc-866e-4200-aeab-e7 bbd6a8c9fc



guid


>






<


pubDate


>


Thu, 14 Sep 2006 00:00:00 GMT



pubDate


>



-


-


-


-


-


-


-


-



本文更新与2021-02-13 11:13,由作者提供,不代表本网站立场,转载请注明出处:https://www.bjmy2z.cn/gaokao/649671.html

在Jmeter中使用自定义编写的Java测试代码的相关文章