首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用appium为移动自动化设置gitlab cicd?

使用appium为移动自动化设置gitlab cicd?
EN

Stack Overflow用户
提问于 2018-11-06 13:36:04
回答 3查看 3.4K关注 0票数 3

是否有人使用appium工具为移动自动化设置Gitlab CICD?

我想知道如何在gitlab中设置用于自动化的仿真器/设备,以及如何在gitlab中设置appium服务器。

非常感谢您的意见:)

EN

回答 3

Stack Overflow用户

发布于 2019-08-21 18:40:18

我找到了这个关于gitlab-ci和安卓项目的相关链接:https://about.gitlab.com/2018/10/24/setting-up-gitlab-ci-for-android-projects/

然而,在这个例子链接中似乎没有使用appium,但我相信如果你稍微调整一下,它仍然是有用的。

基本上,以下是您需要使用的yml文件:

代码语言:javascript
复制
image: openjdk:8-jdk

variables:
  ANDROID_COMPILE_SDK: "28"
  ANDROID_BUILD_TOOLS: "28.0.2"
  ANDROID_SDK_TOOLS:   "4333796"

before_script:
  - apt-get --quiet update --yes
  - apt-get --quiet install --yes wget tar unzip lib32stdc++6 lib32z1
  - wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_TOOLS}.zip
  - unzip -d android-sdk-linux android-sdk.zip
  - echo y | android-sdk-linux/tools/bin/sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}" >/dev/null
  - echo y | android-sdk-linux/tools/bin/sdkmanager "platform-tools" >/dev/null
  - echo y | android-sdk-linux/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}" >/dev/null
  - export ANDROID_HOME=$PWD/android-sdk-linux
  - export PATH=$PATH:$PWD/android-sdk-linux/platform-tools/
  - chmod +x ./gradlew
  # temporarily disable checking for EPIPE error and use yes to accept all licenses
  - set +o pipefail
  - yes | android-sdk-linux/tools/bin/sdkmanager --licenses
  - set -o pipefail

stages:
  - build
  - test

lintDebug:
  stage: build
  script:
    - ./gradlew -Pci --console=plain :app:lintDebug -PbuildDir=lint

assembleDebug:
  stage: build
  script:
    - ./gradlew assembleDebug
  artifacts:
    paths:
    - app/build/outputs/

debugTests:
  stage: test
  script:
    - ./gradlew -Pci --console=plain :app:testDebug

我还发现了一个非常有用的相关StackOverflow答案:how to set up a Appium UI test maven project to work with Gitlab CI to test Android App?

票数 1
EN

Stack Overflow用户

发布于 2018-11-21 14:24:08

我在GitHub上找到了一个存储库,它在Microsoft Azure DevOps CI环境中运行Appium测试。查看repo here

看看它的CI版本是如何设置的,你应该可以使用Azure DevOps而不是GitLab。

票数 0
EN

Stack Overflow用户

发布于 2021-09-17 16:51:23

我已经在Gitlab中设置了一个构建管道,使用快速通道自动构建apk和ipa,并使用快速通道将它们分别上传到play store和App Store。

您可以对其进行扩展以添加在Appium上运行的测试

对于学习如何为flutter应用程序设置CICD管道,这是一个很好的起点。https://appditto.com/blog/automate-your-flutter-workflow

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53166279

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档