tfjiao python sql

case_interface
tfjiao

CREATE TABLE case_interface (
id int(2) NOT NULL AUTO_INCREMENT,
name_interface varchar(128) NOT NULL COMMENT ‘接口名称’,
exe_level int(2) DEFAULT NULL COMMENT ‘执行优先级,0代表BVT’,
exe_mode varchar(4) DEFAULT NULL COMMENT ‘执行方式:post,get,默认是post方式’,
url_interface varchar(128) DEFAULT NULL COMMENT ‘接口地址:如果以http开头的则直接使用改地址,否则拼接上不同环境的ip前缀作为接口地址’,
header_interface text COMMENT ‘接口请求的头文件,有则使用,无则调用配置文件’,
params_interface varchar(256) DEFAULT NULL COMMENT ‘接口请求的参数’,
result_interface text COMMENT ‘接口返回结果’,
code_to_compare varchar(16) DEFAULT NULL COMMENT ‘待比较的code值,用户自定义比较值,例如returncode和code等,默认returncode’,
code_actual varchar(16) DEFAULT NULL COMMENT ‘接口实际code实际返回值’,
code_expect varchar(16) DEFAULT NULL COMMENT ‘接口预期code返回值’,
result_code_compare int(2) DEFAULT NULL COMMENT ‘code比较结果,1-pass,0-fail,2-无待比较参数,3-比较出错,4-返回包不合法,9-系统异常’,
params_to_compare varchar(256) DEFAULT NULL COMMENT ‘接口比较参数集合,用于比较参数完整性’,
params_actual text COMMENT ‘接口实际返回参数’,
result_params_compare int(2) DEFAULT NULL COMMENT ‘参数完整性比较结果,1-pass,0-fail,2-获取参数集错误,9-系统异常’,
case_status int(2) DEFAULT ‘0’ COMMENT ‘用例状态 1-有效,0-无效’,
create_time datetime DEFAULT NULL,
update_time timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (id)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT=‘接口用例表’;

INSERT INTO case_interface (name_interface, exe_level, exe_mode, url_interface, header_interface, params_interface, result_interface, code_to_compare, code_actual, code_expect, result_code_compare, params_to_compare, params_actual, result_params_compare, case_status, create_time, update_time) VALUES (‘getIpInfo.php’, 0, ‘GET’, ‘http://ip.taobao.com/service/getIpInfo.php’, “{‘Host’:‘ip.taobao.com’}”, ‘ip=63.223.108.4’, ‘’, ‘code’, ‘’, ‘0’, ‘0’, “[‘code’,‘data’,‘country’]”, ‘[]’, ‘0’, 1, NOW(),NOW());
INSERT INTO case_interface (name_interface, exe_level, exe_mode, url_interface, header_interface, params_interface, result_interface, code_to_compare, code_actual, code_expect, result_code_compare, params_to_compare, params_actual, result_params_compare, case_status, create_time, update_time) VALUES (‘baidu’, 0, ‘POST’, ‘http://www.baidu.com’, “{‘Host’:‘ip.taobao.com’}”, ‘name=python’, ‘’, ‘code’, ‘’, ‘0’, NULL, “[‘code’,‘data’,‘country’]”, ‘[]’, NULL, 1, NOW(), NOW());

config_total

CREATE TABLE config_total (
id int(2) NOT NULL AUTO_INCREMENT,
key_config varchar(128) DEFAULT NULL COMMENT ‘关键字名称’,
value_config text COMMENT ‘关键字值’,
description varchar(128) DEFAULT NULL COMMENT ‘关键字解释信息’,
status int(2) DEFAULT NULL COMMENT ‘配置文件状态,1-有效,0-无效’,
create_time timestamp NULL DEFAULT NULL,
update_time timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (id)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COMMENT=‘接口测试配置表’;

INSERT INTO config_total VALUES (‘name_export’, ‘[‘getIpInfo’,‘baidu’]’, ‘导出接口数据配置’, 1, ‘2017-9-10 22:43:34’, ‘2018-1-29 01:05:54’);
INSERT INTO config_total VALUES (‘exe_setup’, ‘{‘getIpInfo’:{‘level_check’:[0,1],‘level_exe’:[0,1,2]}}’, ‘执行接口的条件设置,{接口名称:{检查级别:[0,1],执行级别:[0,1,2],执行环境:test}}。检查级别中[0,1]代表code和参数完整性检查,执行级别中[0,1]分别代表BVT,1级用例’, 1, ‘2017-9-10 20:43:09’, ‘2018-1-2 01:21:52’);

test_temp

CREATE TABLE test_temp (
id int(4) NOT NULL AUTO_INCREMENT COMMENT ‘编号’,
name varchar(128) DEFAULT NULL COMMENT ‘姓名’,
score int(3) DEFAULT NULL COMMENT ‘分数’,
status_temp int(1) DEFAULT ‘0’ COMMENT ‘状态,1-有效,0-无效’,
create_time timestamp NULL DEFAULT NULL COMMENT ‘创建时间’,
update_time timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT ‘更新时间’,
PRIMARY KEY (id)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

INSERT INTO test_temp VALUES (‘xiaoming’, 100, 1, ‘2018-1-21 23:51:24’, ‘2018-1-22 00:30:41’);
INSERT INTO test_temp VALUES (‘xiaoli’, 88, 1, ‘2018-1-21 23:51:48’, ‘2018-1-21 23:51:52’);
INSERT INTO test_temp VALUES (‘mytest11’, 77, 1, NULL, NULL);
INSERT INTO test_temp VALUES (‘mytest22’, 66, 0, NULL, NULL);
INSERT INTO test_temp VALUES (‘mytest11’, 77, 1, NULL, NULL);
INSERT INTO test_temp VALUES (‘mytest22’, 66, 0, NULL, NULL);
INSERT INTO test_temp VALUES (‘mytest11’, 77, 1, NULL, NULL);
INSERT INTO test_temp VALUES (‘mytest22’, 66, 0, NULL, NULL);

你可能感兴趣的:(tfjiao python sql)