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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:16:52+00:00 2026-06-07T11:16:52+00:00

I’m using maven for building, running and instrumentation testing my Android applications. Android testing

  • 0

I’m using maven for building, running and instrumentation testing my Android applications. Android testing framework has three different test scopes @SmallTest, @MediumTest and @LargeTest and android-maven-plugin has ability to select test scope via testTestSize or test/testSize parameter. This parameter can be one of small|medium|large and can run your tests from related scope.

But what can i do if i want to run small and medium tests simultaneously, not only small or not only medium? Any solution for this problem exists?

  • 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-07T11:16:53+00:00Added an answer on June 7, 2026 at 11:16 am

    This is how Android SDK is designed and supposed to work at the moment, according to InstrumentationTestRunner API doc:

    Running all small tests: adb shell am instrument -w -e size small com.android.foo/android.test.InstrumentationTestRunner

    Running all medium tests: adb shell am instrument -w -e size medium com.android.foo/android.test.InstrumentationTestRunner

    Running all large tests: adb shell am instrument -w -e size large com.android.foo/android.test.InstrumentationTestRunner

    Even if you use the plain adb command to run your test, you have to use two process to run small and medium test separately, one after another. Android Maven Plugin is just another wrapper of the adb command, so there is no way to alter the default behaviour via android-maven-plugin configuration AFAIK.


    If you read the InstrumentationTestRunner API doc more carefully, you will note that there is an interesting command usage:

    Filter test run to tests with given annotation: adb shell am instrument -w -e annotation com.android.foo.MyAnnotation com.android.foo/android.test.InstrumentationTestRunner

    If used with other options, the resulting test run will contain the union of the two options. e.g. "-e size large -e annotation com.android.foo.MyAnnotation" will run only tests with both the LargeTest and "com.android.foo.MyAnnotation" annotations.

    The annotation configuration is added as experimental API (marked as @hide, for more details check out this version history), and hasn’t been documented in am instrument options list. Theoretically you can create your own annotation class (see SmallTest.java as example), mark all @MediumTest along with your @CustomizedTest and use both -e size and -e annotation to achieve what you want: run union tests from two annotations simultaneously, all in one command.

    Unfortunately, android-maven-plugin is not support annotation configuration, see plugin documentation and latest source code. A possible workaround is to use exec-maven-plugin run the plain adb shell am instrument command.

    Hope this make sense.

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
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.