前端:js+vue+element-ui
github地址:https://github.com/pencil1/ApiTestWeb
后端:python+flask+httprunner
github地址: https://github.com/pencil1/ApiTestManage
数据库:mysql
npm install -g yarn
yarn config set registry https://registry.npm.taobao.org -g
yarn config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/ -g
npm install -g mirror-config-china --registry=http://registry.npm.taobao.org
npm install node-sass
yarn install
yarn serve
pip install -r requirements.txt
pip install mysql-connector
class Config:
SECRET_KEY = 'BaSeQuie'
basedir = os.path.abspath(os.path.dirname(__file__))
# sqlite数据库的地址
# SQLALCHEMY_DATABASE_URI = "sqlite:///" + os.path.join(basedir, "data.sqlite")
SQLALCHEMY_DATABASE_URI = 'mysql+mysqlconnector://root:[email protected]:3306/api_test?charset=utf8mb4'
SQLALCHEMY_COMMIT_ON_TEARDOWN = True
SQLALCHEMY_TRACK_MODIFICATIONS = False
CSRF_ENABLED = True
UPLOAD_FOLDER = '/upload'
# DEBUG = True
SCHEDULER_API_ENABLED = True
@staticmethod
def init_app(app):
pass
class DevelopmentConfig(Config):
# SQLALCHEMY_DATABASE_URI = os.environ.get('DEV_DATABASE_URL') or 'sqlite:///' + os.path.join(basedir, 'data.sqlite')
# SCHEDULER_JOBSTORES = {'default': SQLAlchemyJobStore(url=SQLALCHEMY_DATABASE_URI)}
# 123456表示密码,test代表数据库名称
SQLALCHEMY_DATABASE_URI = 'mysql+mysqlconnector://root:[email protected]:3306/api_test?charset=utf8mb4'
SCHEDULER_JOBSTORES = {'default': SQLAlchemyJobStore(url=SQLALCHEMY_DATABASE_URI,
engine_options={'pool_pre_ping': True})}
SQLALCHEMY_TRACK_MODIFICATIONS = False
SQLALCHEMY_POOL_SIZE = 100
SQLALCHEMY_POOL_RECYCLE = 1800
class Config(db.Model):
__tablename__ = 'config'
id = db.Column(db.Integer(), primary_key=True, comment='主键,自增')
num = db.Column(db.Integer(), nullable=True, comment='配置序号')
name = db.Column(db.String(128), comment='配置名称')
variables = db.Column(db.TEXT, comment='配置参数')
func_address = db.Column(db.String(128), comment='配置函数')
project_id = db.Column(db.Integer, db.ForeignKey('project.id'), comment='所属的项目id')
created_time = db.Column(db.DateTime, index=True, default=datetime.now, comment='创建时间')
update_time = db.Column(db.DateTime, index=True, default=datetime.now, onupdate=datetime.now)
create database api_test default character set utf8mb4 collate utf8mb4_unicode_ci;
set FLASK_APP=manage.py
flask initdata
[01] 开源啦~接口自动化测试平台
[02] npm,yarn替换国外镜像为国内镜像,安装依赖
[03] 使用 yarn 安装时,报错node_modules\node sass:Command failed.
[04] 解决pip install慢的方法
[05] HttpRunner中文用户手册
[06] 基于 HttpRunner 的 Web 测试平台
[07] SQLAlchemy中解决数据库访问时出现的Incorrect string value: xxx at row 484
[08] mysql 创建表遇到单列的长度限制 ERROR 1074 (42000) 与 行长限制 ERROR 1118 (42000)
微信扫一扫关注公众号
点击链接加入群聊
https://jq.qq.com/?_wv=1027&k=5eVEhfN
软件测试学习交流QQ群号:511619105