GithubHelp home page GithubHelp logo

ipereziriarte / robolectricsample Goto Github PK

View Code? Open in Web Editor NEW

This project forked from priyaaank/robolectricsample

0.0 2.0 0.0 15.35 MB

Sample project demonstrating use of the Robolectric Android testing project

robolectricsample's Introduction

This is a sample project configured and setup to use Robolectric.  This project shows how to configure
your build file, how to layout your project, sample tests, etc.

There are caveats:

    - This project uses Maven and can be imported into IntelliJ (open the pom.xml) or Eclipse (using M2Eclipse).

    - We recommend building with Maven, but this project can also be built using ant.


INSTALLATION

To install this sample app and run the tests:

    git clone git://github.com/pivotal/RobolectricSample.git
    cd RobolectricSample
    android update project -p .

For more information about how to get projects running in your IDE see:
http://pivotal.github.com/robolectric/quick-start.html


BUILDING WITH MAVEN

Once only*:
    ant maven-setup

To build and run tests:
    mvn clean test

To install the sample app on the emulator:
    mvn package android:deploy


BUILDING WITH ANT

To build and run tests:
    ant clean test

To install the sample app on the emulator:
    ant debug
    adb -e install [-r] <your-project-name>-debug.apk

The project contains a build.xml configured for the layout of the project.  The file extends the standard Android
build.xml modified to support the layout of the project files.  The build.xml file defines a test target.


CONTRIBUTING

We welcome contributions. Please fork and submit pull requests!

* This method leaves your pom.xml in an edited state. If you know the path to the Android SDK (it gets stored as
"sdk.dir" in your local.properties file) you can avoid this by running an alternative ant target and adding
an xml snippet to your ~/.m2/settings.xml file:

    ant maven-install-jars

and make your settings.xml file look something like this:
    <settings>
        <profiles>
            <profile>
                <id>android</id>
                <properties>
                    <android.sdk.path>
                        PATH / TO / THE / ANDROID / SDK
                    </android.sdk.path>
                </properties>
            </profile>
        </profiles>
        <activeProfiles>
            <!--make the profile active all the time -->
            <activeProfile>android</activeProfile>
        </activeProfiles>
    </settings>

robolectricsample's People

Contributors

fabianpage avatar mosabua avatar pivotalops avatar rharing avatar tylerschultz avatar xian avatar

Watchers

 avatar  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.