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

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第三方库


热门话题
在Java中,我需要读取一个文本文件,并将每一行放在一个单独的数组中。但每次我读文本文件时,我都无法拆分行   SpringJavaservlet返回不正确的用户代理   java如何在spring测试中动态设置环境变量   绑定后的java关闭通道   java我想在设置方法中使用selenium执行多用户登录操作,我没有使用testng。xml我正在使用maven pom。仅xml   java foreach 2d数组分配   我想用java编写prim算法   java如何在Spring Boot中验证Rest请求   JavaJScrollPane问题   java将一个节点与另一个节点关联起来   java获取错误:范围内无法访问Polyline类型的封闭实例   字节[]到int,反之为java