并发--测试

import com.minxindai.util.HttpClientUtil; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.NameValuePair; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; /** * Created by mytesting on 2015/10/21. */ public class UsersignTest {    @Test(dataProvider = "paramInfo", threadPoolSize = 100, invocationCount = 1000)    public void saveUser(String[] paramNames,String[] paramValues) throws Exception {        HttpClient httpClient = HttpClientUtil.getHttpClient(30000);        String uri = "/userSign/sendJfandTicketByUserSign.mxd";        HttpClientUtil httpClientUtil = new HttpClientUtil();        NameValuePair[] nameValuePairs = httpClientUtil.getNameValuePairs(paramNames, paramValues);        //发送请求        httpClientUtil.sendGetRequest(httpClient, Constant.WEBSITE_BASE_URL, uri, nameValuePairs);    }    /**     * 参数     * @return     */    @DataProvider(name = "paramInfo")    public Object [][] paramInfo() {        String[] paramName = new String[]{"userId","status"};        String[] paramValue = new String[]{"145525442","1"};        return new Object[][] {                {paramName,paramValue}        };    } }

你可能感兴趣的:(并发--测试)