• 软件测试上机实验报告


    Tasks:

    1. Install Junit(4.12), Hamcrest(1.3) with Eclipse
    2. Install Eclemma with Eclipse
    3. Write a java program for the triangle problem and test the program with Junit.

    实验过程:

    1. 从办公网上下载junit-4.12.jar和hamcrest-all-1.3.jar包,并通过build path导入。

    2. 下载Eclemma并安装,Help —— Eclipse Marketplace —— 搜索Eclemma并安装。

    3. 新建st工程文件,test Source Folder,在src 和 test 下建立相同名字的package,将判断三角形形状的文件TriangleType.java写在src下,将判断程序的测试用例等测试文件TestTriangle.java写在test下。

    在TriangleType中,分别考虑到“不构成三角形”,“等腰三角形”,“等边三角形”,“直角三角形”和“普通三角形”等几种情况进行判断。

    在TestTriangle中使用Junit针对上述各种情况写出测试用例。

    4. 使用eclemma测试Coverage。

    (居然是100%。。。)

  • 相关阅读:
    163国内镜像源
    一个简单的springboot项目
    springcloud概述
    final关键字
    springboot项目多模块打包
    Unity Shaderlab: Object Outlines
    生命周期
    Unity内置事件
    Win10输入指示器关掉后自动恢复的问题
    Unity Shader-后处理:景深
  • 原文地址:https://www.cnblogs.com/Veronica226/p/5291533.html
Copyright © 2020-2023  润新知