一起买beta版UI测试
一起买beta版UI测试
测试目的
保证代码质量,对各个单元进行测试,可以有效地保证代码的可靠性,让模块在与别的模块整合时出现更少的错误。
UI测试
- 登录模块测试
登录模拟过程。
- 发帖模块测试
发帖模拟过程
测试过程
- 登录模块测试
package com.example.s.buytogether;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.LargeTest;
import com.example.s.buytogether.login.Login;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.action.ViewActions.typeText;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
@RunWith(AndroidJUnit4.class)
@LargeTest
public class LoginTest {
private static final String STRING_TO_BE_TYPED = "b";
@Rule
public ActivityTestRule<Login> mActivityRule = new ActivityTestRule<>(
Login.class);
@Test
public void login() {
onView(withId(R.id.edtTxt_userName)).perform(typeText("b"));
onView(withId(R.id.edtTxt_userPassword)).perform(typeText("b"));
onView(withId(R.id.btn_login)).perform(click());
}
}
测试结果:
- 发帖模块测试
package com.example.s.buytogether;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.LargeTest;
import com.example.s.buytogether.newPosts.NewPosts;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.action.ViewActions.closeSoftKeyboard;
import static android.support.test.espresso.action.ViewActions.scrollTo;
import static android.support.test.espresso.action.ViewActions.typeText;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
@RunWith(AndroidJUnit4.class)
@LargeTest
public class NewPostsTest {
@Rule
public ActivityTestRule<NewPosts> mActivityRule = new ActivityTestRule<>(
NewPosts.class);
@Test
public void login() {
onView(withId(R.id.edtTxt_description)).perform(scrollTo(), typeText("yaobuyaolaiwana~~~"), closeSoftKeyboard());
onView(withId(R.id.edtTxt_location)).perform(scrollTo(), typeText("30#417"), closeSoftKeyboard());
onView(withId(R.id.edtTxt_phone)).perform(scrollTo(), typeText("110"), closeSoftKeyboard());
onView(withId(R.id.edtTxt_indateTimeDay)).perform(scrollTo(), typeText("30"), closeSoftKeyboard());
onView(withId(R.id.edtTxt_indateTimeHour)).perform(scrollTo(), typeText("2"), closeSoftKeyboard());
// onView(withId(R.id.edtTxt_moreDescription)).perform(scrollTo(), typeText("hahahahhaha"), closeSoftKeyboard());
onView(withId(R.id.edtTxt_price)).perform(scrollTo(), typeText("30"), closeSoftKeyboard());
onView(withId(R.id.edtTxt_unit)).perform(scrollTo(), typeText("po"), closeSoftKeyboard());
onView(withId(R.id.edtTxt_menCount)).perform(scrollTo(), typeText("2"), closeSoftKeyboard());
// onView(withId(R.id.img_addPosts)).perform(click());
}
}
测试结果:
结果统计
共计两个测试,两个均无问题
质量评估
所测试模块,均可正常通过
测试总结
由于时间原因,只做了两个部分的UI测试,其他部分依然还是存在一系列的bug正在解决中。但是也感觉espresso这个UI自动化测试的厉害之处,避免了人工手动的复杂输入,操作起来很炫酷。
一起买beta版UI测试的更多相关文章
- 一起买beta版本文档报告汇总
一起买beta版本文档报告汇总 031402401鲍亮 031402402曹鑫杰 031402403常松 031402412林淋 031402418汪培侨 031402426许秋鑫 一.Beta版本冲 ...
- 一起买beta版PHP单元测试
一起买beta版PHP单元测试 测试目的 保证代码质量,对各个单元进行测试,可以有效地保证代码的可靠性,让模块在与别的模块整合时出现更少的错误. 单元描述 完成帖子接口 将"正在进行&q ...
- 一起买beta版模块单元测试
一起买beta版模块接口单元测试 测试目的 保证代码质量,对各个模块进行单元测试,不仅可以有效地保证代码的可靠性,让模块在与别的模块整合时出现更少的错误. 而且不用每次启动程序而等待浪费时间. 单元描 ...
- unity4.6 Beta版 UI控件之Button
近期需求,须要用到4.6版本号uGui了,所以抽时间来学习学习,就UI控件在Unity工具里创建预设这块来说相比較于NGUI,我认为是没有什么太大的差别的. 比方:Canvas--Camera . T ...
- 一起买Beta版本系列文档
一起买beta版本文档报告汇总 031402401鲍亮 031402402曹鑫杰 031402403常松 031402412林淋 031402418汪培侨 031402426许秋鑫 一.Beta版本冲 ...
- Beta版测试报告
Beta版测试报告 测试中发现的Bug: Version 2.0 Bug List 1. 在动态监测界面,若随便点击“开始”.“关闭”.“结束”.红叉,会出现不定式崩溃现象. 2. 处理空数据时可能会 ...
- [App Store Connect帮助]六、测试 Beta 版本(1)TestFlight Beta 版测试概述(iOS、Apple TVOS、watchOS)
TestFlight Beta 版测试让您可以分发您 App 的 Beta 版构建版本给测试员并收集反馈.您可以在您的 App Store Connect 帐户中一次为至多 100 个 App 启用 ...
- [App Store Connect帮助]六、测试 Beta 版本(4.3) 管理 Beta 版构建版本:为 Beta 版构建版本提供出口合规证明
如果您没有完成出口合规证明,则该 Beta 版构建版本的状态为“缺少合规证明”.您可以在 TestFlight 部分中回答必需的出口合规证明问题. 必要职能:“帐户持有人”职能.“管理”职能或“App ...
- XE8 & IOS开发之免费证书真机调试:开发证书、AppID、开发授权profile的申请,附Debug真机调试演示(XCode7 Beta版或以上版本适用,有图有真相)
网上能找到的关于Delphi XE系列的移动开发的相关文章甚少,本文尽量以详细的图文内容.傻瓜式的表达来告诉你想要的答案. 原创作品,请尊重作者劳动成果,转载请注明出处!!! 注意,苹果发布Xcode ...
随机推荐
- rabbitMQ学习(三)
订阅/广播模式 发送端: import java.io.IOException; import com.rabbitmq.client.ConnectionFactory; import com.ra ...
- Vim配置(k-vim)
无意发现一个vim的插件 转载:http://www.cnblogs.com/yxy2829/p/5250587.html 截图 solarized主题 molokai主题 安装步骤 1. clone ...
- hive中拉链表
在有些情况下,为了保持历史的一些状态,需要用拉链表来做,这样做目的在可以保留所有状态的情况下可以节省空间. 拉链表适用于以下几种情况吧 数据量有点大,表中某些字段有变化,但是呢变化的频率也不是很高,业 ...
- TFS Build Definition And Auto Deploy
一台build machine上一般只有一个build service[对应一个build controller]来serve一个team project collection,但又workaroun ...
- java MAVEN 项目出现红叉
pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w ...
- python学习心得第一章
初始python 1什么是程序 计算机程序是一组执行某种动作的的指令.和那些电路.芯片.显卡.硬盘等不同,它不是计算机本身可以触摸的部分,而是隐藏在背后运行在硬件上面的东西.程序就是一系列告诉没有知觉 ...
- iOS Safari 上加载的最大的图片尺寸
做WAP端项目时发现, 写css代码显示图片, 却显示不出.或用canvas 来加载图片的某一部分的时候显示不出, 代码如下: background: url() no-repeat -1000px ...
- 第8章 BOM
8.1 window对象 window有双重的角色,既可以通过JavaScript访问浏览器窗口的接口,又是ECMAScript规定的Global对象. 全局作用域中声明的变量.函数都会变成windo ...
- iOS开发中多线程间关于锁的使用
为什么需要使用锁,当然熟悉多线程的你,自然不会感到陌生. 那你在代码中是否很好的使用了锁的机制呢?你又知道几种实现锁的方法呢? main.m 1 int main(int argc, const ch ...
- WCF服务二:创建一个简单的WCF服务程序
在本例中,我们将实现一个简单的计算服务,提供基本的加.减.乘.除运算,通过客户端和服务端运行在同一台机器上的不同进程实现. 一.新建WCF服务 1.新建一个空白解决方案,解决方案名称为"WC ...