惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
C
Cisco Blogs
Scott Helme
Scott Helme
Know Your Adversary
Know Your Adversary
NISL@THU
NISL@THU
C
Cyber Attacks, Cyber Crime and Cyber Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
S
Schneier on Security
I
Intezer
Spread Privacy
Spread Privacy
AWS News Blog
AWS News Blog
V
Vulnerabilities – Threatpost
Cloudbric
Cloudbric
V2EX - 技术
V2EX - 技术
Google Online Security Blog
Google Online Security Blog
L
Lohrmann on Cybersecurity
Recent Commits to openclaw:main
Recent Commits to openclaw:main
L
LINUX DO - 热门话题
S
Secure Thoughts
T
The Exploit Database - CXSecurity.com
博客园 - 【当耐特】
Recent Announcements
Recent Announcements
Security Archives - TechRepublic
Security Archives - TechRepublic
Stack Overflow Blog
Stack Overflow Blog
罗磊的独立博客
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
K
Kaspersky official blog
阮一峰的网络日志
阮一峰的网络日志
博客园_首页
Latest news
Latest news
B
Blog
F
Full Disclosure
大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
L
LangChain Blog
GbyAI
GbyAI
Last Week in AI
Last Week in AI
S
Security Affairs
Apple Machine Learning Research
Apple Machine Learning Research
N
Netflix TechBlog - Medium
Security Latest
Security Latest
Vercel News
Vercel News
Y
Y Combinator Blog
G
GRAHAM CLULEY
S
Securelist
T
Troy Hunt's Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
雷峰网
雷峰网

博客园 - micenter

Register ASP.NET 4.0 An error has occurred: 0x8007b799 You must have administrative rights on this machine in order to ru 记录一些常用的SQLServer时间日期函数详解 IT民工的2013生活创想 SQL 日志太大,脚本清除 跟随博客园进入2012 .NET 中 操作excel 系列--copy功能. .NET 中 操作excel 系列--导入与导出. 设置VSS2005使支持通过Internet访问 中the server configuration settings apply only for local databases....问题解决 vss 2005 配置服务器端的时候提示"IIS没有安装" ASP.NET MVC 实现二级域名 [转] Eclipse快捷键大全(转载) 手动使用EDM 生成器 (EdmGen.exe) 工具生成 SSDL,CSDL,MSL 文件。 InnoDB ,MyISAM 等存储引擎中主外键的大小设置. 在 mysql 中 定义 数据库,表,列时,设定的各个的编码格式。 asm.jar 等包的重用问题之解决方案 汇总 Hibernate 与 jdbc,jndi+dbcp, proxool ,c3p0 连接池的配置 - micenter Hibernate中自动增长列的 在Annotations 中的配置和数据库设置默认值问题 - micenter java 字符串的编码与C#的区别 - micenter - 博客园 Hibernate中自动增长列的..hbm.xml 配置和数据库设置默认值问题 - micenter - 博客园
Android单元测试测试[转]
micenter · 2011-03-04 · via 博客园 - micenter

Android单元测试测试


AndroidManifest.xml

<uses-library android:name="android.test.runner"/>

<instrumentation
        android:name="android.test.InstrumentationTestRunner"
        android:targetPackage="com.myapp.tests"             
        android:label="MyAppTests" />

1.继承androidTestCase类。

2.Assert类判断所得到值与期望值是否相同。

单击“Android JUnit Test”运行后会,会出现如下警告:

It outputs Warning: No instrumentation runner found for the launch, using

android.test.InstrumentationTestRunner.

模拟器不能记住Androidmanifest的配置,在运行时需要重新设置运行配置,如下:

1.在工程名字上点击右键,选择properties

2.在Run/Debug setting中选择要运行的工程名字,点击右边的Edit,会进入下面的界面,

在 instrumentation runner后面的下拉列表中选择:android.test.InstrumentationTestRunner

3.重新运行该测试单元,则就不会出现上面的警告了。