如果我希望我的circleci yml包含浏览器,我需要哪些依赖项?

时间:2016-03-14 12:54:56

标签: java scala selenium selenium-webdriver circleci

如果我希望我的circleci构建运行一些包含浏览器的测试,我需要哪些依赖项?

这是我的yml:

machine:
  java:
    version: oraclejdk8
  environment:
    SBT_VERSION: 0.13.9
    SBT_OPTS: "-Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M"
dependencies:
  post:
    - wget http://selenium-release.storage.googleapis.com/2.44/selenium-server-standalone-2.44.0.jar
    - java -jar selenium-server-standalone-2.44.0.jar:
            background: true
  cache_directories:
    - "~/.sbt"
    - "~/.ivy2"
    - /home/ubuntu/nvm/versions/node
  pre:
    - echo | sudo add-apt-repository ppa:webupd8team/java
    - sudo apt-get update
    - echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
    - wget --output-document=$HOME/bin/sbt-launch.jar
      https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/"$SBT_VERSION"/sbt-launch.jar
    - echo "java $SBT_OPTS -jar \`dirname \$0\`/sbt-launch.jar \"\$@\""
      > $HOME/bin/sbt
    - chmod u+x $HOME/bin/sbt
    - sudo apt-get install libxss1 libappindicator1 libindicator7
    - wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
    - sudo dpkg -i google-chrome*.deb
    - sudo apt-get install unzip
    - wget -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/2.21/chromedriver_linux64.zip
    - echo "y" | sudo unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/
    - sudo chmod 755 /usr/local/bin/chromedriver

  override:
    - sbt clean update
test:
  override:
    - sbt test
general:
  artifacts:
    - "target/test-reports/html"
    - "target/test-reports/junit"
deployment:
  feature:
    branch: /.*/
    commands:
      - sbt debian:packageBin

我使用scala + scalatest + selenium来管理我的测试,并使用chrome作为我的webdriver ......

目前构建失败。

0 个答案:

没有答案