团队项目——Alpha发布1

这个作业属于哪个课程 https://edu.cnblogs.com/campus/xnsy/GeographicInformationScience/homework
这个作业要求在哪里 https://www.cnblogs.com/harry240/p/11524148.html
团队名称 愿头发与你我同在
这个作业的目标 了解系统设计的基本方法,了解软件架构的分层,对本团队项目进行系统设计(数据库设计、代码分层设计)

团队情况

角色 姓名 学号
组长 赵荣泽 201731024233
组员 严一笑 201731023225
组员 张伟 201731024216
组员 郑博 201731024236
组员 师志杰 201731024213
组员 王云飞 201731024231
组员 舒鹏飞 201731024219

项目部署

项目主页:http://39.105.70.134:8080/

测试报告

测试工作安排

姓名 测试内容
师志杰 LinkService
张伟 blogService
王云飞 tagService
舒鹏飞 catagoryService
严一笑 commentService
赵荣泽 网页点击测试
郑博 网页点击测试

测试工具的选择

junit

测试用例

@Test
public void categoryTest(){
    categoryService.saveCategory("category1");
    categoryService.saveCategory("category2");
    categoryService.saveCategory("category3");
    List<BlogCategory> allCategories = categoryService.getAllCategories();
    Assert.assertEquals(allCategories.get(0).getCategoryName(),"category1");
    Assert.assertEquals(allCategories.get(1).getCategoryName(),"category2");
    Assert.assertEquals(allCategories.get(2).getCategoryName(),"category3");
    categoryService.deleteBatch(new Integer[]{1,2,3});
    int totalCategories = categoryService.getTotalCategories();
    Assert.assertEquals(totalCategories,0);
}

@Test
public void tagTest(){
    tagService.saveTag("tag1");
    tagService.saveTag("tag2");
    tagService.saveTag("tag3");
    int totalTags = tagService.getTotalTags();
    Assert.assertEquals(totalTags,3);
    tagService.deleteBatch(new Integer[]{1,2,3});
    int totalTags1 = tagService.getTotalTags();
    Assert.assertEquals(totalTags1,0);
}

@Test
public void BlogTest(){
    categoryService.saveCategory("category1");
    tagService.saveTag("tag1");

    Blog blog = new Blog();
    blog.setBlogTitle("blog");
    blog.setBlogContent("xxx");
    blog.setBlogCategoryId(1);
    blog.setBlogTags("xxx,sss");
    blog.setBlogSubUrl("dsa");
    blog.setBlogStatus((byte) 1);

    blogService.saveBlog(blog);
    BlogDetailVO blogDetail = blogService.getBlogDetail(1L);
    Assert.assertEquals(blogDetail.getBlogTitle(),"blog");

    int totalBlogs = blogService.getTotalBlogs();
    Assert.assertEquals(totalBlogs,1);

    blog.setBlogId(1L);
    blog.setBlogTitle("new Title");
    blogService.updateBlog(blog);
    Assert.assertEquals(blogService.getBlogById( 1L).getBlogTitle(),"new Title");

    blogService.deleteBatch(new Integer[]{1});
    int totalBlogs1 = blogService.getTotalBlogs();
    Assert.assertEquals(totalBlogs1,0);
}

@Test
public void commentTest(){
    BlogComment blogComment = new BlogComment();
    blogComment.setCommentator("zzz");
    blogComment.setEmail("401844090@qq.com");
    blogComment.setBlogId(1L);
    blogComment.setCommentStatus((byte) 1);
    commentService.addComment(blogComment);

    int totalComments = commentService.getTotalComments();
    Assert.assertEquals(totalComments,1);

    PageResult pageResult = commentService.getCommentPageByBlogIdAndPageNum(1L, 1);
    BlogComment blogComment1 = (BlogComment)pageResult.getList().get(0);
    Assert.assertEquals(blogComment1.getCommentator(),"zzz");

    commentService.deleteBatch(new Integer[]{1});
    int totalComments2 = commentService.getTotalComments();
    Assert.assertEquals(totalComments2,0);
}

@Test
public void linkTest(){
    BlogLink blogLink = new BlogLink();
    blogLink.setLinkDescription("xxx");
    blogLink.setLinkUrl("xx");
    blogLink.setLinkName("x");
    blogLink.setLinkType((byte) 1);
    linkService.saveLink(blogLink);

    BlogLink blogLink1 = linkService.selectById(1);
    Assert.assertEquals(blogLink1.getLinkName(),"x");

    linkService.deleteBatch(new Integer[]{1});
    int totalLinks = linkService.getTotalLinks();
    Assert.assertEquals(totalLinks,0);
}

测试结果截图

测试体会与总结

  • 师志杰

    Link测试:本次测试除了使我在测试的难度上有所体会,也感受到测试对于人员技术的要求较高,Link测试主要目的是通过测试前台和后台的交互情况,测试友情链接在添加和修改、删除以及在数据库的存储方面是否顺畅。在前台对友链做出修改和删除时要保证后台数据库对应的存储区做出变化。
    了解前台友情链接功能显示,通过后台友情链接编辑功能测试和前台友情链接数据交互,后台友情编辑视图代码编写,测试友情链接功能前台和后台数据交互。
    本次测试难度较大,虽然在课堂上了解了一部分关于测试的内容,但在课堂上了解的内容不足以解决该项目,运用时依然具有很大的难度。所幸在网上大量查阅相关资料和项目组长赵荣泽同学的帮助下及所有项目成员的努力下,初步达到了我们的测试要求。

  • 舒鹏飞

    catagory测试:在测试中我们可以把我们的测试方法分成很多的Catagory来分别的测试或者不测试,给了我们很多的选择而不必做徒劳无功的行动。根据是否可以看见代码来分两类:
    1)黑盒测试 : 不能看见代码逻辑
    2)百合测试 : 能看见代码逻辑
    根据测试功能的多少来分类:
    1)方法测试 : 单个方法的测试,根据参数或者返回值来测试
    2)单元测试 : 测试一个或者多个方法的测试
    3)集成测试 : 一个单元或者多个单元的逻辑测试
    根据测试次数来分类:
    1)冒烟测试 : 一次或者连续测试功能,直到crash
    2)压力测试 : 模拟多人测试或者多请应用,判断应用是否响应以及响应速度

    测试分类也是根据我们自己的东西来选择,需要了解整个项目,在参考了网络资料和询问组长的情况下完成了,总体来说还是可以克服的难度。

  • 严一笑

    我们小组由我负责Comment部分的测试,首先我邀请我的舍友来进行黑盒测试,请他随意使用我们的博客,并着重试用我们的评论功能,这一步骤中未发现bug,博客评论系统可以正常运转,之后我针对部分方法进行了单元测试,不得不说我的编程水平还是有待提高,在查阅网上资料以及组长的帮助下,我完成了我的测试,并且解决了问题。

  • 张伟

    测试是对于原有的内容加入进去之后(标题,内容等),对更新和删除的检查。
    更新完成的话就被get到,否则就是空;而删除之后在方法里变成0。因为这里的操作比较少,只有增和删,改和查没有得到体现,而且发现了是否可以在删之后可以有撤回的功能。然后报告给组主,小组成员一起讨论并在阅读了一些资料和例子之后得到了解决。

  • 郑博

    在做点击测试的时候,因为前端是js,css和html代码,编码是不太现实的,所以我就进行了很多点击测试,在IE浏览器,FireFox浏览器,谷歌浏览器与360浏览器做了测试,发现只有谷歌浏览器可以兼容登录的界面,另外还在win7和win10的系统下进行了测试,发现都可以运行;另外我做了不同网速测试发现浏览速度都差不多。

  • 王云飞

    我负责tag部分的测试,先输入三个标签然后检测标签数是否等于三,然后再删除标签检测标签数等于零,测试代码正确运行。然后在博客中也能正确地使用和显示代码。确定tag功能可以正确使用。

  • 赵荣泽

    这次测试我主要在页面端使用了博客系统的每个功能,对于一些交互逻辑进行测试。有些前端插件的功能在后端不好测试,比如我们引入的markdown样式的渲染插件,只能在前端写出所有的markdown语法,在渲染后再检查有什么不对的地方。同时我还使用电脑和手机分别对前端的效果进行了检查

项目情况总结

本次项目基本完成了之前制订的全部核心功能,并且成功发布上线。目前单测覆盖率还很低,所以肯定有潜在的bug,所以等以后使用的过程中慢慢发现。

在第一次α版本发布之后,该组的项目已经完成了哪些内容

  1. 管理员登录
  2. 博客管理
  3. 评论管理
  4. 分类管理
  5. 标签管理
  6. 友情链接管理

和项目预期计划相比,还有哪些内容没有完成。

有一些扩展的功能由于时间关系还没有完成,比如词频统计

下一次α版本的展望,给出具体的安排计划

  1. 页面访问次数限制:短时间内多次访问页面或者频繁发送请求,直接拒绝服务
  2. 基于ip的文章访问次数统计
posted @ 2019-11-13 19:37  猫为什么爱吃鱼  阅读(245)  评论(2编辑  收藏  举报