13fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang/* 23fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang * Copyright (C) 2010 The Android Open Source Project 33fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang * 43fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang * Licensed under the Apache License, Version 2.0 (the "License"); 53fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang * you may not use this file except in compliance with the License. 63fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang * You may obtain a copy of the License at 73fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang * 83fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang * http://www.apache.org/licenses/LICENSE-2.0 93fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang * 103fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang * Unless required by applicable law or agreed to in writing, software 113fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang * distributed under the License is distributed on an "AS IS" BASIS, 123fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 133fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang * See the License for the specific language governing permissions and 143fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang * limitations under the License. 153fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang */ 163fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang 173fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wangpackage android.test; 183fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang 193fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wangimport java.lang.annotation.ElementType; 203fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wangimport java.lang.annotation.Retention; 213fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wangimport java.lang.annotation.RetentionPolicy; 223fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wangimport java.lang.annotation.Target; 233fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang 243fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang/** 253fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang * This annotation can be used on an {@link android.test.InstrumentationTestCase}'s test methods. 263fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang * When the annotation is present, the test method is executed the number of times specified by 273fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang * numIterations and defaults to 1. 283fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang * 293fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang * {@hide} Not needed for public API. 303fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang */ 313fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang@Target(ElementType.METHOD) 323fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang@Retention(RetentionPolicy.RUNTIME) 333fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wangpublic @interface RepetitiveTest { 343fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang /** 353fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang * Indicates the number of times a test case should be run. 363fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang * 373fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang * @return The total number of iterations, the default is 1. 383fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang */ 393fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang int numIterations() default 1; 403fc03e619fb01678549b80e7a89af2c8e3f19968Jack Wang}