使用rf做数据库的增删改查操作可以定义关键字,方便后续使用
关键字如下:
一、sql_查
1 [Arguments] ${host} ${port} ${user} ${passwd} ${db} ${sql} 2 Connect To Database Using Custom Params pymysql host=‘${host}‘, port=${port}, user=‘${user}‘, passwd=‘${passwd}‘, db=‘${db}‘,charset=‘utf8‘ 3 ${return} Query ${sql} 4 Disconnect From Database 5 [Return] ${return}
二、sql_增删改查
[Arguments] ${host} ${port} ${user} ${passwd} ${db} ${sql} Connect To Database Using Custom Params pymysql host=‘${host}‘, port=${port}, user=‘${user}‘, passwd=‘${passwd}‘, db=‘${db}‘,charset=‘utf8‘ #host=‘${host}‘, port=${port}, user=‘${user}‘, passwd=‘${passwd}‘, db=‘${db}‘,charset=‘utf8‘ ${return} Execute Sql String ${sql} Disconnect From Database
三、使用