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 8318211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:52:56+00:00 2026-06-08T21:52:56+00:00

I’ve been following book about Android testing and implemented this sample: public class TemperatureConverterActivityTests

  • 0

I’ve been following book about Android testing and implemented this sample:

public class TemperatureConverterActivityTests extends
        ActivityInstrumentationTestCase2<TemperatureConverterActivity> {

    private TemperatureConverterActivity mActivity;

    private EditText mCelsius;
    private EditText mFarenheit;

    public TemperatureConverterActivityTests() {
        this("TemperatureConverterActivityTests");
    }

    public TemperatureConverterActivityTests(String name) {
        super(TemperatureConverterActivity.class);
        setName(name);
    }

    protected void setUp() throws Exception {
        super.setUp();
        mActivity = getActivity();

        mCelsius = (EditText) mActivity
                .findViewById(org.mighter.tc.R.id.celsius);
        mFarenheit = (EditText) mActivity
                .findViewById(org.mighter.tc.R.id.farenheit);
    }

    protected void tearDown() throws Exception {
    }

    public final void testPreconditions() {
        assertNotNull(mActivity);
    }

    public final void testHasInputFields() {
        assertNotNull(mCelsius);
        assertNotNull(mFarenheit);
    }

}

However, test doesn’t finish.

What I get in the Console:

Android Launch!
adb is running normally.
Performing android.test.InstrumentationTestRunner JUnit launch
Automatic Target Mode: Several compatible targets. Please select a target device.
Uploading TemperatureConverterTest.apk onto device '80A358103041548074'
Installing TemperatureConverterTest.apk...
Success!
Project dependency found, installing: TemperatureConverter
Application already deployed. No need to reinstall.
Launching instrumentation android.test.InstrumentationTestRunner on device 80A358103041548074
Collecting test information
Test run failed: Instrumentation run failed due to 'Process crashed.'
Test run finished
Sending test information to Eclipse
Running tests...

And then it hangs, here’s JUnit view:

enter image description here

The only info from LogCat:

05-28 17:23:54.952: W/ActivityManager(224): Crash of app org.mighter.tc running instrumentation ComponentInfo{org.mighter.tc.test/android.test.InstrumentationTestRunner}
05-28 17:23:55.042: I/TestRunner(7174): <!>android.test.TestPrinter 50<!> started: testHasInputFields(org.mighter.tc.test.TemperatureConverterActivityTests)
05-28 17:23:55.062: I/TestRunner(7174): <!>android.test.TestPrinter 56<!> finished: testHasInputFields(org.mighter.tc.test.TemperatureConverterActivityTests)
05-28 17:23:55.062: I/TestRunner(7174): <!>android.test.TestPrinter 77<!> passed: testHasInputFields(org.mighter.tc.test.TemperatureConverterActivityTests)
05-28 17:23:55.072: I/TestRunner(7174): <!>android.test.TestPrinter 50<!> started: testPreconditions(org.mighter.tc.test.TemperatureConverterActivityTests)
05-28 17:23:55.082: I/TestRunner(7174): <!>android.test.TestPrinter 56<!> finished: testPreconditions(org.mighter.tc.test.TemperatureConverterActivityTests)
05-28 17:23:55.082: I/TestRunner(7174): <!>android.test.TestPrinter 77<!> passed: testPreconditions(org.mighter.tc.test.TemperatureConverterActivityTests)
05-28 17:23:55.652: I/TestRunner(7194): <!>android.test.TestPrinter 50<!> started: testHasInputFields(org.mighter.tc.test.TemperatureConverterActivityTests)
05-28 17:23:55.853: I/TestRunner(7194): <!>android.test.TestPrinter 56<!> finished: testHasInputFields(org.mighter.tc.test.TemperatureConverterActivityTests)
05-28 17:23:55.853: I/TestRunner(7194): <!>android.test.TestPrinter 77<!> passed: testHasInputFields(org.mighter.tc.test.TemperatureConverterActivityTests)
05-28 17:23:55.853: I/TestRunner(7194): <!>android.test.TestPrinter 50<!> started: testPreconditions(org.mighter.tc.test.TemperatureConverterActivityTests)

Tried debugging, but it never reaches testPreconditions().
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-08T21:52:57+00:00Added an answer on June 8, 2026 at 9:52 pm

    Just needed to call super in tearDown();

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I am doing a simple coin flipping experiment for class that involves flipping a
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

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.