[{"createTime":1735734952000,"id":1,"img":"hwy_ms_500_252.jpeg","link":"https://activity.huaweicloud.com/cps.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=V1g3MDY4NTY=&utm_medium=cps&utm_campaign=201905","name":"华为云秒杀","status":9,"txt":"华为云38元秒杀","type":1,"updateTime":1735747411000,"userId":3},{"createTime":1736173885000,"id":2,"img":"txy_480_300.png","link":"https://cloud.tencent.com/act/cps/redirect?redirect=1077&cps_key=edb15096bfff75effaaa8c8bb66138bd&from=console","name":"腾讯云秒杀","status":9,"txt":"腾讯云限量秒杀","type":1,"updateTime":1736173885000,"userId":3},{"createTime":1736177492000,"id":3,"img":"aly_251_140.png","link":"https://www.aliyun.com/minisite/goods?userCode=pwp8kmv3","memo":"","name":"阿里云","status":9,"txt":"阿里云2折起","type":1,"updateTime":1736177492000,"userId":3},{"createTime":1735660800000,"id":4,"img":"vultr_560_300.png","link":"https://www.vultr.com/?ref=9603742-8H","name":"Vultr","status":9,"txt":"Vultr送$100","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":5,"img":"jdy_663_320.jpg","link":"https://3.cn/2ay1-e5t","name":"京东云","status":9,"txt":"京东云特惠专区","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":6,"img":"new_ads.png","link":"https://www.iodraw.com/ads","name":"发布广告","status":9,"txt":"发布广告","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":7,"img":"yun_910_50.png","link":"https://activity.huaweicloud.com/discount_area_v5/index.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=aXhpYW95YW5nOA===&utm_medium=cps&utm_campaign=201905","name":"底部","status":9,"txt":"高性能云服务器2折起","type":2,"updateTime":1735660800000,"userId":3}]
作为一名测试工程师,如果不会写测试用例是不是很不合格?下面我就来总结一下平时工作中我是如何写测试用例的,重点介绍一下测试标题的命名。
步骤:
1.当我们拿到一个需求的时候首先要对需求进行解读,快速的熟悉并了解这个需求。1)这个需求实现了什么样的功能 2)这个需求是在什么环境下产生的
3)作为测试我应该关心什么 4)我需要构造哪些测试数据来完成我的测试
举个例子:比如需求是在文章库中新增一个查询功能。那么首先它得能实现查询的功能,通过这个查询我能找到我想要的文章。第二这个查询需不需要登录,是在什么情况下查询的?第三我要测什么UI、模糊查询、完整查询、关键字查询、多条件匹配查询、查询速度、查询结果的正确性等等。。。第四个我需要一些文章来支撑我的查询测试
2.整理需求输出测试用例
这里测试用例的八大要素不再赘述。主要讲一下我是怎么整理测试用例标题的。因为工作中评审用例时经常遇到标题写的很奇怪的同事。
标题顾名思义就是对你做的这件事情的总结和概述。那么测试用例的标题也需要一句话简单的概述出你这条用例是做什么的。比如:模糊查询、精确查询、查询条件超长等等。
其实更多的时候当你不会写的标题可以参考一下测试点,标题其实就是测试点的概述。
还有步骤法,比如检查查询条件UI,这个就类似于我们的操作步骤。
测试结果提取法,比如获取正确查询结果等等,总之能用简单的话让别人看清楚你是要做什么都可以。