test artifact 是什么意思

Actually, my project has unit tests. All of them are configured in /src/test/java/ and recently, I needed to add instrumental test in /src/androidTest/java. To do that I have added espresso dependencies in build.gradle.
dependencies {
compile files('libs/pixlui-1-0-5.jar')
// You must install or update the Support Repository through the SDK manager to use this dependency.
compile('com.fortysevendeg.swipelistview:swipelistview:1.0-SNAPSHOT@aar') {
transitive = true
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.android.support:appcompat-v7:20.+'
compile 'com.google.android.gms:play-services-maps:7.3.0'
compile 'com.google.android.gms:play-services-location:7.3.0'
compile 'com.google.android.gms:play-services-gcm:7.3.0'
compile 'com.loopj.android:android-async-http:1.4.5'
// You must install or update the Support Repository through the SDK manager to use this dependency.
compile 'com.android.support:support-v4:20.+'
compile 'ch.acra:acra:4.5.0'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.2'
compile 'com.squareup.picasso:picasso:2.3.4'
provided 'com.squareup.dagger:dagger-compiler:1.2.+'
compile 'com.squareup.dagger:dagger:1.2.+'
compile 'com.google.guava:guava:15.0'
compile 'com.facebook.android:facebook-android-sdk:3.23.0'
compile 'com.mixpanel.android:mixpanel-android:4.5.3'
compile 'com.google.maps.android:android-maps-utils:0.3+'
// Testing dependencies
testCompile 'junit:junit:4.12'
testCompile "org.mockito:mockito-core:1.9.5"
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.0'
androidTestCompile 'com.android.support.test:testing-support-lib:0.1'
androidTestCompile ('com.android.support.test.espresso:espresso-contrib:2.0') {
exclude module: 'support-annotations'
After that I chose on the Build Variants -> Test Artifact -> Android Instrumentation Tests.
But when I start to code, none of the dependencies are reconized:
"Cannot resolve symbol onView", "Cannot resolve symbol ViewInteraction", etc...
This is my activity test:
import android.support.test.espresso.Espresso.onV
import android.test.ActivityInstrumentationTestCase2;
import com.wiffinity.easyaccess.R;
* Created by Javier on 05/06/2015.
public class EntryActivityTest extends ActivityInstrumentationTestCase2&EntryActivity& {
public EntryActivityTest() {
super(EntryActivity.class);
protected void setUp() throws Exception
super.setUp();
getActivity();
public void testLoginButtonClicked(){
ViewInteraction entryB
entryBtn = onView(withId(R.id.entry_button));
entryBtn.performClick();
Why Android Studio 1.2 cannot resolve this dependencies? May I forget to configure something?
解决方案 You might need to rebuild the project.
In Android Studio:
Build -> Rebuild project.
If it doesn't help run the following gradle task (given that you have a wrapper and your module name is "app"):
./gradlew app:dependencies
and make sure your androidTest tasks contain espresso dependencies.
Sometimes rebuilding the project doesn't solve the problem and the only solution is to rebuild the test apk manually by executing gradle assembleAndroidTest task.
本文地址: &
其实,我的项目有单元测试。所有这些都配置为/ src目录/测试/ JAVA /最近,我需要添加在/ src目录/ androidTest / JAVA工具测试。要做到这一点我在的build.gradle增加ES preSSO依赖。
编译文件(“库/ pixlui-1-0-5.jar')
//您必须安装或通过SDK管理器更新支持信息库使用这种依赖性。
编译('com.fortysevendeg.swipelistview:swipelistview:1.0-SNAPSHOT@aar'){
编译“com.google code.gson:GSON:2.2.4”
编译“com.android.support:appcompat-v7:20.+”
编译“com.google.android.gms:播放服务,地图:7.3.0”
编译“com.google.android.gms:播放服务地点:7.3.0”
编译“com.google.android.gms:播放服务-GCM:7.3.0”
编译“com.loopj.android:android-async-http:1.4.5”
//您必须安装或通过SDK管理器更新支持信息库使用这种依赖性。
编译“com.android.support:support-v4:20.+”
编译“ch.acra:ACRA:4.5.0”
编译“com.nostra13.universalimageloader:通用图像装载机:1.9.2”
编译“com.squareup.picasso:毕加索:2.3.4”
提供'com.squareup.dagger:匕首编译:1.2 +'
编译“com.squareup.dagger:匕首:1.2 +。”
编译“com.google.guava:番石榴:15.0'
编译“com.facebook.android:facebook-android-sdk:3.23.0”
编译“com.mixpanel.android:mixpanel-android:4.5.3”
编译“com.google.maps.android:android-maps-utils:0.3+”
//测试的依赖
testCompile'的JUnit:JUnit的:4.12“
testCompile“org.mockito:的Mockito核心:1.9.5”
androidTestCompile'com.android.support.test.es preSSO:ES preSSO核心:2.0“
androidTestCompile'com.android.support.test:测试支持-LIB:0.1
androidTestCompile('com.android.support.test.es preSSO:ES preSSO-的contrib:2.0'){
排除模块:“支持的注解”
}} 之后,我选择的Build变种 - >测试神器 - > Android的仪器测试。 但是,当我开始code,无依赖性都reconized:“无法解析符号OnView由”,“无法解析符号ViewInteraction”,等等... 这是我的测试活动: 进口android.support.test.es presso.Es presso.onV进口android.test.ActivityInstrumentationTestCase2;进口com.wiffinity.easyaccess.R;/ ** *创建者哈维尔于日。 * /公共类EntryActivityTest扩展ActivityInstrumentationTestCase2< EntryActivity> {
公共EntryActivityTest(){
超(EntryActivity.class);
保护无效设置()抛出异常
super.setUp();
getActivity();
公共无效testLoginButtonClicked(){
OnView由();
ViewInteraction entryB
entryBtn = OnView由(withId(R.id.entry_button));
entryBtn.performClick();
}} 为什么Android的工作室1.2不能解决此依赖呢?我可能会忘记什么配置?解决方案 您可能需要重新生成项目。在Android的工作室:构建 - >重建项目。如果没有帮助运行以下任务的gradle(假设你有一个封装和模块的名称为“app”):
./ gradlew应用:依赖 ,并确保您的androidTest任务包含ES preSSO依赖关系。更新:有时重建项目不解决这个问题,唯一的解决办法是通过执行gradle这个 assembleAndroidTest 任务手动重建测试APK。
本文地址: &
扫一扫关注官方微信ArtifactHelper Class (Microsoft.mon.Internal)
MSDN Library
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
ArtifactHelper Class
For internal use only.
Helper class for managing artifact URI conversion.
Microsoft.mon.Internal.ArtifactHelper
Namespace:
Microsoft.mon (in Microsoft.mon.dll)
public static class ArtifactHelper
The ArtifactHelper type exposes the following members.
NameDescriptionAny public static (Shared in Visual Basic)
members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
IN THIS ARTICLE
Is this page helpful?
Additional feedback?
1500 characters remaining
Thank you!
We appreciate your feedback.最近浏览条目
Test Artifact 1ID:137581物品等級: 750 拾取后綁定唯一雙手 雙手劍2642 - 3963 傷害速度 3.60(+ 917. 傷害 / 每秒)神聖聖物插槽火焰聖物插槽裝備:
[quote][url=/wow/tw/item/137581.html][img]http://img./wow/icons/l/inv_sword_2h_artifactashbringerfire_d_02.jpg[/img][/url]
[url=/wow/tw/item/137581.html][color=sienna][b]Test Artifact 1[/b][/color][/url]
拾取后綁定
2642 - 3963 傷害
速度 3.60(+ 917. 傷害 / 每秒)[img]http://img./wow/icons/relic_holy.gif[/img][color=gray]神聖聖物插槽[/color][img]http://img./wow/icons/relic_fire.gif[/img][color=gray]火焰聖物插槽[/color][color=green]裝備:灰燼甦醒也會產生5道聖能,且擊中的所有敵人會持續燃燒6秒,受到660%攻擊強度點輻光傷害。[/color][color=sienna]物品等級: 750[/color]
Powered By [url=/wow][/url]
[item=137581,tw]Test Artifact 1[/item]
动画效果:
** 鼠标移动到此以加载动画列表 **
按下并拖动鼠标以旋转视角,Ctrl + 按下并拖动鼠标以移动位置
第一次加载角色模型文件可能需要相当长一段时间(取决于你的本地网络)}

我要回帖

更多关于 hold是什么意思 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信