一起买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测试的更多相关文章

  1. 一起买beta版本文档报告汇总

    一起买beta版本文档报告汇总 031402401鲍亮 031402402曹鑫杰 031402403常松 031402412林淋 031402418汪培侨 031402426许秋鑫 一.Beta版本冲 ...

  2. 一起买beta版PHP单元测试

    一起买beta版PHP单元测试 测试目的 保证代码质量,对各个单元进行测试,可以有效地保证代码的可靠性,让模块在与别的模块整合时出现更少的错误. 单元描述 完成帖子接口 ​ 将"正在进行&q ...

  3. 一起买beta版模块单元测试

    一起买beta版模块接口单元测试 测试目的 保证代码质量,对各个模块进行单元测试,不仅可以有效地保证代码的可靠性,让模块在与别的模块整合时出现更少的错误. 而且不用每次启动程序而等待浪费时间. 单元描 ...

  4. unity4.6 Beta版 UI控件之Button

    近期需求,须要用到4.6版本号uGui了,所以抽时间来学习学习,就UI控件在Unity工具里创建预设这块来说相比較于NGUI,我认为是没有什么太大的差别的. 比方:Canvas--Camera . T ...

  5. 一起买Beta版本系列文档

    一起买beta版本文档报告汇总 031402401鲍亮 031402402曹鑫杰 031402403常松 031402412林淋 031402418汪培侨 031402426许秋鑫 一.Beta版本冲 ...

  6. Beta版测试报告

    Beta版测试报告 测试中发现的Bug: Version 2.0 Bug List 1. 在动态监测界面,若随便点击“开始”.“关闭”.“结束”.红叉,会出现不定式崩溃现象. 2. 处理空数据时可能会 ...

  7. [App Store Connect帮助]六、测试 Beta 版本(1)TestFlight Beta 版测试概述(iOS、Apple TVOS、watchOS)

    TestFlight Beta 版测试让您可以分发您 App 的 Beta 版构建版本给测试员并收集反馈.您可以在您的 App Store Connect 帐户中一次为至多 100 个 App 启用 ...

  8. [App Store Connect帮助]六、测试 Beta 版本(4.3) 管理 Beta 版构建版本:为 Beta 版构建版本提供出口合规证明

    如果您没有完成出口合规证明,则该 Beta 版构建版本的状态为“缺少合规证明”.您可以在 TestFlight 部分中回答必需的出口合规证明问题. 必要职能:“帐户持有人”职能.“管理”职能或“App ...

  9. XE8 & IOS开发之免费证书真机调试:开发证书、AppID、开发授权profile的申请,附Debug真机调试演示(XCode7 Beta版或以上版本适用,有图有真相)

    网上能找到的关于Delphi XE系列的移动开发的相关文章甚少,本文尽量以详细的图文内容.傻瓜式的表达来告诉你想要的答案. 原创作品,请尊重作者劳动成果,转载请注明出处!!! 注意,苹果发布Xcode ...

随机推荐

  1. $(document).ready()方法和window.onload区别

    事件: javascript 和 HTML之间的交互式通过用户和浏览器操作页面时引发的事件来处理的.当文档或者它的某些元素发生某些变化和操作时,浏览器会自动生成一个事件:例如:当用户单击某个按钮时,也 ...

  2. 阿里云slb和ucloud负载均衡ulb添加ssl证书将http服务https化的配置详解

    阿里云和ucloud服务器配置ssl证书将http服务https化的配置详解 项目背景: 苹果App于2017年1月1日将启用App Transport Security安全功能,即强制App通过HT ...

  3. Tomcat安装后,远程IP无法访问的问题。

    我在使用阿里云与聚石塔的时候,发现Tomcat启动后,本地可以访问,但是外网无法访问,即使关闭防火墙也无法访问. 原因是 云平台的网络拦截. 阿里云:有一个入网规则 和 出网规则 ,流入数据端口  流 ...

  4. XidianOJ 1063 Chemistry Problem

    [提交][状态][讨论版] 题目描述 lw最近正在学习立体化学.立体化学中常用Fischer投影式表示分子的立体构型,例如,对于酒石酸HOOC(CHOH)2COOH,如果用一根横线表示羟基,略去氢原子 ...

  5. (转载)SPRINGMVC表单标签简介

    SpringMVC表单标签简介 在使用SpringMVC的时候我们可以使用Spring封装的一系列表单标签,这些标签都可以访问到ModelMap中的内容.下面将对这些标签一一介绍. 在正式介绍Spri ...

  6. PRML

    PRML 学习之 第一章 介绍 Introduction #欢迎共同学习和讨论,由于本文将不断修改,谢绝转载 模式识别问题具有重要且久远的历史.比如,16世纪开普勒发现行星运动定律,又如20世纪出发现 ...

  7. 使用Nginx镜像代理.NET Core MVC

    1.获取microsoft/dotnet镜像 docker pull registry.cn-hangzhou.aliyuncs.com/cjx/tutorial 如果有问题确认已经使用阿里云镜像加速 ...

  8. python之路-Day7

    编程范式 编程是 程序 员 用特定的语法+数据结构+算法组成的代码来告诉计算机如何执行任务的过程 , 一个程序是程序员为了得到一个任务结果而编写的一组指令的集合,正所谓条条大路通罗马,实现一个任务的方 ...

  9. 3.springMVC+spring+Mybatis整合Demo(单表的增删该查,这里主要是贴代码,不多解释了)

    前面给大家讲了整合的思路和整合的过程,在这里就不在提了,直接把springMVC+spring+Mybatis整合的实例代码(单表的增删改查)贴给大家: 首先是目录结构: 仔细看看这个目录结构:我不详 ...

  10. C#多线程的异步委托/调用

    C#异步调用(Asynchronou Delegate) C#异步调用获取结果方法:主要有三种,也可以说是四种(官方说四种,电子书说三种),官方在MSDN上已经有详细的说明:链接 需要了解到获取异步执 ...