『接口测试干货』| 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简介
Newman
是Postman
的一个扩展库(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_global
和node_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 │ 1 │ 0 │
├─────────────────────────┼─────────────────────┼─────────────────────┤
│ requests │ 1 │ 0 │
├─────────────────────────┼─────────────────────┼─────────────────────┤
│ test-scripts │ 1 │ 0 │
├─────────────────────────┼─────────────────────┼─────────────────────┤
│ prerequest-scripts │ 0 │ 0 │
├─────────────────────────┼─────────────────────┼─────────────────────┤
│ assertions │ 1 │ 0 │
├─────────────────────────┴─────────────────────┴─────────────────────┤
│ 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
运行和生成测试报告。
相关文章:

『接口测试干货』| Newman+Postman接口自动化测试完整过程
『接口测试干货』| NewmanPostman接口自动化测试完整过程 1 Newman简介2 如何安装Newman?2.1 安装NodeJs2.2 安装Newman2.2 解决Newman不是内部命令 3 Newman使用3.1 Newman如何运行集合?3.2 如何查看帮助文档?3.3 环境变量设置3.4 关于全局变…...

根据商品链接获取拼多多商品详情数据接口|拼多多商品详情价格数据接口|拼多多API接口
拼多多,作为中国最大的社交电商之一,为卖家提供了丰富的商品详情接口。这些接口可以帮助卖家快速获取商品信息,提高销售效率。本文将详细介绍如何使用拼多多商品详情接口,以及它的优势和注意事项。 一、拼多多商品详情接口概述 …...

KaiwuDB 监控组件及辅助 SQL 调优介绍
一、介绍 KaiwuDB 具备完善的行为数据采集功能,此功能要求 KaiwuDB 数据库系统 C/E/T 端不同进程的不同维度的指标采集功能十分完善;在不同进程完成指标采集后,会通过 Opentelemetry 和 Collector 将指标存入 Prometheus,以便查找…...

双11再创新高!家电行业如何通过矩阵管理,赋能品牌增长?
双11大促已落下帷幕,虽然今年不再战报满天飞,但从公布的数据来看,家电行业整体表现不俗。 根据抖音电商品牌业务发布的收官战报,家电行业创造了成交新纪录,整体同比增长125%。快手官方数据显示,消电家居行业…...
苏东坡最经典的诗词
苏东坡最经典的诗词_诗词_百度汉语 水调歌头明月几时有 [作者] 苏轼 [朝代] 宋 丙辰中秋,欢饮达旦,大醉,作此篇,兼怀子由。明月几时有?把酒问青天。不知天上宫阙,今夕是何年。我欲乘风归去,又…...
iterator遍历赋值
在Java中,迭代器(Iterator)是用于遍历集合的对象。它提供了一种顺序访问集合元素的方式,但是不能直接用于给特定索引赋值。 迭代器只能用于遍历集合并访问集合中的元素,而不能通过迭代器来修改集合元素的值。如果你想…...

【从删库到跑路】MySQL数据库 — E-R图 | 关系模型
🎊专栏【MySQL】 🍔喜欢的诗句:更喜岷山千里雪 三军过后尽开颜。 🎆音乐分享【如愿】 大一同学小吉,欢迎并且感谢大家指出我的问题🥰 文章目录 🌹简述什么是E-R图⭐核心概念 🌹E-R图…...

网工内推 | 美的、得力集团,包吃包住,IE认证优先,14薪
01 美的 招聘岗位:网络工程师 职责描述: 1.负责IT网络设备、IDC机房的日常维护巡检、监控和管理; 2.负责路由、交换、防火墙、无线控制器、AP等网络设备的开通、调整、优化升级; 3.负责公司OT、IT网络规划,项目实施以…...

java springboot在测试类中构建虚拟MVC环境并发送请求
好 上文java springboot在测试类中启动一个web环境我们在测试类中搭了一个web环境 那么 下面就要想办法弄一个接口的测试 这边 我们还是要在controller包下去创建一个 controller类 写一个访问接口 这里 我创建一个 TestWeb.java 这里 我们编写代码如下 package com.example.…...
python运算符重载之字符串显示和右侧加法
1 python运算符重载之字符串显示和右侧加法 1.1 重载字符串显示 1.1.1 str和repr python调用prin()t时,自动调用__str__和__repr__, python调用str()时,自动调用__str__和__repr__, python调用repr()时,自动调用_…...

卷积神经网络(AlexNet)鸟类识别
文章目录 一、前言二、前期工作1. 设置GPU(如果使用的是CPU可以忽略这步)2. 导入数据3. 查看数据 二、数据预处理1. 加载数据2. 可视化数据3. 再次检查数据4. 配置数据集 三、AlexNet (8层)介绍四、构建AlexNet (8层)网络模型五、…...

hive 报错return code 40000 from org.apache.hadoop.hive.ql.exec.MoveTask解决思路
参考学习 https://github.com/apache/hive/blob/2b57dd27ad61e552f93817ac69313066af6562d9/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java#L47 为啥学习error code 开发过程中遇到以下错误,大家觉得应该怎么办?从哪方面入手呢? 1.百…...

Java Web——XML
1. XML概述 XML是EXtensible Markup Language的缩写,翻译过来就是可扩展标记语言。XML是一种用于存储和传输数据的语言,它使用标签来标记数据,以便于计算机处理和我们人来阅读。 “可扩展”三个字表明XML可以根据需要进行扩展和定制。这意味…...
【.NET Core】Task应用详解
【.NET Core】Task应用详解 文章目录 【.NET Core】Task应用详解一、概述二、Task用法应用2.1 通过New实例化Task2.2 通过Factory中StartNew方法2.3 通过Run方法 三、让Task任务按顺序执行四、通过异步Run方法异步执行顺序Task五、创建带有返回值的Task<TResult>六、Task…...

convertRect:toView 方法注意事项
这是在网上找到的一张图 我们开发中有时候会用到左边转换,convertRect:toView 通常情况下,我们回这样使用 CGRect newRect [a convertRect:originframe toView:c];其中newRect和 originframe的size相同,只改变origin newRect.origin a…...

Java实现王者荣耀小游戏
主要功能 键盘W,A,S,D键:控制玩家上下左右移动。按钮一:控制英雄发射一个矩形攻击红方小兵。按钮控制英雄发射魅惑技能,伤害小兵并让小兵停止移动。技能三:攻击多个敌人并让小兵停止移动。普攻:对小兵造成基础伤害。小…...

【黑马甄选离线数仓day04_维度域开发】
1. 维度主题表数据导出 1.1 PostgreSQL介绍 PostgreSQL 是一个功能强大的开源对象关系数据库系统,它使用和扩展了 SQL 语言,并结合了许多安全存储和扩展最复杂数据工作负载的功能。 官方网址:PostgreSQL: The worlds most advanced open s…...
C# 中using关键字的使用
在C#中我们还是很有必要掌握using关键字的。 比如这样: string path “D:\data.txt”; if (!File.Exists(path )) {File.Create(path); File.WriteAllText(path,"OK"); } 首先我创建…...
16 redis高可用读写分离方案
在前面说的JedisSentinelPool只能实现主从的切换,而无法实现读写的分离。 1.哨兵的客户端实现主从切换方案 <dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</arti…...

Nginx模块开发之http handler实现流量统计(2)
文章目录 一、概述二、Nginx handler模块开发2.1、代码实现2.2、编写config文件2.3、编译模块到Nginx源码中2.4、修改conf文件2.5、执行效果 总结 一、概述 上一篇【Nginx模块开发之http handler实现流量统计(1)】使用数组在单进程实现了IP的流量统计&a…...
云原生核心技术 (7/12): K8s 核心概念白话解读(上):Pod 和 Deployment 究竟是什么?
大家好,欢迎来到《云原生核心技术》系列的第七篇! 在上一篇,我们成功地使用 Minikube 或 kind 在自己的电脑上搭建起了一个迷你但功能完备的 Kubernetes 集群。现在,我们就像一个拥有了一块崭新数字土地的农场主,是时…...

【力扣数据库知识手册笔记】索引
索引 索引的优缺点 优点1. 通过创建唯一性索引,可以保证数据库表中每一行数据的唯一性。2. 可以加快数据的检索速度(创建索引的主要原因)。3. 可以加速表和表之间的连接,实现数据的参考完整性。4. 可以在查询过程中,…...
浅谈不同二分算法的查找情况
二分算法原理比较简单,但是实际的算法模板却有很多,这一切都源于二分查找问题中的复杂情况和二分算法的边界处理,以下是博主对一些二分算法查找的情况分析。 需要说明的是,以下二分算法都是基于有序序列为升序有序的情况…...
Element Plus 表单(el-form)中关于正整数输入的校验规则
目录 1 单个正整数输入1.1 模板1.2 校验规则 2 两个正整数输入(联动)2.1 模板2.2 校验规则2.3 CSS 1 单个正整数输入 1.1 模板 <el-formref"formRef":model"formData":rules"formRules"label-width"150px"…...

2025季度云服务器排行榜
在全球云服务器市场,各厂商的排名和地位并非一成不变,而是由其独特的优势、战略布局和市场适应性共同决定的。以下是根据2025年市场趋势,对主要云服务器厂商在排行榜中占据重要位置的原因和优势进行深度分析: 一、全球“三巨头”…...

【Linux】自动化构建-Make/Makefile
前言 上文我们讲到了Linux中的编译器gcc/g 【Linux】编译器gcc/g及其库的详细介绍-CSDN博客 本来我们将一个对于编译来说很重要的工具:make/makfile 1.背景 在一个工程中源文件不计其数,其按类型、功能、模块分别放在若干个目录中,mak…...
深度学习之模型压缩三驾马车:模型剪枝、模型量化、知识蒸馏
一、引言 在深度学习中,我们训练出的神经网络往往非常庞大(比如像 ResNet、YOLOv8、Vision Transformer),虽然精度很高,但“太重”了,运行起来很慢,占用内存大,不适合部署到手机、摄…...
MFE(微前端) Module Federation:Webpack.config.js文件中每个属性的含义解释
以Module Federation 插件详为例,Webpack.config.js它可能的配置和含义如下: 前言 Module Federation 的Webpack.config.js核心配置包括: name filename(定义应用标识) remotes(引用远程模块࿰…...
命令行关闭Windows防火墙
命令行关闭Windows防火墙 引言一、防火墙:被低估的"智能安检员"二、优先尝试!90%问题无需关闭防火墙方案1:程序白名单(解决软件误拦截)方案2:开放特定端口(解决网游/开发端口不通)三、命令行极速关闭方案方法一:PowerShell(推荐Win10/11)方法二:CMD命令…...
用 Rust 重写 Linux 内核模块实战:迈向安全内核的新篇章
用 Rust 重写 Linux 内核模块实战:迈向安全内核的新篇章 摘要: 操作系统内核的安全性、稳定性至关重要。传统 Linux 内核模块开发长期依赖于 C 语言,受限于 C 语言本身的内存安全和并发安全问题,开发复杂模块极易引入难以…...