当前位置:网站首页>ITest:京东数科接口自动化测试实践

ITest:京东数科接口自动化测试实践

2020-12-19 08:11:23 InfoQ

{"type":"doc","content":[{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"导读:你是否为每天“点点点”的工作而感到索然无味?你是否苦于没有合适的工具而对复杂的测试任务望而却步?频繁变动的接口,重复的功能测试,你,疲惫么?京东数科运维部平台开发组基于日常接口测试经验,开发了接口测试平台——ITest。通过此平台让研发流程更高效,让测试回归测试本身,做适配数科场景的通用接口测试平台。本文将从需求背景、平台特性、架构设计、未来规划几方面详细阐述ITest助力接口自动化测试在京东数科的最佳实践与探索。"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"一、需求背景"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"接口测试位于测试金字塔的中间层,与业务关联度较高,测试及运行成本适中,同时能够覆盖到端对端测试所不能覆盖的并发,安全等,在测试过程中占据重要地位。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"接口自动化测试因其能够降低回归成本,提高回归效率,在回归测试及冒烟测试阶段应用较为广泛。但面对日益复杂的软件设计,做好接口自动化工作并非易事,在此针对其中两个痛点进行阐述:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"1、复杂场景的接口自动化编码耗时多,接口测试工具无法满足个性化需求"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"自动化测试能够稳定执行的前提是,单个测试用例必须能够重复成功运行。这意味着完整的自动化用例中必须包含测试数据准备,测试调用,数据校验及数据清理工作等。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在应用逐渐微服务化的今天,A服务接口的数据准备工作可能会依赖多个B服务的接口,接口测试用例的设计本身对于测试同学的业务能力就是不小的挑战,要完成高质量的稳定可重复运行的自动化用例的编码,更是一件耗时的事情。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"而目前通用的接口测试工具能解决的多是通用性的需求,当用户的接口请求中包含自定义算法,加解密信息等情况时,接口测试工具无法给予友好的支持。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"2、团队协作不易,开发和测试对齐用例有沟通成本"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}}]}

版权声明
本文为[InfoQ]所创,转载请带上原文链接,感谢
https://www.infoq.cn/article/Hs02Tge3SJp8Sb0A0UfL?utm_source=rss&utm_medium=article

随机推荐