android - 如何在 Appcenter 构建后脚本中执行所有 Android JUnit 测试
问题描述
我是使用 AppCenter 构建 Android 的新手,并希望执行我所有的 Apps JUnit。
我的应用程序由多个模块组成,每个模块都有关联的 JUnit。
但是我的主 App 模块没有 JUnit。
我试过创建一个appcenter-post-build.sh
脚本来执行命令./gradlew test
失败如下: -
[command]/bin/bash /Users/runner/work/1/s/app/appcenter-post-build.sh
/Users/runner/work/1/s/app/appcenter-post-build.sh: line 5: ./gradlew: No such file or directory
##[error]The process '/bin/bash' failed with exit code 127
##[error]Bash failed with error: The process '/bin/bash' failed with exit code 127
有什么方法可以通过构建后脚本执行我的所有应用程序模块 JUnit?
解决方案
尝试将其添加到您的 shell 脚本中。
cd $APPCENTER_SOURCE_DIRECTORY
chmod a+x ./gradlew
推荐阅读
- kotlin - Ktor 客户端 NoSuchMethodError
- r - 如何在多个 ggplot2 等高线图中设置对数刻度?
- javascript - ngIf 条件下的 TS 文件值
- python - QGraphicsview 中的 PyQt pyqtgraph
- css - 带有 VS Code Prettier 扩展的 CSS 规则集之间的空白行?
- unity3d - 如何在 Unity 中控制倾斜表面上的玩家相机/独立于 xyz 轴?
- python-3.x - 子图在不同的数据点用不同的文本绘制
- r - 我无法从一个闪亮的应用程序创建一个 pagedown::chrome_print pdf 输出,该应用程序接受参数输入并呈现 Rmarkdown
- javascript - 父组件未调整大小以适合子组件
- styled-components - 使用样式化组件引用其他组件