接口协议分析与抓包

udp抓包

hogwarts: ~ seveniruby$ sudo tcpdump port 53 -vv
\tcpdump: data link type PKTAP
tcpdump: listening on pktap, link-type PKTAP (Apple DLT_PKTAP), capture size 262144 bytes


20:56:12.058389 IP (tos 0x0, ttl 64, id 47506, offset 0, flags [none], proto UDP (17), length 58)
    192.168.78.107.51301 > public1.114dns.com.domain: [udp sum ok] 54528+ A? ceshiren.com. (30)
20:56:12.059430 IP (tos 0x0, ttl 64, id 61328, offset 0, flags [none], proto UDP (17), length 74)
    192.168.78.107.56880 > public1.114dns.com.domain: [udp sum ok] 46640+ PTR? 114.114.114.114.in-addr.arpa. (46)
20:56:12.085706 IP (tos 0x0, ttl 152, id 0, offset 0, flags [none], proto UDP (17), length 74)
    public1.114dns.com.domain > 192.168.78.107.51301: [udp sum ok] 54528 q: A? ceshiren.com. 1/0/0 ceshiren.com. A 39.102.44.73 (46)
20:56:12.086999 IP (tos 0x0, ttl 152, id 0, offset 0, flags [none], proto UDP (17), length 106)
    public1.114dns.com.domain > 192.168.78.107.56880: [udp sum ok] 46640 q: PTR? 114.114.114.114.in-addr.arpa. 1/0/0 114.114.114.114.in-addr.arpa. PTR public1.114dns.com. (78)

接口覆盖率要以接口文档作为覆盖率依据?

  • 代码扫描 spring boot go
  • 线上日志分析
  • 文档

为什么单元测试一般是由开发来写呢

  • 单元层面变更比较快
  • 跨部门沟通成本
1 个赞