Giter VIP home page Giter VIP logo

culebratester2-public's Introduction

CulebraTester2-public

CulebraTester: Snaky Android Testing

Welcome to CulebraTester2.

Android testing can be complicated, time-consuming, and tedious. What if it didn’t have to be?

CulebraTester2 provides an API that facilitates the creation of test automation tools and UI's. Not sure what we mean?

Continue reading and see how you can run this early preview.

⚠️ Warning
This is an alpha version of CulebraTester2 expect changes

How to run CulebraTester2 ?

  1. Have your device or emulator connected to adb
  2. Install APKs
    1. Downalod prebuilt app and instrumentation APKs from Github Actions
    2. or build from source and install
      1. Copy local.properties.SAMPLE to local.properties and adapt the values to your environment
      2. ./culebratester2 install (or run ./gradlew installDebug installDebugAndroidTest)
  3. Start server bash <(curl -sL https://git.io/JT5nc) start-server
    1. alternative if you checked out the source you can run ./culebratester2 start-server instead
  4. Open http://localhost:9987/ with a browser or curl
  5. You should see CulebraTester2: Go to http://localhost:<port>/help for usage details.
  6. If the previous request worked, you can try something more ambitious as http://localhost:9987/v2/uiDevice/screenshot
  7. Take a look at CulebraTester2 API or its spec openapi.yaml for more info
  8. When done testing, http://localhost:9987/quit will terminate the server

AndroidViewClient

CulebraTester2 is a new backend for AndroidViewClient/culebra.

It can be used like other backends, in this case you have to specify the command option

-h, --use-uiautomator-helper     use UiAutomatorHelper Android app

for example

$ dump -ah emulator-5554 | jq
⚠️ CulebraTester2 server should have been started and port redirected.
{
  "id": "hierarchy",
  "text": "Window Hierarchy",
  "timestamp": "2020-10-12T02:18:45.639Z",
  "children": [
    {
      "id": 0,
      "parent": -1,
      "text": "",
      "package": "com.android.systemui",
      "checkable": false,
      "clickable": false,
      "index": 0,
      "content_description": "",
      "focusable": false,
    ...

or set useuiautomatorhelper=true when you create a ViewClient object.

culebra

CulebraTester2 is a new implementation in Kotlin of culebra.

A python client implementation can be found at CulebraTester2-client.

This previous version API specification can be found at here.

Example

The script simple-calculator-test shows a rudimentary usage of this API by

  • starting Calculator activity
  • finding one of the digit Buttons, can be specified or a random one is slected
  • clicking on that Button

UI

We mentioned CulebraTester2 provides an API that facilitates the creation of test automation tools and UI's.

Here we are, this is in the making.

CulebraTester2-ui preview

Communication

Found issues? Use https://github.com/dtmilano/CulebraTester2-public/issues

Have questions? Use https://stackoverflow.com/questions/tagged/androidviewclient.

culebratester2-public's People

Contributors

dtmilano avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.