前台首页用例设计
1、前台首页



2、首页测试范围列表
| 功能点编号 | 名称 | 测试类型 | PATH | 优先级 | 测试负责人 |
| tpshop-st-F-sys-sy-003 | 商品分类 | 功能测试 | 首页\ | 高 | tester1 |
| tpshop-st-F-sys-sy-004 | 轮播图 | 功能测试 | 首页\ | 高 | tester1 |
| tpshop-st-F-sys-sy-005 | 商品楼层 | 功能测试 | 首页\ | 高 | tester1 |
| tpshop-st-F-sys-sy-007 | 楼层数据 | 功能测试 | 首页\ | 高 | tester1 |
| tpshop-st-F-sys-sy-008 | 热门推荐 | 功能测试 | 首页\ | 高 | tester1 |
3、首页用例设计分析
(1)功能点需求分析
| 首页 | |||
| 功能点一 | 商品分类 | ||
| 测试点 | 1 光标效果:光标移动到左侧产品分类,展示右侧div商品列表 | ||
| 2 商品类别数据校验 | |||
| 一级分类数据校验 | SELECT * from tp_goods_category where parent_id = 0 and is_show = 1 ORDER BY sort_order | ||
| 家用电器二级分类数据校验 | SELECT * from tp_goods_category where parent_id = 2 and is_show = 1 ORDER BY sort_order | ||
| 生活电器三级分类数据校验 | SELECT * from tp_goods_category where parent_id = 19 and is_show = 1 ORDER BY sort_order | ||
| 功能点二 | 轮播图 | ||
| 输入 | 处理 | 输出 | |
| 张数:2张 | 正常处理:1 自动轮播 | 1 正常切换轮播图 | |
| 轮播方式:自动/手动 | 2 手动轮播 | 2 轮播图跳转指定页面 | |
| 轮播时间间隔:3秒 | 异常处理:1 自动轮播:最后一张图片结束跳转 | ||
| 支持循环 | 2 自动轮播切换时手动切换图片 | ||
| 支持鼠标悬停 | 2 手动轮播后能否自动轮播 | ||
| 支持图片链接 | |||
| 功能点三 | 楼层展示 | ||
| 1 展示楼层顺序及鼠标点击定位 | |||
| 2 楼层数据校验:tp_goods_category表中is_hot字段控制 | |||
| SELECT * from tp_goods_category where parent_id = 0 and is_show = 1 and is_hot =1 ORDER BY sort_order | |||
| 功能点四 | 楼层数据 | ||
| 来自表tp_goods 与tp_goods_category | |||
| 家用电器数据: | |||
| select * from tp_goods as g inner join tp_goods_category as c on g.cat_id = c.id where c.parent_id_path like '0_2%' and g.is_on_sale = 1 and g.is_hot = 1 ORDER BY g.goods_id limit 9,6 |
|||
| 功能点五 | 热门推荐:循环滚动 | ||
| select count(*) from tp_goods as g inner join tp_goods_category as c on g.cat_id = c.id where c.parent_id_path like '0_2%' and g.is_on_sale = 1 and g.is_recommend = 1 ORDER BY g.sort |
|||
4、首页用例设计
| ID | 模块 | 优先级 | 前置条件 | 测试标题 | 步骤描述 | 测试数据 | 预期结果 | 实际结果 | 测试版本号 | 测试人员 | 备注 |
| 001 | 首页 | p1 | 进入前台首页 | 验证首页商品一级分类数据是否正确 | 1、Navicat连接服务器:IP 2、输入对应的sql语句进行查询 3、比对首页一级商品信息与数据库查看结果 | 1、IP:xxxxx 2、SQL:select * from tp_goods_category where parent_id=0 and is_show=1 ORDER BY sort_order |
首页一级商品分类展示与sql查询结果一致 | ||||
| 002 | p1 | 验证首页商品家用电器二级分类数据是否正确 | 1、Navicat连接服务器:IP 2、输入对应的sql语句进行查询 3、比对首页商品家用电器二级商品信息与数据库查看结果 | 1、IP:xxxxx 2、SQL:select * from tp_goods_category where parent_id=2 and is_show=1 ORDER BY sort_order |

本文详细阐述了电商平台前台首页的功能测试设计,包括商品分类、轮播图、楼层展示等关键功能点的测试策略,通过对比数据库查询结果验证前端展示的准确性。
最低0.47元/天 解锁文章
774





