Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7065897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:00:47+00:00 2026-05-28T05:00:47+00:00

In the way it works on Eclipse for Android development, yuo can easily :

  • 0

In the way it works on Eclipse for Android development, yuo can easily :

  • create a library project, and then no apk will be generated but rather a jar that will be added as dependency to apps that will use the library
  • create an android project and rather easily create a test project for it, using Instrumentation test cases, etc..

This works pretty well. But how do you provide unit and functional tests for an android librairy ?

As soon as I turn my library-project into a library through eclipse then, it’s not testable any more as no apk is generated, no apk is installed on the device to be instrumented by the test app.

And more over, if my lib needs some permissions, an app using the lib can add the permissions to its manifest, but a testing app can’t do that ! The testing framework instruments the tested app using the permission declared by the app under test, not the testing app.

An obvious answer would be not to unit test the library itself, but to test a sample app using the library but we are far from unit tests…

Thanks in advance, folks !

A more detailled aspect of this problem can be found here.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T05:00:48+00:00Added an answer on May 28, 2026 at 5:00 am

    The solution you suggest at the end is the one that we’ve been using. We create a library and a simple program that just loads up the library. Early on we just ensure that everything builds and works as expected, but you can then add unit tests to the simple, non-library program.

    Sorry, in our experience, that is the best way.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any quick way to copy eclipse and android development environment from one
I'm just getting started with eclipse and android development. One thing which is driving
Eclipse is really bugging me with this. I have an Android project that is
I am new in android world. When I create a project while setting Target
I develop an Android App using eclipse, the Android Development Tools (ADT) plugin and
I'm making an app for Android in Eclipse. Currently the app works fine on
I am trying to send an Android Eclipse project to another developer to view
I am new to java, eclipse, and android development, so I may be missing
I'm trying to clone an Android project using Eclipse, the Android SDK, and the
When i connect my android phone to my computer, compile my project in eclipse

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.