在Junit中找不到或没有测试 [英] could not be found or has no tests in Junit

查看:107
本文介绍了在Junit中找不到或没有测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 JunitTestcase 测试设置应用程序.我的课程扩展了 ActivityInstrumentationTestCase2 .但是在执行过程中,我收到此错误:

I am trying to test setting application using JunitTestcase.My class extends ActivityInstrumentationTestCase2. But while executing I am getting this error:

01-12 17:22:11.519:WARN/TestGrouping(2942):无效的程序包:可以 找不到或没有测试01-12 17:22:11.539:

01-12 17:22:11.519: WARN/TestGrouping(2942): Invalid Package: '' could not be found or has no tests 01-12 17:22:11.539:

INFO/ActivityManager(1620):强制停止软件包com.android.settings uid = 1000

INFO/ActivityManager(1620): Force stopping package com.android.settings uid=1000

有人可以为此提出建议吗?

Can any one suggest a solution for this?.

推荐答案

您必须在测试项目的AndroidManifest中指定要测试的应用程序.

You have to specify the app to be tested in the AndroidManifest of the testing project.. that might be missing.

这篇关于在Junit中找不到或没有测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆