java并发测试脚本_关于压力测试的简单脚本实现

package bss.intf.thread;

import java.rmi.RemoteException;

import crmwsi.crm.WSSPortTypeProxy;

/**

* @author zhangyp

* @version 2009-02-28

*/

public class ThreadClient extends Thread {

int num;

public void setNum(int n) {

this.num = n;

}

//在run里面变动业务处理的逻辑

public void run() {

int i = 0;

String accNbr = "18920020202";

int accNbrType = 4;

String password = "111";

int passwordType = 1;

int encryptFlag = 1;

String areaCode = "022";

String channelId = "-10000";

String staffCode = "-10000";

String outXml = "";

while (i < 40) {

System.out.println("==========第"+ num + "线程里面,第"+ i + "次请求START=======");

WSSPortTypeProxy proxy = new WSSPortTypeProxy();

proxy.setEndpoint(

"http://136.64.44.237:9010/BssCrmWebService/services/CustomerService_B");

try {

outXml =

proxy.checkPassword(

accNbr,

accNbrType,

password,

passwordType,

encryptFlag,

areaCode,

channelId,

staffCode);

System.out.println(" outXml=" + outXml);

i++;

System.out.println(

"***********第" + num + "线程里面,第" + i + "次请求END*****");

} catch (RemoteException e) {

System.out.println("ERROR");

e.printStackTrace();

}

}

}

public static void main(String[] args) {

}

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值