推荐使用visual studio community 2015版,这个是微软的免费版,不需要购买。
直接F7编译即可。
- server.conf配置
程序在启动的时候会加载配置里的ip和port会自动加载到界面对应的输入框,后面可以随意修改。 - 点击“加载测试文件”,会弹出选择文件框(只显示txt和dat后缀的文件)
第一行:server[10.100.120.71:18800],针对每个文件配置不同的端口,可以不配置,但不要配错了。
文件格式:
#开头的表示注释,不会作为测试数据发送,其他的一条数据一行
每行测试数据里‘#’后面的数据不会被发送,作为预测的值,在自动执行时会被显示出来。 - 双击列表中的某一条会把其中的内容发送到指定端口并弹出返回值。
- 点击“自动执行”会把加载的内容全部发送到指定端口并接受返回值。
- 由于windows对utf-8编码不友好,所以统一改用ANSI编码。
- 写的测试用例后缀必须是txt或dat,否则不识别。
- 每个请求的后面会被加上"\r\n",就像telnet的格式一样。
- 程序用的是阻塞socket,发送完成后会一直等待服务端返回的数据,造成假死。加了定时器但是没起作用,欢迎大神帮助解决。