Skip to content

Annotations Explained

Devrath edited this page Jul 4, 2021 · 2 revisions

Consider this snippet here

@RunWith(AndroidJUnit4::class)
@SmallTest
class ShoppingDaoTest {
  // Our tests 
}
Annotations Description
@RunWith(AndroidJUnit4::class) This annotation will tell the JVM that these are instrument unit tests
@SmallTest This is used to tell JVM that these are the unit tests from the testing pyramid. These are the smallest of tests
@MediumTest This is used to tell JVM that these are the Integration tests from the testing pyramid
@LargeTest This is used to tell JVM that these are the End to end tests from the testing pyramid
Clone this wiki locally