原文: What is the purpose of @SmallTest, @MediumTest, and @LargeTest annotations in Android?

原原文: Test Sizes

  • Small: this test doesn't interact with any file system or network.
  • Medium: Accesses file systems on box which is running tests.
  • Large: Accesses external file systems, networks, etc.
Feature Small Medium Large
Network access No localhost only Yes
Database No Yes Yes
File system access No Yes Yes
Use external systems No Discouraged Yes
Multiple threads No Yes Yes
Sleep statements No Yes Yes
System properties No Yes Yes
Time limit (seconds) 60 300 900+

Comments

comments powered by Disqus
Copyright © 2013 Andro Chen
Powered by Logdown and Greyshade
Favicon from The Noun Project