『接口测试干货』| Newman+Postman接口自动化测试完整过程

『接口测试干货』| Newman+Postman接口自动化测试完整过程

  • 1 Newman简介
  • 2 如何安装Newman?
    • 2.1 安装NodeJs
    • 2.2 安装Newman
    • 2.2 解决Newman不是内部命令
  • 3 Newman使用
    • 3.1 Newman如何运行集合?
    • 3.2 如何查看帮助文档?
    • 3.3 环境变量设置
    • 3.4 关于全局变量
    • 3.5 数据源文件
    • 3.6 如何导出变量
  • 4 测试报告
    • 4.1 newman-reporter-html安装
    • 4.2 newman-reporter-html使用
    • 4.3 htmlextra安装
    • 4.4 htmlextra使用
  • 5 关于postman使用

1 Newman简介

  • NewmanPostman的一个扩展库(NodeJs库);
  • Newman+Postman可完成接口自动化测试工作;
  • Postman导出的JSON格式文件可通过Newman的命令行执行;
  • 因为Postman运行后只有概要结果,没有像其他自动化测试框架那么完美漂亮的测试报告样式,所以引入了Newman
  • Newman可快速完成集合的运行,构造自动化以及持续集成工作。

2 如何安装Newman?

2.1 安装NodeJs

  • 下载地址:NodeJs;
  • 下载后直接双击运行即可node-v20.10.0-x64.msi
    在这里插入图片描述

2.2 安装Newman

  • 直接命令行输入以下命令即可:
npm install -g newman
C:\Windows\System32>npm install -g newman
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.added 118 packages, and audited 119 packages in 15s9 packages are looking for fundingrun `npm fund` for detailsfound 0 vulnerabilities
npm notice
npm notice New major version of npm available! 7.19.1 -> 10.2.4
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.2.4
npm notice Run npm install -g npm@10.2.4 to update!
  • 注意安装时要以管理员身份打开,不然会报错:
C:\Users\Administrator>npm install -g newman
npm ERR! code EPERM
npm ERR! syscall open
npm ERR! path C:\Program Files\nodejs\node_cache\_cacache\tmp\9c4058f4
npm ERR! errno EPERM
npm ERR! FetchError: Invalid response body while trying to fetch https://registry.npmjs.org/newman: EPERM: operation not permitted, open 'C:\Program Files\nodejs\node_cache\_cacache\tmp\9c4058f4'
npm ERR!     at C:\Program Files\nodejs\nod_global\node_modules\npm\node_modules\minipass-fetch\lib\body.js:162:15
npm ERR!     at async [nodeFromEdge] (C:\Program Files\nodejs\nod_global\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:936:19)
npm ERR!     at async [buildDepStep] (C:\Program Files\nodejs\nod_global\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:882:11)
npm ERR!     at async Arborist.buildIdealTree (C:\Program Files\nodejs\nod_global\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:218:7)
npm ERR!     at async Arborist.reify (C:\Program Files\nodejs\nod_global\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:134:5)
npm ERR!     at async Install.install (C:\Program Files\nodejs\nod_
  • 验证Newman是否安装成功:
'newman' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
  • 问题排查:我们已经安装了node.js了,也已经安装了newman,其他都ok了。但还是不行查看node版本也是好的;
    在这里插入图片描述

2.2 解决Newman不是内部命令

  • 根据上边的提示,我们已经做好了很多工作,但是还是不行;
  • 这里需要配置node.js的一些环境变;
  • node.js的安装目录下新建两个文件夹如下node_globalnode_cache
    在这里插入图片描述
  • 打开系统环境变量,新增NODE_PATH变量:
NODE_PATH
D:\nodejs\node_modules

在这里插入图片描述

  • 在系统环境变量的path新增:%NODE_PATH%
    在这里插入图片描述
  • 打开用户环境变量,修改path中的npm路径为:D:\nodejs\node_global
    在这里插入图片描述
    在这里插入图片描述
  • 重启电脑、重启电脑、重启电脑(重要的事情说三遍)。
  • 验证newman是否安装成功:
newman -h
newman --version

在这里插入图片描述

3 Newman使用

3.1 Newman如何运行集合?

  • postman中将脚本导出,集合-右键-三个点-【Export】:
    在这里插入图片描述
  • 导出为JSON格式文件即可:
    在这里插入图片描述
  • 我们导出的文件为:test.postman_collection.json
  • 直接命令行执行以下命令运行脚本:
newman run test.postman_collection.json
  • 运行结果如下:
C:\Users\Administrator\Desktop>newman run test.postman_collection.json
newmantest→ zentaoPOST http://127.0.0.1/zentao/api.php/v1/tokens [201 Created, 1.29kB, 1997ms]√  状态码为201┌─────────────────────────┬─────────────────────┬─────────────────────┐
│                         │            executed │              failed │
├─────────────────────────┼─────────────────────┼─────────────────────┤
│              iterations │                   10 │
├─────────────────────────┼─────────────────────┼─────────────────────┤
│                requests │                   10 │
├─────────────────────────┼─────────────────────┼─────────────────────┤
│            test-scripts │                   10 │
├─────────────────────────┼─────────────────────┼─────────────────────┤
│      prerequest-scripts │                   00 │
├─────────────────────────┼─────────────────────┼─────────────────────┤
│              assertions │                   10 │
├─────────────────────────┴─────────────────────┴─────────────────────┤
│ total run duration: 2.1s                                            │
├─────────────────────────────────────────────────────────────────────┤
│ total data received: 44B (approx)                                   │
├─────────────────────────────────────────────────────────────────────┤
│ average response time: 1997ms [min: 1997ms, max: 1997ms, s.d.: 0µs] │
└─────────────────────────────────────────────────────────────────────┘

在这里插入图片描述

3.2 如何查看帮助文档?

  • 使用以下命令即可:
newman -h
或
newman --help
C:\Users\Administrator\Desktop>newman -h
Usage: newman [options] [command]Options:-v, --version               output the version number-h, --help                  display help for commandCommands:run [options] <collection>  Initiate a Postman Collection run from a given URL or pathTo get available options for a command:newman <command> -hC:\Users\Administrator\Desktop>newman --help
Usage: newman [options] [command]Options:-v, --version               output the version number-h, --help                  display help for commandCommands:run [options] <collection>  Initiate a Postman Collection run from a given URL or pathTo get available options for a command:newman <command> -h

3.3 环境变量设置

  • 脚本文件和环境变量是两个文件;
  • 所以运行脚本的时候如果有环境变量,那么直接加-e--environment即可:
newman run 脚本文件 -e 环境变量文件

3.4 关于全局变量

  • 这个和环境变量类似,如果有全局变量,使用-g--globals即可;
newman run 脚本文件 -g 全局变量文件

3.5 数据源文件

  • Postman中可以设置迭代次数和数据源文件,而在Newman中使用的话,需要加-d--iteration-data参数指定数据源的路径:
newman run 脚本文件 -g 全局变量文件 -d 数据源文件
  • 迭代次数通过-n--iteration-count来确定。

3.6 如何导出变量

  • 直接在命令行加如下参数即可:
--export-environment
--export-globals
--export-collection

4 测试报告

  • Newman支持CLI、JSON、HTML、JUNIT等等;
  • 本文主要说下HTML格式的报告使用。

4.1 newman-reporter-html安装

  • newman-reporter-html插件安装:
npm install -g newman-reporter-html

在这里插入图片描述

4.2 newman-reporter-html使用

  • 使用方法:
命令说明
-r,json,junit表示指定生成HTML、JSON、XML格式形式的测试报告
--reporter-json-export xxx.json生成JSON格式的测试报告
--reporter-junit-export xxx.xml生成XML格式的测试报告
--reporter-html-export xxx.html生成HTML格式的测试报告
  • 生成的测试报告默认保存到当前目录下,如果报告名称为目录名,则保存到指定目录下;
  • 比如HTML报告:
newman run test.postman_collection.json \
-r html --reporter-html-export html_report.html

在这里插入图片描述

  • 比如XML格式报告:
newman run test.postman_collection.json \
-r junit --reporter-junit-export xml_report.xml

在这里插入图片描述

  • 比如JSON格式报告:
newman run test.postman_collection.json \
-r json --reporter-json-export json_report.json
{"collection": {"_": {"postman_id": "a1ee2193-7e02-4c50-892f-1e4d706a1132"},"item": [{"id": "393ea4b7-bfcf-4e3e-853d-e05a263435bf","name": "zentao","request": {"description": {"content": "禅道系统接口测试","type": "text/plain"},"url": {"protocol": "http","path": ["zentao","api.php","v1","tokens"],"host": ["127","0","0","1"],"query": [],"variable": []},"method": "POST","body": {"mode": "raw","raw": "{\"account\": \"admin\", \"password\": \"ZenTao123456\"}","options": {"raw": {"language": "json"}}}},"response": [],"event": [{"listen": "test","script": {"id": "63fb0da7-27ef-4569-87c6-81697169acf5","type": "text/javascript","exec": ["pm.test(\r","    \"状态码为201\",function(){\r","        pm.response.to.have.status(201);\r","    }\r",");"],"_lastExecutionId": "9d83ab07-5d8c-4170-bb4f-898dbd965e57"}}]}],"event": [],"variable": [],"info": {"_postman_id": "a1ee2193-7e02-4c50-892f-1e4d706a1132","name": "test","schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"}},"environment": {"id": "a4b8954c-a10e-4b54-80d0-bb003c56953e","values": []},"globals": {"id": "a084d77b-cbf5-4498-9770-200d6e0a4168","values": []},"run": {"stats": {"iterations": {"total": 1,"pending": 0,"failed": 0},"items": {"total": 1,"pending": 0,"failed": 0},"scripts": {"total": 1,"pending": 0,"failed": 0},"prerequests": {"total": 1,"pending": 0,"failed": 0},"requests": {"total": 1,"pending": 0,"failed": 0},"tests": {"total": 1,"pending": 0,"failed": 0},"assertions": {"total": 1,"pending": 0,"failed": 0},"testScripts": {"total": 1,"pending": 0,"failed": 0},"prerequestScripts": {"total": 0,"pending": 0,"failed": 0}},"timings": {"responseAverage": 154,"responseMin": 154,"responseMax": 154,"responseSd": 0,"dnsAverage": 0,"dnsMin": 0,"dnsMax": 0,"dnsSd": 0,"firstByteAverage": 0,"firstByteMin": 0,"firstByteMax": 0,"firstByteSd": 0,"started": 1700804595902,"completed": 1700804596169},"executions": [{"cursor": {"position": 0,"iteration": 0,"length": 1,"cycles": 1,"empty": false,"eof": false,"bof": true,"cr": false,"ref": "1d6d4e14-53d2-4ab6-8e78-87c67bad8bc9","httpRequestId": "b5949fe3-d241-4020-a10c-b4adcbef9bb1"},"item": {"id": "393ea4b7-bfcf-4e3e-853d-e05a263435bf","name": "zentao","request": {"description": {"content": "禅道系统接口测试","type": "text/plain"},"url": {"protocol": "http","path": ["zentao","api.php","v1","tokens"],"host": ["127","0","0","1"],"query": [],"variable": []},"method": "POST","body": {"mode": "raw","raw": "{\"account\": \"admin\", \"password\": \"ZenTao123456\"}","options": {"raw": {"language": "json"}}}},"response": [],"event": [{"listen": "test","script": {"id": "63fb0da7-27ef-4569-87c6-81697169acf5","type": "text/javascript","exec": ["pm.test(\r","    \"状态码为201\",function(){\r","        pm.response.to.have.status(201);\r","    }\r",");"],"_lastExecutionId": "9d83ab07-5d8c-4170-bb4f-898dbd965e57"}}]},"request": {"description": {"content": "禅道系统接口测试","type": "text/plain"},"url": {"protocol": "http","path": ["zentao","api.php","v1","tokens"],"host": ["127","0","0","1"],"query": [],"variable": []},"header": [{"key": "Content-Type","value": "application/json","system": true},{"key": "User-Agent","value": "PostmanRuntime/7.33.0","system": true},{"key": "Accept","value": "*/*","system": true},{"key": "Cache-Control","value": "no-cache","system": true},{"key": "Postman-Token","value": "4dd31771-a07b-42e8-b78a-ac244c4dca6c","system": true},{"key": "Host","value": "127.0.0.1","system": true},{"key": "Accept-Encoding","value": "gzip, deflate, br","system": true},{"key": "Connection","value": "keep-alive","system": true},{"key": "Content-Length","value": "48","system": true}],"method": "POST","body": {"mode": "raw","raw": "{\"account\": \"admin\", \"password\": \"ZenTao123456\"}","options": {"raw": {"language": "json"}}}},"response": {"id": "2a26af66-ad21-42d2-8b7a-b89cd7339a47","status": "Created","code": 201,"header": [{"key": "Date","value": "Fri, 24 Nov 2023 05:43:16 GMT"},{"key": "Server","value": "Apache"},{"key": "Set-Cookie","value": "zentaosid=9f0dab6ebbe1e65c99a8abb3c351d89a; path=/zentao/; HttpOnly"},{"key": "Set-Cookie","value": "lang=zh-cn; expires=Sun, 24-Dec-2023 05:43:16 GMT; Max-Age=2592000; path=/zentao/"},{"key": "Set-Cookie","value": "device=desktop; expires=Sun, 24-Dec-2023 05:43:16 GMT; Max-Age=2592000; path=/zentao/; HttpOnly"},{"key": "Set-Cookie","value": "theme=default; expires=Sun, 24-Dec-2023 05:43:16 GMT; Max-Age=2592000; path=/zentao/"},{"key": "Expires","value": "Thu, 19 Nov 1981 08:52:00 GMT"},{"key": "Cache-Control","value": "private"},{"key": "Pragma","value": "no-cache"},{"key": "X-Content-Type-Options","value": "nosniff"},{"key": "X-XSS-Protection","value": "1; mode=block"},{"key": "Strict-Transport-Security","value": "max-age=3600; includeSubDomains"},{"key": "Referrer-Policy","value": "no-referrer-when-downgrade"},{"key": "X-Permitted-Cross-Domain-Policies","value": "master-only"},{"key": "X-Download-Options","value": "noopen"},{"key": "Content-Security-Policy","value": "form-action 'self';connect-src 'self';"},{"key": "X-Frame-Options","value": "SAMEORIGIN"},{"key": "Access-Control-Allow-Origin","value": "*"},{"key": "Access-Control-Allow-Credentials","value": "true"},{"key": "Access-Control-Allow-Headers","value": "Origin,X-Requested-With,Content-Type,Accept,Authorization,Token,Referer,User-Agent"},{"key": "Access-Control-Allow-Methods","value": "GET,POST,PUT,DELETE,OPTIONS,PATCH"},{"key": "Content-Length","value": "44"},{"key": "Keep-Alive","value": "timeout=10, max=100"},{"key": "Connection","value": "Keep-Alive"},{"key": "Content-Type","value": "application/json"}],"stream": {"type": "Buffer","data": [123,34,116,111,107,101,110,34,58,34,57,102,48,100,97,98,54,101,98,98,101,49,101,54,53,99,57,57,97,56,97,98,98,51,99,51,53,49,100,56,57,97,34,125]},"cookie": [],"responseTime": 154,"responseSize": 44},"id": "393ea4b7-bfcf-4e3e-853d-e05a263435bf","assertions": [{"assertion": "状态码为201","skipped": false}]}],"transfers": {"responseTotal": 44},"failures": [],"error": null}
}
  • 以下是生成的几个报告:
    在这里插入图片描述

4.3 htmlextra安装

  • htmlextra主要实现比较高级的测试报告,需要进行安装:
npm install -g newman-reporter-htmlextra

在这里插入图片描述

4.4 htmlextra使用

  • 使用方法和newman-reporter-html基本一样;
  • 使用命令方法:
newman run test.postman_collection.json -r \
htmlextra --reporter-html-export html_report.html
  • 执行命令后会在当前目录或者指定目录生成一个newman文件夹,文件夹中保存着生成的文报告信息;
  • 测试报告样式如下:
    在这里插入图片描述

5 关于postman使用

  • 这个之前的文章已经介绍了,直接去浏览即可,这里不再赘述;
  • 大概思路就是使用postman生成接口数据,导出来后使用Newman运行和生成测试报告。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/166729.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

微信小程序制作

如果你也想搭建一个小程序&#xff0c;但不知道如何入手&#xff0c;那么今天我就教你如何使用第三方制作平台&#xff0c;在短短三十分钟内搭建一个小程序。 一、登录小程序制作平台 首先&#xff0c;登录到小程序制作平台的官方网站或应用程序&#xff0c;进入后台管理系统。…

文章解读与仿真程序复现思路——电网技术 EI\CSCD\北大核心《考虑5G基站储能可调度容量的有源配电网协同优化调度方法》

这篇文章的标题涉及到以下关键概念&#xff1a; 5G基站&#xff1a; 提到了5G基站&#xff0c;这表明文章的焦点可能是与第五代移动通信技术相关的内容。5G技术对于提高通信速度、降低延迟以及支持大规模连接等方面有显著的改进&#xff0c;因此对于基站的电力需求和供应可能存…

2023年ESG投资研究报告

第一章 ESG投资概况 1.1 定义 ESG投资&#xff0c;亦称负责任投资&#xff0c;是一种融合环境&#xff08;Environment&#xff09;、社会&#xff08;Social&#xff09;和治理&#xff08;Governance&#xff09;考量的投资方法&#xff0c;旨在通过综合这些因素来优化投资…

美国汽车零部件巨头 AutoZone 遭遇网络攻击

Security Affairs 网站披露&#xff0c;美国汽车配件零售商巨头 AutoZone 称其成为了 Clop MOVEit 文件传输网络攻击的受害者&#xff0c;导致大量数据泄露。 AutoZone 是美国最大的汽车零配件售后市场经销商之一&#xff0c;在美国、墨西哥、波多黎各、巴西和美属维尔京群岛经…

「Whale 帷幄」连续入选科技榜单,AGI 冲击波正在加速行业洗牌

以 AGI 为底座&#xff0c;品牌 MarTech 正在经历一场前所未有的深度变革。 近日&#xff0c;弯弓研究院发布「中国 MarTech 500 强榜单」&#xff0c;以 2023 中国营销技术&#xff08;MarTech&#xff09;生态为研究对象&#xff0c;洞察行业现象与未来趋势。作为品牌数字化…

前后端性能优化实践(含Java代码部分、数据库部分、React前端部分)

最近的一个大屏报表统计的接口查询速度很慢&#xff0c;耗时近一分钟左右&#xff0c;数据量级只是700万左右&#xff0c;但很慢&#xff0c;最后优化到4秒左右&#xff0c;客户还能接受&#xff0c;但其实还可以在优化&#xff0c;先这样吧&#xff0c;简单记录下。这次主要优…

App Inventor 2 文本转数字

App Inventor 2 是弱语言类型&#xff0c;文本和数字之间不用刻意去转换&#xff0c;之间赋值就可以了。文本赋值给数字变量如下&#xff1a; 运行结果&#xff1a;124 注意&#xff1a;数字变量初始化的时候要给一个数字的初始值&#xff0c;表明它是数字。 如果文本中含有非…

系列三、事务

一、事务 1.1、概述 事务是数据库操作的基本单元&#xff0c;它是指逻辑上的一组操作&#xff0c;要么都成功&#xff0c;要么都失败。典型场景&#xff1a;转账&#xff0c;例如Jack给Rose转账1000元&#xff0c;转账成功&#xff1a;Jack账户的余额少1000元&#xff0c;Rose…

关于进制的转化

二进制转十进制&#xff1a; &#x1f530; 方法一&#xff1a;二进制转十进制&#xff0c;用各数的码位与位权的乘积之和&#xff0c;说白了就是用从右到左的每个数去乘以2的幂次方&#xff08;最右边是0&#xff09;&#xff0c;然后就所有的数相加。 补充&#xff1a;位权是…

<蓝桥杯软件赛>零基础备赛20周--第7周--栈和二叉树

报名明年4月蓝桥杯软件赛的同学们&#xff0c;如果你是大一零基础&#xff0c;目前懵懂中&#xff0c;不知该怎么办&#xff0c;可以看看本博客系列&#xff1a;备赛20周合集 20周的完整安排请点击&#xff1a;20周计划 每周发1个博客&#xff0c;共20周&#xff08;读者可以按…

MFC所有控件介绍及基本使用

一、前言 本篇文档介绍了MFC控件的基本使用&#xff0c;同时提供了关于MFC控件使用的工程代码&#xff0c;程序界面如下图&#xff0c;有兴趣的可以到文档最后的链接处进行下载。 二、控件介绍 2.1 Button &#xff08;按钮&#xff09; 2.2 CheckBox&#xff08;复选框&am…

【jvm】虚拟机之堆

目录 一、堆的核心概述二、堆的内存细分&#xff08;按分代收集理论设计&#xff09;2.1 java7及以前2.2 java8及以后 三、堆内存大小3.1 说明3.2 参数设置3.3 默认大小3.4 手动设置3.5 jps3.6 jstat3.7 OutOfMemory举例 四、年轻代与老年代4.1 说明 五、对象分配过程5.1 说明5…

电脑键盘推荐

一、键盘分类 &#xff08;1&#xff09;键位个数 目前有75&#xff0c;84&#xff0c;87&#xff0c;98&#xff0c;104&#xff0c;108的。 &#xff08;2&#xff09;薄膜键盘和机械键盘 薄膜键盘就是大多数办公室常见的键盘&#xff0c;主要打一个便宜&#xff0c;耐造…

Python武器库开发-前端篇之Html基础语法(二十九)

前端篇之Html基础语法(二十九) HTML 元素 HTML元素指的是HTML文档中的标签和内容。标签用于定义元素的类型&#xff0c;而内容则是元素所包含的内容。HTML元素由开始标签和结束标签组成&#xff0c;也可以是自闭合标签。 例如&#xff0c;下面是一个叫做<p>的HTML元素…

Android开发从0开始(服务)

Android后台运行的解决方案&#xff0c;不需要交互&#xff0c;长期运行。 服务基础框架&#xff1a; public class MyService extends Service { public MyService() { } Override public IBinder onBind(Intent intent) { //activity与service交互&#xff08;需要继…

全网最全图解Kafka适用场景

消息系统 消息系统被用于各种场景&#xff0c;如解耦数据生产者&#xff0c;缓存未处理的消息。Kafka 可作为传统的消息系统的替代者&#xff0c;与传统消息系统相比&#xff0c;kafka有更好的吞吐量、更好的可用性&#xff0c;这有利于处理大规模的消息。 根据经验&#xff…

ubuntu环境删除qtcreator方法

文章目录 方法1方法2方法3参考不同的安装方法,对应不同的删除方法 方法1 apt-get或者dpkg 方法2 QtCreatorUninstaller 方法3 MaintenanceTool

2023亚太杯数学建模C题思路分析 - 我国新能源电动汽车的发展趋势

1 赛题 问题C 我国新能源电动汽车的发展趋势 新能源汽车是指以先进技术原理、新技术、新结构的非常规汽车燃料为动力来源( 非常规汽车燃料指汽油、柴油以外的燃料&#xff09;&#xff0c;将先进技术进行汽车动力控制和驱动相结 合的汽车。新能源汽车主要包括四种类型&#x…

Linux下安装python3步骤:

1.下载Python3源码 你需要从Python官网下载Python3的源码包。本文以Python 3.9.9为例。你可以使用wget命令来下载源码包到你的Linux主目录中: wget https://www.python.org/ftp/python/3.9.9/Python-3.9.9.tgz2.编译和安装Python3 下载好源码包后&#xff0c;你需要解压它&…

【LeetCode:2824. 统计和小于目标的下标对数目 | 模拟+二分】

&#x1f680; 算法题 &#x1f680; &#x1f332; 算法刷题专栏 | 面试必备算法 | 面试高频算法 &#x1f340; &#x1f332; 越难的东西,越要努力坚持&#xff0c;因为它具有很高的价值&#xff0c;算法就是这样✨ &#x1f332; 作者简介&#xff1a;硕风和炜&#xff0c;…