博客
关于我
单元测试----CppUnit
阅读量:163 次
发布时间:2019-02-27

本文共 566 字,大约阅读时间需要 1 分钟。

下载与安装

下载CppUnit可以通过以下步骤完成:

  • 从官方网站或可信来源下载CppUnit压缩包。
  • 解压压缩包,进入src目录,找到CppUnitLibraries.dsw文件,使用VC++打开。
  • 编译完成后,库文件会生成在lib目录下,包含多个版本:
    • cppunit.lib:静态库(release版)
    • cppunitd.lib:静态库(debug版)
    • cppunit_dll.lib:动态库(release版)
    • cppunitd_dll.lib:动态库(debug版)

    编译CppUnit

    在src/目录下:

  • 打开CppUnitLibraries.dsw文件。
  • 执行批量编译(build → batch build)。
  • 编译完成后,运行生成的项目,确保无误。
  • 配置环境变量

  • 设置环境变量Path,添加TestRunner.dll的路径。
  • 在Tools → Options → Directories中,添加CppUnit的include和lib路径。
  • 使用TestRunner进行测试

  • TestRunner.dll提供了GUI测试环境。
  • 将其添加到系统Path中,确保其可用性。
  • 使用TestRunner进行测试,选择控制台或GUI模式运行测试用例。
  • 通过以上步骤,您可以顺利下载、编译并配置CppUnit,轻松进行测试开发。

    转载地址:http://mjid.baihongyu.com/

    你可能感兴趣的文章
    sql查询中 查询字段数据类型 int 与 String 出现问题
    查看>>
    org.apache.commons.beanutils.BasicDynaBean cannot be cast to ...
    查看>>
    org.apache.dubbo.common.serialize.SerializationException: com.alibaba.fastjson2.JSONException: not s
    查看>>
    sqlserver学习笔记(三)—— 为数据库添加新的用户
    查看>>
    org.apache.http.conn.HttpHostConnectException: Connection to refused
    查看>>
    org.apache.ibatis.binding.BindingException: Invalid bound statement错误一例
    查看>>
    org.apache.ibatis.exceptions.PersistenceException:
    查看>>
    org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned
    查看>>
    org.apache.ibatis.type.TypeException: Could not resolve type alias 'xxxx'异常
    查看>>
    org.apache.poi.hssf.util.Region
    查看>>
    org.apache.xmlbeans.XmlOptions.setEntityExpansionLimit(I)Lorg/apache/xmlbeans/XmlOptions;
    查看>>
    org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /
    查看>>
    org.hibernate.HibernateException: Unable to get the default Bean Validation factory
    查看>>
    org.hibernate.ObjectNotFoundException: No row with the given identifier exists:
    查看>>
    org.springframework.boot:spring boot maven plugin丢失---SpringCloud Alibaba_若依微服务框架改造_--工作笔记012
    查看>>
    SQL-CLR 类型映射 (LINQ to SQL)
    查看>>
    org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
    查看>>
    org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
    查看>>
    org.springframework.web.multipart.MaxUploadSizeExceededException: Maximum upload size exceeded
    查看>>
    org.tinygroup.serviceprocessor-服务处理器
    查看>>