Git Product home page Git Product logo

Comments (7)

phil-lopreiato avatar phil-lopreiato commented on May 29, 2024

This is very cool though! Adding this into the CI scripts should be pretty easy.

The "ideal" way is if there's java code you can write to do this - then you can just make some JUnit test cases, and it'll all automatically be run.

If it needs to be a python script, you can make these changes to .travis.yml

before_install:
  - sudo apt-get update -qq
  - sudo apt-get install -y python python-pip

before-script:
  - pip install -r requirements.txt (with the python packages you depend on in that file, one per line)

and then add the following to the script block (and format it like the above ones for multiple lines)

- python your_test_script.py

Have you also looked into Android'd activity testing framework? Or does that not include stress tests? Although it would probably be a good idea to write UI tests eventually....

from the-blue-alliance-android.

brycematsuda avatar brycematsuda commented on May 29, 2024

I haven't yet, but looking at it from a glance, I think that might be a better option for simple accessibility cases since it uses JUnit. I'll check it out later.

The python framework can call shell commands without rooting the device so stress tests could be used for that. It needs a device/emulator to connect to, however, so I'm not sure if travis-ci supports that.

from the-blue-alliance-android.

phil-lopreiato avatar phil-lopreiato commented on May 29, 2024

I'm not quite sure what you mean. The travis boxes are just servers running Ubuntu. When the automated tests go off, it just loads the proper snapshot for what we need (Android stuff, in this case) and runs the test cases. If you can run the python scrips from the shell on your computer, travis can run them.

from the-blue-alliance-android.

brycematsuda avatar brycematsuda commented on May 29, 2024

Never mind, it didn't cross my mind beforehand to actually look at the travis.yml file first. What summer does to your train of thought. /facepalmdesk

That being said, I think this could actually work okay for basic UI tests. Stress testing might be too much for the emulator to handle, though. I just tried running monkeyrunner on an emulator and even turning the interval of events down to 1 per second was too much.

from the-blue-alliance-android.

phil-lopreiato avatar phil-lopreiato commented on May 29, 2024

Hahaha happy summer!

That's a bummer that the emulator can't handle stress tests - it would be a nice thing to automate. I guess we'll have to work with doing it manually.

I agree that we should get some basic UI tests going - making sure things load where expected, fire the correct intents when clicked, etc. I would rather keep as much of it in java/junit as we can (and it seems that Android's activity testing is featured enough), so that all the tests can stay in one suite and run with one click.

from the-blue-alliance-android.

phil-lopreiato avatar phil-lopreiato commented on May 29, 2024

I've merged in functionality for using Robolectric unit testing (see the readme for installing a plugin to your Android Studio), so our testing situation is much, much better.

Now we can focus on writing some UI tests!

from the-blue-alliance-android.

brycematsuda avatar brycematsuda commented on May 29, 2024

Awesome! Been too busy with school to try and figure it out or contribute anything useful, but I'm glad to see someone finally made a working tutorial of how to integrate Robolectric without gradle errors. Nice job!

from the-blue-alliance-android.

Related Issues (20)

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.