惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
The Exploit Database - CXSecurity.com
F
Fortinet All Blogs
U
Unit 42
F
Full Disclosure
雷峰网
雷峰网
博客园 - 司徒正美
云风的 BLOG
云风的 BLOG
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tailwind CSS Blog
The Cloudflare Blog
Last Week in AI
Last Week in AI
罗磊的独立博客
D
DataBreaches.Net
C
Check Point Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
O
OpenAI News
C
CXSECURITY Database RSS Feed - CXSecurity.com
aimingoo的专栏
aimingoo的专栏
S
Security @ Cisco Blogs
大猫的无限游戏
大猫的无限游戏
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
S
SegmentFault 最新的问题
NISL@THU
NISL@THU
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Hacker News
The Hacker News
Webroot Blog
Webroot Blog
Security Latest
Security Latest
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Google DeepMind News
Google DeepMind News
酷 壳 – CoolShell
酷 壳 – CoolShell
N
News | PayPal Newsroom
P
Proofpoint News Feed
B
Blog RSS Feed
MongoDB | Blog
MongoDB | Blog
C
Cybersecurity and Infrastructure Security Agency CISA
N
News and Events Feed by Topic
Google Online Security Blog
Google Online Security Blog
H
Help Net Security
Spread Privacy
Spread Privacy
T
Threat Research - Cisco Blogs
GbyAI
GbyAI
I
Intezer
Application and Cybersecurity Blog
Application and Cybersecurity Blog
M
MIT News - Artificial intelligence
Vercel News
Vercel News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
IT之家
IT之家
MyScale Blog
MyScale Blog
腾讯CDC

NickChenyx's Blog

Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish
Create_Rubbish
nickChen · 2018-04-18 · via NickChenyx's Blog

Golang 开源之 tparse 使用指南

Created At :

Count:177 Views 👀 :

  1. tparse 能做什么

tparse 分析和归纳 go test 输出的命令行工具

安装

go install github.com/mfridman/tparse@latest

tparse 能做什么

仅使用 go test -v 来显示测试结果,只是罗列了所有测试集合,没有归纳总结,不便于一眼明了。

➜  go test -race ./testtparse -v
=== RUN   Test_sum
=== RUN   Test_sum/return_2
--- PASS: Test_sum (0.00s)
    --- PASS: Test_sum/return_2 (0.00s)
=== RUN   Test_sub
=== RUN   Test_sub/return_0
--- PASS: Test_sub (0.00s)
    --- PASS: Test_sub/return_0 (0.00s)
PASS
ok      code.byted.org/demo/testtparse  0.026s

使用 tparse 分析归纳 go test 的报告结论

➜  go test -race ./testtparse -json -cover | tparse -all

+--------+---------+-------------------+------------+
| STATUS | ELAPSED |       TEST        |  PACKAGE   |
+--------+---------+-------------------+------------+
| PASS   |    0.00 | Test_sum          | testtparse |
| PASS   |    0.00 | Test_sum/return_2 | testtparse |
| PASS   |    0.00 | Test_sub          | testtparse |
| PASS   |    0.00 | Test_sub/return_0 | testtparse |
+--------+---------+-------------------+------------+

+--------+---------+--------------------------------+--------+------+------+------+
| STATUS | ELAPSED |            PACKAGE             | COVER  | PASS | FAIL | SKIP |
+--------+---------+--------------------------------+--------+------+------+------+
| PASS   | 0.04s   | code.byted.org/demo/testtparse | 100.0% |    4 |    0 |    0 |
+--------+---------+--------------------------------+--------+------+------+------+

转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。可以在下面评论区评论,也可以邮件至 nickchenyx@gmail.com

Title:Golang 开源之 tparse 使用指南

Count:177

Author:nickChen

Created At:2022-06-12, 18:14:13

Updated At:2023-05-08, 23:27:10

Url:http://nickchenyx.github.io/2022/06/12/golang-tparse-usage/

Copyright: 'Attribution-non-commercial-shared in the same way 4.0' Reprint please keep the original link and author.