手工的功能测试用例也可以用3A原则来编写。 Arrange: 准备被测功能相关的测试数据,比如往系统里录入一批工单以便测试工单的分页功能 Act : 调用被测的功能,实际上这就是我们一直讲的测试步骤 Assert: 断言 举个例子 # arrange and act 打开chrome浏览器并跳转至h ...
分类:
其他好文 时间:
2020-04-05 20:34:06
阅读次数:
61
1、断言 assert assert的意思是,表达式n != 0应该是True,否则,根据程序运行的逻辑,后面的代码肯定会出错。 如果断言失败,assert语句本身就会抛出AssertionError 启动Python解释器时可以用-O参数来关闭assert: $ python -O err.py ...
分类:
其他好文 时间:
2020-04-05 18:57:58
阅读次数:
94
#include "stdafx.h" #include <pthread.h> #include <stdio.h> #include <windows.h> #include <stdio.h> //#include <assert.h> int main(int argc, _TCHAR *a ...
分类:
其他好文 时间:
2020-04-05 18:19:25
阅读次数:
77
[toc]一、零宽断言-介绍零宽断言,它匹配的内容不会提取,其作用是在一个限定位置的字符串向前或向后进行匹配查找。1.1、应用场景排除查找,查找不含有某段字符串的行包含查找,查找含有某段字符串的行二、断言的分类2.1、正先行断言什么是正先行断言,就是在字符串相应位置之前进行查找匹配,使用(?=exp)匹配exp前面的位置。importrestr=‘abcgwcab‘pattern=‘bc(?=gw
分类:
其他好文 时间:
2020-04-04 20:46:09
阅读次数:
97
让错误抛出 发现其中的问题 # coding=utf-8 from rest_framework.views import exception_handler from rest_framework.exceptions import ErrorDetail from share.dj_custom ...
分类:
其他好文 时间:
2020-04-04 20:32:45
阅读次数:
65
概述 对象实例由对象头、实例数据组成,其中对象头包括markword和类型指针,如果是数组,还包括数组长度; | 类型 | 32位JVM | 64位JVM| | | | | | markword | 32bit | 64bit | | 类型指针 | 32bit |64bit ,开启指针压缩时为32b ...
分类:
编程语言 时间:
2020-04-04 09:53:54
阅读次数:
499
{ 工具类代码 public native static String getAssetStringUseJNI(Context context,String path); 1NDK代码#include <jni.h>#include <assert.h>#include <string.h>#in ...
分类:
移动开发 时间:
2020-04-04 00:14:25
阅读次数:
191
代码如下: 1 #include <stdio.h> 2 #include <pthread.h> 3 #include <sched.h> 4 #include <assert.h> 5 6 static int api_get_thread_policy(pthread_attr_t *attr ...
分类:
编程语言 时间:
2020-04-03 12:03:58
阅读次数:
69
单元测试框架unittest 单元测试 单元测试(unit testing)是指对软件中的最小可测试单元进行检查和验证。对于单元测试中单元的含义,一般来说,要根据实际情况去判定其具体含义,如C语言中单元指一个函数,Java里单元指一个类,图形化的软件中可以指一个窗口或一个菜单等。总的来说,单元就是人 ...
分类:
其他好文 时间:
2020-03-31 21:24:12
阅读次数:
79
完美立方 描述 费马大定理断言:当整数n>2时,关于a,b,c的方程an=bn+cn没有正整数解。该定理被提出后,历经三百多年,经历多人猜想辩证,最终在1995年被英国数学家安德鲁·怀尔斯证明。当然,可以找到大于1的4个整数满足完美立方等式:a3=b3+c3+d3(例如123=63+83+103)。 ...
分类:
其他好文 时间:
2020-03-27 16:47:14
阅读次数:
98