一起买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. python 常用高效代码写法集锦

    一.打开文件 #使用 with 语句操作文件对象 with open(r'somefileName') as somefile: for line in somefile: print line # ...

  2. 返回多个类型的对象,Tuple

    一个方法 通常只有一个 返回对象,有时候 我们遇到 要放回两个不同类型的值的时候, 这个时候可以使用Tuple. 对象. Tupele 只支持 .net framework 4.0 以上版本. 来!先 ...

  3. scala-尾递归

    ------------------------- by chenkh ----------------------------- 随笔记录什么是尾递归,为什么需要尾递归,尾递归show by exa ...

  4. python基础知识8——模块1——自定义模块和第三方开源模块

    模块的认识 模块,用一砣代码实现了某个功能的代码集合. 类似于函数式编程和面向过程编程,函数式编程则完成一个功能,其他代码用来调用即可,提供了代码的重用性和代码间的耦合.而对于一个复杂的功能来,可能需 ...

  5. FreeMaker实现变量求和

        今天在项目上遇到统计分页页面的某个字段的总和,前台页面是使用FreeMaker实现的,记录一下: <#assign tprice = 0 > <#list orderlist ...

  6. 使用UltraISO制作U盘启动盘——转载

    现在流行用U盘来安装系统,但要用U盘来安装系统的前提条件下是如何将镜像文件写入到U盘里,UltraISO能很好的满足你的需求. 步骤/方法  鼠标右键“以管理员身份运行”UltraISO图标    打 ...

  7. VFP MSSOAPTOOKIT 使用SOAP Headers

    .NET 有如下使用了自定义扩展HEADER来做验证  server.asmx代码 using System;using System.Collections.Generic;using System ...

  8. 转载:Solr的自动完成实现方式(第二部分:Suggester方式)

    转自:http://www.cnblogs.com/ibook360/archive/2011/11/30/2269077.html 在Solr的自动完成/自动补充实现介绍(第一部分) 中我介绍了怎么 ...

  9. 【POJ2778】DNA Sequence(AC自动机,DP)

    题意: 生物课上我们学到,DNA序列中只有A, C, T和G四种片段. 经科学发现,DNA序列中,包含某些片段会产生不好的基因,如片段"ATC"是不好片段,则"AGATC ...

  10. SonarQube-5.6.3 代码分析平台搭建使用

    python代码分析 官网主页: http://docs.sonarqube.org/display/PLUG/Python+Plugin Windows下安装使用: 快速使用: 1.下载jdk ht ...