---
title: "Android中配置单元测试"
author: "Scofield-Android"
date: "2011-12-30T13:49:18Z"
tags: ["Android"]
categories: ["移动开发"]
slug: "android"
draft: false
lastmod: "2011-12-30T13:49:47Z"
id: 1330431
url: "https://scofield-android.iteye.com/blog/1330431"
---

第一步： Manifest.xml中 中加入： \[b]\[/b] 外面加入： 第2步 编写单元测试代码：必须继承自AndroidTestCase类 import android.test.AndroidTestCase; import junit.framework.Assert; public class TestLogin extends AndroidTestCase { private static final String Tag="TestLogin "; public void login() throws Throwable { } }