A powerful test framework for Android

Related tags

Testing Cafe
Overview
Comments
  • com_baidu_cafe_remote项目下有错误

    com_baidu_cafe_remote项目下有错误

    此项目下SystemLib类下 import android.app.ActivityManagerNative; import android.app.StatusBarManager; import android.app.IActivityManager; import android.content.pm.IPackageDataObserver; ........ 等等 不知应该引入哪个jar包

    opened by rainy1216 3
  • View server is not open

    View server is not open

    已安装 Cafe.apk,并Run cafe_setup.sh 然后执行test_sample,判断remote.isViewServerOpen()时提示“View server is not open”. socket不通。 但是还是可以使用点击home,menu等简单操作。但是不能成功mount和unmount,也不能成功local.enterText(0, "Cafe");等

    这个一般是为什么呢?

    opened by hujj1987 1
  • java.lang.ClassNotFoundException: com.baidu.cafe.CafeTestRunner

    java.lang.ClassNotFoundException: com.baidu.cafe.CafeTestRunner

    运行时报错: // java.lang.RuntimeException: Unable to instantiate instrumentation ComponentInfo{com.example.android.apis.test/com.baidu.cafe.CafeTestRunner}: java.lang.ClassNotFoundException: com.baidu.cafe.CafeTestRunner

    如何解?

    opened by jiangweizhang 1
  • 交流 - Cafe/Travel的一些修改

    交流 - Cafe/Travel的一些修改

    ju00 [email protected] 14:42 (26分钟前)

    发送至 我 您好: 不知道您是否还在关注Cafe,打扰了。 最近我在使用Travel做测试,修改了一些东西,想跟您讨论一下,看看是否存在问题。

      1.关于level。
                看代码我理解这个量是用于记录Activity深度。麻烦的地方在于实际APP中,Activity的恢复不光是用goback,还有界面上的“<”等,所以保持这个量的正确很难。由于没有什么好的解决办法,我舍弃了这个量,改用判断连续出现退出信息来退出Travel测试了,这个方法看起来不太美,不知道是否有好一点的方法?
       2.关于“容器”型view
                Travel是用界面坐标均分的方法,如果其中包含的view大小不一,可能会重复点击同一view。这里修改成抛弃外层容器,只取内部view进行操作,为了避免冗余,同一个最内层容器只操作一个view作为代表。这里我有点不太理解为什么Travel对容器的处理是均分坐标点击,是有什么特殊需求吗?
    
       以上两点就是最近对Travel的一些想法和修改,修改后的Travel确实更适用于我的测试了。但因为被测产品的不同,我的想法很可能是局限和不正确的,所以想和您交流一下。
       祝Travel越来越好。
    

    此致 
    

    敬礼 马兆文

    opened by luxiaoyu 1
  • 当对apk进行travel时Armser类抛出空指针错误

    当对apk进行travel时Armser类抛出空指针错误

    操作机型:三星I9300 cafe版本:3.1 相关log java.lang.NullPointerException at com.baidu.cafe.remote.Armser.getTopActivity(Armser.java:1239) at com.baidu.cafe.local.traveler.APPTraveler.travel(APPTraveler.java:116) at com.baidu.cafe.local.LocalLib.travel(LocalLib.java:2335) at com.baidu.cafe.local.LocalLib.travel(LocalLib.java:2343) at com.baidu.cafe.test.CafeTraveler.test_travel(CafeTraveler.java:39) at java.lang.reflect.Method.invokeNative(Native Method) at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214) at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199) at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:192) at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191) at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176) at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:554) at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1738)

    opened by wlcw16 0
  • 当Android的$OUT_DIR_COMMON_BASE环境变量生效时,make.sh失败

    当Android的$OUT_DIR_COMMON_BASE环境变量生效时,make.sh失败

    下面是我做的修改,可以参照。

    --- make.sh.orig        2014-07-31 11:15:16.844323178 +0800
    +++ make.sh     2014-07-31 11:17:17.241337182 +0800
    @@ -11,6 +11,8 @@
     CPU_NUMBER=`cat /proc/cpuinfo | grep processor | wc -l`
     MODE_PROGUARD="false"
    
    +#set -o errexit
    +
     usage()
     {
            echo "usage: $0"
    @@ -53,7 +55,13 @@
     make_cafe()
     {
            # make cafe.jar
    -    cafe_intermediates="$ANDROID_TOP/out/target/common/obj/JAVA_LIBRARIES/cafe_intermediates"
    +    if [ -z $OUT_DIR_COMMON_BASE ];then
    +        OUT_DIR=$ANDROID_TOP/out
    +    else
    +        OUT_DIR=$OUT_DIR_COMMON_BASE/`echo $ANDROID_TOP | awk -F"/" '{print $(NF-3)}'`
    +    fi
    +
    +    cafe_intermediates="$OUT_DIR/target/common/obj/JAVA_LIBRARIES/cafe_intermediates"
            cd $SRC/testrunner
            mm clean-cafe
            rm -rf $cafe_intermediates
    @@ -111,7 +119,11 @@
     do
            apk=`echo "$LINE"`
            apkPath=${apk#"Install: "};
    -       cp ${ANDROID_TOP}/${apkPath} $SRC/out
    +       if [ ${apkPath:0:1} == "/" ];then
    +           cp ${apkPath} $SRC/out
    +       else
    +           cp ${ANDROID_TOP}/${apkPath} $SRC/out
    +       fi
     done
            cp $SRC/testutils/cafe_setup.bat $SRC/out
            cp $SRC/testutils/cafe_setup.sh $SRC/out
    
    opened by zeerd 0
Releases(3.2)
Owner
Baidu
Baidu Open Source Projects
Baidu
Powerful, elegant and flexible test framework for Kotlin with additional assertions, property testing and data driven testing

Kotest is a flexible and comprehensive testing tool for Kotlin with multiplatform support. To learn more about Kotest, visit kotest.io or see our quic

Kotest 3.8k Jan 3, 2023
Lbc-test-app - Test Android Senior Leboncoin

Test Android Senior Leboncoin ?? Mathieu EDET Overview Min API version : 24 This

null 0 Feb 7, 2022
Kotlin wrapper for React Test Renderer, which can be used to unit test React components in a Kotlin/JS project.

Kotlin API for React Test Renderer Kotlin wrapper for React Test Renderer, which can be used to unit test React components in a Kotlin/JS project. How

Xavier Cho 7 Jun 8, 2022
Toster - Small test dsl based on adb commands that allows you to test the mobile application close to user actions

toster Small test dsl based on adb commands that allows you to test the mobile a

Alexander Kulikovskiy 31 Sep 1, 2022
PowerMock is a Java framework that allows you to unit test code normally regarded as untestable.

Writing unit tests can be hard and sometimes good design has to be sacrificed for the sole purpose of testability. Often testability corresponds to go

PowerMock 3.9k Jan 5, 2023
PowerMock is a Java framework that allows you to unit test code normally regarded as untestable.

Writing unit tests can be hard and sometimes good design has to be sacrificed for the sole purpose of testability. Often testability corresponds to go

PowerMock 3.9k Jan 2, 2023
null 866 Dec 27, 2022
Linkester is an Android library that aims to help Android developers test their deep links implementation.

Linkester Linkester is an Android library that aims to help Android developers test their deep links implementation. The idea is to have a new launche

Ahmad Melegy 79 Dec 9, 2022
A custom instrumentation test runner for Android that generates XML reports for integration with other tools.

Android JUnit Report Test Runner Introduction The Android JUnit report test runner is a custom instrumentation test runner for Android that creates XM

Jason Sankey 148 Nov 25, 2022
Easily scale your Android Instrumentation Tests across Firebase Test Lab with Flank.

Easily scale your Android Instrumentation Tests across Firebase Test Lab with Flank.

Nelson Osacky 220 Nov 29, 2022
The coding challenge elbotola android test

Introduction The coding challenge(s) below will be used to assess your familiarity with the Android development environment, relevant Android related

Mohamed Elouamghari 1 Nov 2, 2021
Android background tint test project

Android Background Tint References https://developer.android.com/reference/android/view/View#attr_android:background https://developer.android.com/ref

Ashwin Dinesh 0 Nov 4, 2021
TestObserver to easily test LiveData and make assertions on them.

JCenter Update LiveData Testing is currently published on JCenter - it will serve packages until February 1st, 2022. LiveData Testing packages will be

Josef Raska 395 Dec 8, 2022
Strikt is an assertion library for Kotlin intended for use with a test runner such as JUnit, Minutest, Spek, or KotlinTest.

Strikt is an assertion library for Kotlin intended for use with a test runner such as JUnit, Minutest, Spek, or KotlinTest.

Rob Fletcher 447 Dec 26, 2022
Barista makes developing UI test faster, easier and more predictable. Built on top of Espresso

Barista makes developing UI test faster, easier and more predictable. Built on top of Espresso, it provides a simple and discoverable API, removing most of the boilerplate and verbosity of common Espresso tasks. You and your Android team will write tests with no effort.

Adevinta Spain 1.6k Jan 5, 2023
Test for openbank application

openbank-test Test for openbank application Here you can find a simple test for the OpenBank application. It fetches some characters from the Marvel A

anon37894203 0 Nov 3, 2021
Proyecto de Kotlin y JPA sobre Hibernate, con algunos test usando JUnit 5 y Mockito.

Contactos Kotlin JPA Ejemplos de una aplicación de manejo de contactos con Kotlin y JPA. Usando para testear la aplicación JUnit 5 y Mockito. Almacena

José Luis González Sánchez 3 Sep 13, 2022
Slow-kotest - Demonstration that kotest is very slow during test instantiation

This project demostrates the slow start time for simple kotest unit tests. the c

null 1 Apr 6, 2022
Test Automation of Energy Australia - Web application

Test Automation of Energy Australia - Web application Technology used - Kotlin, Java, Espresso, Android Run the test on local environment git clone ht

null 0 Feb 9, 2022