*** Test Cases ***
断言一
#01、should contain 、 should not contain 与should contain x times
@{list1}= create list 3 a ${28} 22 25
@{list2}= set variable 3.0 a ${28} 22 22
@{list3}= create list
${string1}= set variable cq is a girl
${name}= set variable cq
should contain ${list2} 3.0
should not contain ${list2} 3
should contain x times ${list2} 22 2 断言二
#should be empty 与 should not be empty
@{list1}= create list 3 a ${28} 22 25
@{list2}= create list
${list3}= create list cq
should be empty ${list2}
should not be empty ${list1} 断言三
#should be equal 与 should not be equal
@{list1}= create list 3 a ${28} 22 22 3.0
should be equal ${list1[3]} ${list1[4]}
should not be equal ${list1[0]} ${list1[5]} 断言四
#Should Be Equal As Numbers 与 Should not Be Equal As Numbers
@{list1}= create list 3 a ${28} 22 3.98 3.0
should be equal as numbers ${list1[0]} ${list1[5]}
should not be equal as numbers ${list1[0]} ${list1[4]}
#说明:${list1[0]}=3,忽略精度,与3.0相等;忽略精度,1与3.98还是不相等的 断言五
#Should Be Equal As Integers与Should not Be Equal As Integers
@{list1}= create list 3 a ${28} 22 3.98 3.0 3 ${3}
should be equal as Integers ${list1[0]} ${list1[6]}
should not be equal as Integers ${list1[0]} ${list1[3]} 断言六
#Should Be True与Should not Be True
@{list1}= create list 3 a ${28} 22 3.98 3.0 3 ${3}
should be true ${list1[0]}<${list1[3]}
should not be true ${list1[4]}<${list1[0]} 断言七
#Should start With与Should not start With
${string1}= set variable cq is a girl
should start with ${string1} cq
should not start with ${string1} cd 断言八
#Should End With与Should not End With
${string1}= set variable cq is a girl
should end with ${string1} girl
should not end with ${string1} girls 断言九
#should match与 should not match
@{list1}= create list cq a ${28} 22 3.98 3.0 3 ${3}
should match ${list1[0]} c?
should not match ${list1[0]} a?
#模式匹配和shell中的通配符类似,区分大小写,'*'匹配0~无穷多个字符,“?”匹配单个字符

robot framework-断言的更多相关文章

  1. robot framework断言

    一.基础 RobotFramework带有丰富的系统关键,使用时无需导入,直接使用,为写自动化用例带来了极大的方便:不能停留在知道或者是会得程度,只有熟练使用各关键字,才能提升自动化用例的写作效率.下 ...

  2. Robot Framework与Web界面自动化测试学习笔记:简单例子

    假设环境已经搭建好了.这里用RIDE( Robot Framework Test Data Editor)工具来编写用例.下面我们对Robot Framework简称rf. 我们先考虑下一个最基本的登 ...

  3. python+robot framework接口自动化测试

    python+requests实现接口的请求前篇已经介绍,还有不懂或者疑问的可以访问 python+request接口自动化框架 目前我们需要考虑的是如何实现关键字驱动实现接口自动化输出,通过关键字的 ...

  4. python+request+robot framework接口自动化测试

    python+requests实现接口的请求前篇已经介绍,还有不懂或者疑问的可以访问 python+request接口自动化框架 目前我们需要考虑的是如何实现关键字驱动实现接口自动化输出,通过关键字的 ...

  5. Robot Framework 环境安装(一)

    1.安装python:https://www.python.org/2.安装python的第三方库:robotframework (1)检查是否支持pip命令. (2)robotframework安装 ...

  6. 用 Python 写 Robot Framework 测试

    Robot Framework 框架是基于 Python 语言开发的,所以,它本质上是 Python 的一个库. 1.你懂 Python 语言. 2.又想使用 Robot Framework 测试框架 ...

  7. 【Robot Framework 项目实战 01】使用 RequestsLibrary 进行接口测试

    写在前面 本文我们一起来学习如何使用Robot Framework 的RequestsLibrary库,涉及POST.GET接口测试,RF用例分层封装设计等内容. 接口 接口测试是我们最常见的测试类型 ...

  8. Robot Framework与Web界面自动化测试:简单例子

    假设环境已经搭建好了.这里用RIDE( Robot Framework Test Data Editor)工具来编写用例.下面我们对Robot Framework简称rf. 我们先考虑下一个最基本的登 ...

  9. Robot Framework操作

    Robot Framework 介绍 RobotFramework是一款基于python的开源自动化测试框架,遵守Apache License 2.0协议,在此协议下所有人都可以免费开发和使用.因为R ...

  10. [转]Python测试框架对比----unittest, pytest, nose, robot framework对比

      测试框架 什么是框架? 框架(Framework)是整个或部分系统的可重用设计,框架是用来解决代码的组织及运行控制问题的. 在我们编写自动化脚本的时候,经常需要读取配置文件,读取数据文件,发送请求 ...

随机推荐

  1. Kafka学习之broker配置(0.8.1版)(转)

    broker.id  默认值:无 每一个broker都有一个唯一的id,这是一个非负整数,这个id就是broker的"名字",这样就允许broker迁移到别的机器而不会影响消费者. ...

  2. Configure、中间件与ErrorHandlingMiddleware全局异常捕获

    一.Configure Startup.cs中的Configure方法主要是http处理管道配置.中间件和一些系统配置,其中 IApplicationBuilder: 定义一个类,该类提供配置应用程序 ...

  3. Spring IOC容器启动流程源码解析(一)——容器概念详解及源码初探

    目录 1. 前言 1.1 IOC容器到底是什么 1.2 BeanFactory和ApplicationContext的联系以及区别 1.3 解读IOC容器启动流程的意义 1.4 如何有效的阅读源码 2 ...

  4. Ubuntu切换阿里源

    sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak #备份 sudo vim /etc/apt/sources.list #修改 sudo ...

  5. [leetcode]141. Linked List Cycle判断链表是否有环

    Given a linked list, determine if it has a cycle in it. Follow up:Can you solve it without using ext ...

  6. 自动创建orcl表

    using System;using System.Collections.Generic;using System.Data;using System.Linq;using System.Text; ...

  7. [原创]使用OPENCC库进行简繁转换(C++代码)

    最近公司有一款游戏产品,字库存在问题,希望全自动进行简繁同屏自动转换的行为,减少工作量. 所以自己使用了WINDOWS自带的一些转换函数,但发现大量字出现异常,无法转换(测试iconv也发现无法转换) ...

  8. Djanjo 的app 模板路径 静态文件 完整版登录 新手三件套 以及orm

    一: django中app的概念: 一个项目可以包含多个应用(app,类似于模块,主页打开多个模块就是多个app) 创建了app,要在配置文件中注册 二:模板路径配置: 1 templates文件夹 ...

  9. 续安装好composer和workerman之后;TP5运行workerman的操作

    TP5想要实现时时通讯:首先先安装好composer和workerman,我之前有写一篇安装的方法,在cmd里面安装:tp5手册上面有写cmd命令的代码:接下来是安装好后如何运行的: 首先在项目中建立 ...

  10. VS中的Debug 和 Release 编译方式的本质区别

    VS中的Debug 和 Release 编译方式的本质区别 Debug 通常称为调试版本,它包含调试信息,并且不作任何优化,便于程序员调试程序.Release 称为发布版本,它往往是进行了各种优化,使 ...