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

  • Home
  • SEARCH
  • 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 9295825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T21:41:53+00:00 2026-06-18T21:41:53+00:00

In the Android LunarLander sample project, the unit tests are included right in the

  • 0

In the Android LunarLander sample project, the unit tests are included right in the project, in a (non-source) folder called ‘tests’. This is in line with the SDK testing guide which recommends this layout as opposed to creating tests in a separate project. However, I have no idea how I can actually run these tests.

I can’t create an Android Junit Test run configuration:

  • if I try to ‘run all test in project or package’ it complains that manifest file doesn’t contain instrumentation info – clearly it’s using the top-level manifest file instead of the tests manifest file.
  • if I try to ‘run a single test’, I can’t find any because tests isn’t a source folder, and if I set it as a source folder, errors pop up, since it assumes the test class should be in a package starting with ‘tests.src’.

It’s starting to seem to me that this sample is broken… I hope I am wrong, since I’d rather embed tests into my project and be able to run them easily (instead of creating a separate test project that links to project for application under test). Does anybody know how I can run these tests? Thanks…

  • 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-06-18T21:41:54+00:00Added an answer on June 18, 2026 at 9:41 pm

    Google recommend a single all-in-one directory because it makes your files easy maintainable in many situation, for instance when dealing with source control.

    It doesn’t matter where the test project is located int the file system, however, you must import it into your Eclipse’s workspace, same as what you did for the LunarLander project:

    enter image description here

    If everything goes well, your Package Explorer should look something like this:

    enter image description here

    In my Android 4.2 samples, things are not going well, it seems that the source code of LunarLander test project is not up-to-date:

    1. it doesn’t come with project.properties file.
    2. it uses same package name as LunarLander project, resulting Eclipse to be fooled when importing package/class from the referenced LunarLander project.
    3. it doesn’t automatically add the LunarLander project to test project’s classpath, resulting imported package/class from the referenced LunarLander project is invisible.

    Once you resolve all issues, you should able to run/debug Android JUnit Test from test project.

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

Sidebar

Related Questions

Android SDK since release of API v. 11 contains XmlAdapter sample which is also
I am studying the LunarLander example in the Android sample code: http://developer.android.com/resources/samples/LunarLander/index.html I am
I wrote a game used the android SDK sample lunar lander's template, but I
In LunarLander sample game provided as android sample game, I have a confusion about
I am trying out the (latest) Android SDK, and noticed some strange behavior. I've
android version:4.2 my sample code is: try { //HttpResponse response = httpClient.execute(httpGet, localContext); HttpResponse
android webview webview.setdefaultfontsize(int size); what is the size unit? webview.getSettings().setDefaultFontSize(20); Is it 20pt or
I am creating a android app using LunarLander as a example. Now I need
Android google maps sdk approximate zoom level to discrete values. I mean that i
I've created a simple android game, based on the Lunar Lander sample, and I'm

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.