bl双性强迫侵犯h_国产在线观看人成激情视频_蜜芽188_被诱拐的少孩全彩啪啪漫画

Loadrunner進行http接口壓力測試

附件來自百度。

為霍山等地區(qū)用戶提供了全套網(wǎng)頁設計制作服務,及霍山網(wǎng)站建設行業(yè)解決方案。主營業(yè)務為網(wǎng)站設計、成都做網(wǎng)站、霍山網(wǎng)站設計,以傳統(tǒng)方式定制建設網(wǎng)站,并提供域名空間備案等一條龍服務,秉承以專業(yè)、用心的態(tài)度為用戶提供真誠的服務。我們深信只要達到每一位用戶的要求,就會得到認可,從而選擇與我們長期合作。這樣,我們也可以走得更遠!

腳本正文:

/*

 * LoadRunner Java script. (Build: _build_number_)

 * 

 * Script Description: 

 *                     

 */

import lrapi.lr;

public class Actions

{

public int init() throws Throwable {

return 0;

}//end of init

public int action() throws Throwable {

   com.CTLPTest ct1 = new com.CTLPTest();

   ct1.main(null);

return 0;

}//end of action

public int end() throws Throwable {

return 0;

}//end of end

}

jar包內(nèi)容:

package com;

import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.security.cert.X509Certificate;
import java.util.Properties;
import java.util.Random;

import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLSession;
import javax.net.ssl.X509TrustManager;

public class CTLPTest
{
	public static void main(String[] args)
	{
		CTLPTest lbs = new CTLPTest();
		String ltpUrl = lbs.ltpRequestUrl();
		System.out.println("ltpUrl:"+ltpUrl);
		System.out.println("lbs.ltpRequestUrl(ltpUrl):"+lbs.ltpRequestUrl(ltpUrl));
	}
	

	public int ltpRequestUrl(String ltpRequestUrl)
	{
		
		int returnCount = -1;
		try
		{
			URL url = new URL(ltpRequestUrl);
			Properties prop = System.getProperties();
			System.setProperty("http.proxyHost", "proxy.com");  
			System.setProperty("http.proxyPort", "80");
			 //http
			HttpURLConnection http = (HttpURLConnection)url.openConnection();
			http.setUseCaches(false);
			http.connect();
			 //http
			InputStream in = http.getInputStream();
			//
			byte[] b = new byte[in.available()];
			in.read(b);
			//
			String res = new String(b);
			System.out.println("res:");
			System.out.println(res);

			//ж,÷
			int of = res.indexOf("resultCode");
			if (of < 0) {
				System.out.println("***************failure***********************");
				returnCount = -1;
			} else {
				returnCount = 1;
			}
		}catch(Exception e){
			System.out.println("Exception");
			System.out.println(e);
			returnCount = -1;
		}	
		return returnCount;	
		}	
		
		public String ltpRequestUrl() {
		StringBuilder param = new StringBuilder("http://xxx.xxx.com");
//		param.append("userid-1");
//		param.append("&appName=LBS&Apikey=D39hr1FgplZSjV2eNVW71wvbYbl8Mip4");
		return param.toString();
	}
}

附件:http://down.51cto.com/data/2367948

本文名稱:Loadrunner進行http接口壓力測試
文章位置:http://vcdvsql.cn/article28/jhgdjp.html

成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站設計公司關(guān)鍵詞優(yōu)化定制開發(fā)品牌網(wǎng)站設計微信公眾號做網(wǎng)站

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

成都做網(wǎng)站