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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:46:34+00:00 2026-05-26T04:46:34+00:00

I am new to Robotium and tried to execute following code to launch an

  • 0

I am new to Robotium and tried to execute following code to launch an app and perform some functions.

An example would be, launch messaging app on android emulator and send a text message “Hi” to a user “test”.

     package com.example.android.test;


     import com.example.android.NewUserActivity;
     import com.jayway.android.robotium.solo.Solo;
     import android.test.ActivityInstrumentationTestCase2;

public class NewUserActivityTest extends ActivityInstrumentationTestCase2<NewUserActivity> {

private Solo solo;

public NewUserActivityTest() {

super("com.example.android", NewUserActivity.class);
}

public void setUp() throws Exception {
    super.setUp();
    solo = new Solo(getInstrumentation(), getActivity()); 
    }
    @Override
    public void tearDown() throws Exception {
    try {
    solo.finalize();
    } catch (Throwable e) {
    e.printStackTrace();
    }
    getActivity().finish();
    super.tearDown();
    }

 public void sms() throws Exception{
        assertTrue(solo.searchText("Messaging"));
        solo.clickOnText("Messaging");
        assertTrue(solo.searchText("New message"));
        solo.clickOnButton("New message");
        solo.enterText(0, "Test");
         solo.enterText(1, "Hi");

    }
    }

With this code, Eclipse runs the test cases but I don’t see it on emulator. I understand the package here is a dummy one, I want to know If I am doing it wrong?

  • 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-26T04:46:35+00:00Added an answer on May 26, 2026 at 4:46 am

    Test methods that you want to be executed must have the prefix “test”, e.g. “testSms”.

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

Sidebar

Related Questions

When creating a new Android AVD through command line through the following command: android
So I created a new Android junit test, which runs my ui-automation tests (Robotium,
New day, new problem :-) Code: Client Side: void abw_Closed(object sender, EventArgs e) {
I'm trying to take a screenshot of my Android application using Robotium, I'm using
How long does robotium wait for a new activity to show up? Is it
New to Android so I'm writing small programs to get familiar with how things
New to jquery question... Using jQuery, depending on the radio button clicked I would
New to Android before I port my application to this platform I wanted to
I have considerable experience in making Android applications. For my new project, we have
New to Flex, what is the nearest equivalent to the following HTML markup in

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.