当前位置:网站首页>Share an interface test project (very worth practicing)
Share an interface test project (very worth practicing)
2022-08-01 23:37:00 【Rejoice in the testing world】
I shared with you a practical interface test project suitable for hands-on training,It is an entry-level project for interface testing.But the project has many limitations,Such as deployment inconvenience,接口有限,No authentication, etc.
因此,趁着周末,The editor found another interface test project for you,该项目:
部署方便——Just mindless installation,Don't have to deal with too many environmental issues;
接口较多——约40个接口,And there is a complete functional testing process;
Authentication——Other interfaces depend on what is returned by logintoken,close to actual work.
话不多说,我们一起来看看吧:
获取项目
If you have added Xiaobian ,According to the link I sent you,Go directly to the database to get it.
If you did not add editor ,那么需要添加 ,备注:获取资料
下载项目的ZIP包后,Unzip it to any English directory,例如下图所示:
环境安装
nodejs
访问网站https://nodejs.org/en/download/,下载对应系统的安装包.
接着,A mindless installation,一直点Next下一步,直到安装成功.如果不知道怎么安装,可以网上搜索教程,This step is very simple,就不写了.
安装成功后,打开cmd窗口,输入node -v,The version number is indicated,则证明安装成功.
注意:如果提示node不是内部或外部命令,也不是可运行的程序.你可以重启电脑再试试,如果还不行,Go to configure environment variables.
MySQL
方法一
This computer has already been installedMySQL,可以跳过此步.
方法二
如果没有安装过MySQL,可以访问网址:https://www.xp.cn/download.html,根据你的操作系统,下载对应的phpstudy软件.
下载后直接安装并打开软件(It is best to open it in administrator mode),再启动MySQL.
tips:如果你的电脑上已运行MySQL,请打开cmd窗口,输入services.msc,把本机的MySQL服务停掉,再启动phpstudy中的MySQL.
配置数据库
方法一
同上,如果你是自己安装的MySQL,登录MySQL后,需要:建库 + 导数据 + 改配置
# 建库
CREATE DATABASE vue_api_server DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
use vue_api_server;
# 导数据
source 你的项目路径\vue_api_server\db\mydb.sql
tips:Database files are large,Importing takes some time,请耐心等待
修改项目的配置文件:你的项目路径\vue_api_server\config\default.json
方法二
If you use small leather panels,只需要:建库 + 导数据.
1、创建数据库
2、导入数据库文件
文件路径:你的项目路径\vue_api_server\db\mydb.sql
tips:Database files are large,Importing takes some time,请耐心等待
Start and use projects
打开cmd窗口,进入你的项目路径\vue_api_server文件夹,依次执行:
1、安装依赖包
npm install koa --registry=https://registry.npm.taobao.org
2、启动程序
node app.js
When the interface list appears,It proves that the deployment was successful.
tips:项目默认使用8888端口,如果该端口被占用,会启动失败.You can kill applications that are hogging ports,也于\vue_api_server\config\default.json修改端口号.
3、接口测试
Take the example of obtaining product classification list data:
①Call the login interface first,获取token
请求URL:http://127.0.0.1:8888/api/private/v1/login
请求类型:POST(application/json)
请求体:
②再带着token,调categories接口(获取商品分类列表)
请求URL:http://127.0.0.1:8888/api/private/v1/categories
请求类型:GET
请求Params:type=1
Header:Authorization=The response value of the login interfacetoken
这样,A simple test link worked.
最后
The interface code is in your project path\vue_api_server\routes\api\private\v1,If you can read the code,可以直接阅读js文件,Sort out the interface yourself.
如果你不懂代码,A full set of interface documentation is available for purchase(图文) + Xiaobian recorded the interface usage tutorial(视频).
最后: 可以在公众号:伤心的辣条 ! 自行领取一份216页软件测试工程师面试宝典文档资料【免费的】.以及相对应的视频学习教程免费分享!,其中包括了有基础知识、Linux必备、Shell、互联网程序原理、Mysql数据库、抓包工具专题、接口测试工具、测试进阶-Python编程、Web自动化测试、APP自动化测试、接口自动化测试、测试高级持续集成、测试架构开发测试框架、性能测试、安全测试等.
现在我邀请你进入我们的软件测试学习交流群:【746506216
】,备注“入群”, 大家可以一起探讨交流软件测试,共同学习软件测试技术、面试等软件测试方方面面,还会有免费直播课,收获更多测试技巧,我们一起进阶Python自动化测试/测试开发,走向高薪之路.
喜欢软件测试的小伙伴们,如果我的博客对你有帮助、如果你喜欢我的博客内容,请 “点赞” “评论” “收藏” 一 键三连哦!
软件测试工程师自学教程:
这才是2022最精细的自动化测试自学教程,我把它刷了无数遍才上岸字节跳动,做到涨薪20K【值得自学软件测试的人刷】
软件测试工程师月薪2W以上薪资必学技能 — Python接口自动化框架封装.
美团面试真题_高级测试25K岗位面试 — 软件测试人都应该看看
软件测试必会_Jmeter大厂实战 — 仅6步可实现接口自动化测试
边栏推荐
猜你喜欢
程序员如何优雅地解决线上问题?
请问什么是 CICD
月薪12K,蝶变向新,勇往直前—她通过转行测试实现月薪翻倍~
Quartus uses tcl files to quickly configure pins
CDH6的Hue打开出现‘ascii‘ codec can‘t encode characters
Quartus 使用 tcl 文件快速配置管脚
Solve the port to take up
工作5年,测试用例都设计不好?来看看大厂的用例设计总结
6134. 找到离给定两个节点最近的节点-力扣双百代码
System availability: 3 9s, 4 9s in SRE's mouth... What is it?
随机推荐
Leetcode 129求根节点到叶节点数字之和、104二叉树的最大深度、8字符串转换整数(atoi)、82删除排序链表中的重复元素II、204二分查找、94二叉树的中序遍历、144二叉树的前序遍历
Convert LocalDateTime to Date type
color transparency parameter
路径压缩、、
计算两点之间的距离
Additional Features for Scripting
6133. Maximum number of packets
Flink学习第五天——Flink可视化控制台依赖配置和界面介绍
cdh的hue上oozie启动报错,Cannot allocate containers as requested resource is greater than maximum allowed
Quartus 使用 tcl 文件快速配置管脚
[C language advanced] file operation (2)
Jmeter是什么
Oracle 数据库设置为只读及读写
chrome复制一张图片的base64数据
JAX-based activation function, softmax function and cross entropy function
UI自动化测试框架搭建-标记性能较差用例
经典文献阅读之--DLO
请问什么是 CICD
解决端口占用
prim生成树