面向嵌入式系统开发人员的回归测试脚本框架

monk_tf的Python项目详细描述


Build StatusDocumentation StatusCodacy QualityCoveralls QualityLicenseDownloadsLatest VersionSupported Python VersionsCurrent Devel StatusSupport Package Format

简介

使用monk可以像编写单元测试一样编写测试,只要它们 能够与嵌入式系统交互。

让我们看一个例子。在下面的例子中,我们有一个嵌入式系统 带有串行终端和网络接口。我们想写一个测试 检查网络接口是否通过DHCP接收正确的信息。

用notests编写的测试用例:

importnose.toolsasntimportmonk_tf.connasmcimportmonk_tf.devasmddeftest_dhcp():""" check whether dhcp is implemented correctly
    """# setupdevice=md.Device(mc.SerialConn('/dev/ttyUSB1','root','sosecure'))# exercisedevice.cmd('dhcpc -i eth0')# verifyifconfig_out=device.cmd('ifconfig eth0')nt.ok_('192.168.2.100'inifconfig_out)

即使对于非python程序员,也不难猜测,这个测试 将连接到/dev/ttyUSB1上的串行接口,发送shell命令 dhcpceth0接口获取新的IP地址,最后 检查是否接收到测试仪预期的IP地址。不需要 担心连接处理、登录和会话处理。

有关详细信息,请参见 API Docs

版本0.1.10/0.1.11(2014-05-05)

使设备能够使用当前连接查找其IP地址。例子 用例:你有一个串行连接到你的设备,你知道如何 进入。设备本身使用DHCP获取IP地址,并且您要发送 对它的http请求。现在您可以使用monk通过 然后发送您的http请求。

版本0.1.9(2014-04-14)

  • add option to set debug fixture file which overwrites differences between test environment and development environment while developing

版本0.1.7/0.1.8(2014-03-27)

  • workaround for slower password prompt return times
  • there was a problem in the publishing process which lead to changes not being added to the 0.1.7 release

版本0.1.6(2014-03-06)

  • again bugs got fixed
  • most important topic was stabilizing the connect->login->cmd process
  • error handling improved with more ifs and more userfriendly exceptions
  • it is now possible to completely move from Disconnected to Authenticated even when the target device is just booting.

版本0.1.5(2014-02-25)

  • fixed many bugs
  • most notably 0.1.4 was actually not able to be installed from PyPI without workaround

版本0.1.4(2014-01-24)

  • fixed some urgent bugs
  • renamed harness to fixture
  • updated docs

版本0.1.3

  • complete reimplementation finished
  • documentation not up to date yet
  • Features are: * create independent connections with the connection layer * example implementation with SerialConnection * create complete device abstraction with the dev layer * basic device class in layer * separate test cases and connection data for reusage with harness layer * example parser for extendend INI implemented in harness layer

版本0.1.2

  • added GPLv3+ (source) and CC-BY-SA 3.0 (docs) Licenses
  • updated coding standards

版本0.1.1

  • rewrote documentation
  • style guide
  • configured for pip, setuptools, virtualenv
  • restarted unit test suite with nosetests
  • added development and test requirements

释放0.1

最初的释放。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
spring boot+react+mysql连接器上的java构建失败?   java如何从动态标题/文本中仅提取数字?   Eclipse java类在方法注释后插入新行   java是否在makefiles文档中指定了两次编译?   java在Spring拦截url配置中,ROLE_USER和ROLE_ANONYMOUS之间有什么区别?   sql上相同参数的java多值   java将安卓应用程序连接到本地MS SQL数据库   java在运行时收到谓词函数的名称时,如何将一个函数作为谓词传递给另一个函数?   java Lambda输入文件到数组中   java如何在数组中搜索元素?以及如何将声明了方法的变量添加到数组列表中?   java如何按列对分布在众多json文件中的数据进行分组   安装pyjnius时发生java错误,未找到“jni.h”。(操作系统X 10.10.1)   java Android:CursorIndexOutOfBoundsException:请求索引0,大小为0,站点上没有答案   java My应用程序不回退IBM MQ消息   JAVAutil。扫描器Java扫描器或缓冲读取器   java缩短开关盒方法   java获取当前文件夹中的可用空间   Java属性绑定   java如何制作注释类型的AnnotationProcessor测试*子类型*?