lib?????LoadRunner????mysql???????
???????????? ???????[ 2015/1/21 14:16:48 ] ????????LoadRunner mysql ???????
??????????mysql?????????????loadrunner??bin??include????
????????????????????????????????????????????
????http://yunpan.cn/cfTxbANSvipGi ????? 8bba
????????????е?????????е???
???????????loadrunner VUGen???????httpЭ?????????
???????????????????????????????????ɡ?
???????????????
????1???????????
#include "Ptt_Mysql.h"
#define MYSQLSERVER "192.168.1.111" //mysql?????
#define MYSQLUSERNAME "root" //?????????
#define MYSQLPASSWORD "123123" //????
#define MYSQLDB "mysql" //????????????
#define MYSQLPORT "3306" //????
MYSQL *Mconn;
vuser_init()
{
lr_load_dll("libmysql.dll");//????dll???
Mconn = lr_mysql_connect(MYSQLSERVER?? MYSQLUSERNAME?? MYSQLPASSWORD?? MYSQLDB?? atoi(MYSQLPORT));//????mysql?????
return 0;
}
|
????2????????
Action()
{
char chQuery[1024];
sprintf(chQuery??"select * from user limit 1;");
lr_start_transaction("myQuerySql");
lr_mysql_query(Mconn??chQuery); //???sql???
lr_end_transaction("myQuerySql"??LR_AUTO);
lr_save_string(row[0][0].cell??"HOST"); //????????е?????洢???????С?
lr_save_string(row[1][0].cell??"USER");
lr_save_string(row[2][0].cell??"PASSWORD");
lr_output_message(lr_eval_string("HOST: {HOST}; USER: {USER};PASSWORD:{PASSWORD}"));//??????????????????????????????????????ó????????????????????
mysql_close(Mconn);//???mysql???????????????????
return 0;
}
|
???????sql????????
//insert??????
char myString[10];
char insertSQL[22584];
int index = index +1;//???????????????ζ??????+1????????????????????
// ????????????sql???
strcpy(insertSQL?? "INSERT INTO table(ID??Name??Parameter??Info??Text??remark) VALUES('1'?? '");
strcat(insertSQL?? lr_eval_string("{Parameter}")); //???????????????????????????????????????????????????????
strcat(insertSQL?? itoa(index??myString??10)); // ??10?????????int????????index?????????????浽myString?С?
strcat(insertSQL?? "'?? '1'?? '111'?? '111'??'remarkValue')");
strcat(insertSQL?? ";");
lr_output_message("%s"??insertSQL);
// ?????sql:INSERT INTO table(ID??Name??Parameter??Info??Text??remark) VALUES('1'?? '{Parameter}1'?? '1'?? '111'?? '111'??'remarkValue');
sql???????????????м??ɡ??????????????????????
|
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
??????????????????????????????????APP?????????????????????????????????????????SQL??????????????Щ????????????????????????????????????????????????????????????????????????Web????????????????????????????????????????????????????漰????????????????????????????????Java???????????Щ??????????????????????????????????????????????????????????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????