MySQL needs to be tested for performance at work today.
I try to do it with LR, but MySQL needs to install a OBDC MySQL drive on the computer now, then add this MySQL driver to the data source in the management tool of the computer, test the connection database successfully, OK
Returning LR, we need to use the Lr_db_connect function to connect to the database, which is only available in WebService recording.
Open the connection, note that the driver is installed above
int numrows=0;
int i;
Lr_db_connect ("Stepname=databaseconnect",
"Connectionstring=driver={mysql ODBC 5.3 ANSI DRIVER}; server=58.215.41.6; port=3306;database=dbo; User=mysqluser; Password=123456;option=3 ",
"Connectionname=mysql",
"Connectiontype=odbc", last);
Lr_start_transaction ("SQL");
Lr_db_executesqlstatement ("Stepname=performquery",
"Connectionname=mysql",
"Sqlstatement=select * from Himall_members",
"Datasetname=mysql", last);//Execute SQL statement
Lr_db_executesqlstatement ("Stepname=performquery",
"Connectionname=mysql",
"Sqlstatement=select * from Himall_skus",
"Datasetname=mysql", last);
/*lr_output_message (Lr_eval_string ("{idparam}"); */
Lr_end_transaction ("SQL", Lr_auto);
Lr_output_message ("The query returned%d rows.", NumRows);
/*lr_db_dataset_action ("Stepname=actionprint",
"Datasetname=mysql",
"Action=print",
last); *//perform operations on the database
Lr_db_disconnect ("Stepname=disconnect",
"Connectionname=mysql", last);
The value of ConnectionName is the same as the ConnectionName value in Lr_db_connect
Disconnecting from Database
But WebService needs to support Websevice's license to run the scenario.
and webservice only supports up to 100 concurrent! It's a pit!
LR Test Database Summary