Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

是否考虑自动化回归测试? #369

Open
qjg opened this issue Feb 4, 2020 · 1 comment
Open

是否考虑自动化回归测试? #369

qjg opened this issue Feb 4, 2020 · 1 comment

Comments

@qjg
Copy link

qjg commented Feb 4, 2020

互联网行业中,某个应用上线前会进行回归测试。传统的自动化测试都是人工编写脚本来进行,最头痛的是如何设置预期值,以及测试样本太少,覆盖率低;
考虑这么一个场景:A->B->C。现在需要对B做回归测试,我们抓到了A到B的流量,也抓了B到C的流量。是否可以将这部分流量回放,模拟A向B发请求,下游的C向B的响应由assisant server读取pcap文件返回,相当MOCK掉了C的依赖。测试时B会返回一个response,这个response与抓下来的response(B->A)的应该一致,不一致则说明B存在意外改动点;
tcpcopy是否可以由assisant server返回抓下(离线模式)的response包?并暴露hook由用户来自定义比对response规则,如不对比时间相关的字段。最好是脚本的方式,比如嵌入lua脚本。

@wangbin579
Copy link
Member

一般推荐在应用层记录下具体响应内容,来对比测试结果。

tcpcopy是不解析响应内容,不建议在此基础上改造

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants