2013年11月15日

摘要: @BeforeClass:针对所有测试,只执行一次,且必须为static void@Before:初始化方法@Test:测试方法,在这里可以测试期望异常和超时时间@After:释放资源@AfterClass:针对所有测试,只执行一次,且必须为static voidjunit4.x版本我们常用的注解:A、@Before 注解:与junit3.x中的setUp()方法功能一样,在每个测试方法之前执行;B、@After 注解:与junit3.x中的tearDown()方法功能一样,在每个测试方法之后执行;C、@BeforeClass 注解:在所有方法执行之前执行;D、@AfterClass 注解:在 阅读全文
posted @ 2013-11-15 16:03 zhitang2009 阅读(1124) 评论(0) 推荐(0) 编辑
摘要: 先来看看android中页面元素的继承关系Viewandroid.view.View这个类表示用户界面组件的基本构建块。一个View占据屏幕上的一个矩形区域,并负责绘图和事件处理。View是widgets的基类,widgets用于创建交互式UI组件(按钮,文本框等)。 ViewGroup子类是layouts的基类,layouts是不可见的容器包含其他Views(或其他的ViewGroup),并定义它们的布局属性。WebViewjava.lang.Object↳android.view.View↳android.view.ViewGroup↳android.widget.AbsoluteLayo 阅读全文
posted @ 2013-11-15 12:25 zhitang2009 阅读(1631) 评论(0) 推荐(0) 编辑
摘要: php做接口自动化的核心代码80, //客户端 USERAGENT,为空则使用用户的浏览器 'userAgent'=>'', //超时时间 'timeOut'=>30, //是否使用 COOKIE //'useCookie'=>true, ##2012-3-15注释,目前平台框架不需要使用cookie,启用此选项会导致运行脚本时在/tmp下产生大量的无用临时文件。By LY //是否支持SSL 'ssl'=>false, //\是否支持 gzip压缩 'gzip'=>t 阅读全文
posted @ 2013-11-15 11:56 zhitang2009 阅读(377) 评论(0) 推荐(0) 编辑
摘要: robotium测试妈妈圈的简单用例代码package cn.mama.activity.test;import java.util.Iterator;import org.junit.Test;import com.jayway.android.robotium.solo.By;import com.jayway.android.robotium.solo.Solo;import com.jayway.android.robotium.solo.WebElement;import android.app.Activity;import android.test.ActivityInstrum 阅读全文
posted @ 2013-11-15 11:52 zhitang2009 阅读(653) 评论(0) 推荐(0) 编辑
摘要: 自动更新svn代码到运行环境的shell脚本更新妈妈圈后台#!/bin/sh#命令格式 sh autoUpdateFile.sh 清单文件.txt svn版本号#执行示例 sh autoUpdateFile.sh 17655.txt 17655#源文件地址SOURCE_FILE_LOCATION="/./../scripts/mamaquan/svncode/"#目标文件地址TARGET_FILE_LOCATION="/.././wwwroot/mamaquanadmin/"#TARGET_FILE_LOCATION="target/" 阅读全文
posted @ 2013-11-15 11:29 zhitang2009 阅读(1468) 评论(0) 推荐(0) 编辑
摘要: 需要添加系统定时任务 'smtp.xamama.com.cn', 'port' => '25', 'username' => 'mama@xamama.com.cn', 'password' => '1G4ftjmq8oR5mRa', 'auth' => true);//必须保证这一行# $recipients = '***@mama.cn'; //接收人,可以是一个数组来存放多个地址 $recipients =array(&q 阅读全文
posted @ 2013-11-15 11:21 zhitang2009 阅读(625) 评论(0) 推荐(0) 编辑
摘要: robotium中的组件Class ByClass By继承了java.lang.Object 类,用于获取页面元素对象 可以通过元素的类名、css选择器、id、元素名、标签名、文本内容、绝对路径 获取例如By.id("note"),同过布局文件中的android:id="@+id/note"获取元素,这个id值会在R.java中注册要注意的是:By.id("note")返回的是一个对象,其它方法也是返回WebElement对象,要通过父类的toString()返回对象的字符串表示形式。Class By也提供了方法getValue() 阅读全文
posted @ 2013-11-15 10:14 zhitang2009 阅读(300) 评论(0) 推荐(0) 编辑

导航