是否可以在--test-targets命令中指定多个注释

问题描述 投票:0回答:1

根据firebase文档,我应该能够指定多个测试目标过滤器 - https://cloud.google.com/sdk/gcloud/reference/firebase/test/android/run#--test-targets

我已经指定了这样的自定义注释

@Target(AnnotationTarget.FUNCTION)
@Retention(AnnotationRetention.RUNTIME)
annotation class MyAnnotationOne


@Target(AnnotationTarget.FUNCTION)
@Retention(AnnotationRetention.RUNTIME)
annotation class MyAnnotationTwo

并用

@MyAnnotationOne
@MyAnnotationTwo

相应地标记我的测试

当我仅使用一个注释运行 firebase 命令时,它就可以工作了

--test-targets="annotation com.foo.MyAnnotationOne" \

但是当我尝试指定多个注释时,它不起作用。

--test-targets="annotation com.foo.MyAnnotationOne,annotation com.foo.MyAnnotationTwo" \

关于如何指定多个注释有什么想法吗?可以吗?

尝试了以下方法,但没有运行任何测试

--test-targets="annotation com.foo.MyAnnotationOne,annotation com.foo.MyAnnotationTwo" \
android firebase adb junit4 android-espresso
1个回答
0
投票

根据 AndroidJRunner 文档,您应该删除第二个注释,例如:

--test-targets="annotation com.foo.MyAnnotationOne,com.foo.MyAnnotationTwo"

希望这有帮助

最新问题
© www.soinside.com 2019 - 2024. All rights reserved.