Behat tests not running on CircleCI

拜拜、爱过 提交于 2019-12-12 03:55:23

问题


I'm having come trouble getting my tests to run within CircleCI. Locally the tests run fine, as shown on the right side of the screenshot. But in CircleCI, it will load the SuiteContext file and run the Before/AfterSuite methods, but nothing else. What would cause this sort of behavior? Thanks

default:
  autoload: Test/Context
  suites:
    default:
      paths:
        features: Test/Features
      contexts:
        - SettingContext: ~
        - LanguageContext: ~
        - ActionContext: ~
        - FrontendContext: ~
        - FileTypeContext: ~
        - FieldContext: ~
        - ChannelContext: ~
        - BrowserContext: ~
        - SuiteContext: ~
        - RequestContext: ~
        - UrlContext: ~
        - TemplateContext: ~
        - PhraseContext: ~
        - CategoryContext: ~
        - EntryContext: ~
  extensions:
    Behat\MinkExtension:
      base_url: http://ee300-clean.dev
      selenium2: ~

Paths to files in Circle instance:

/home
  /ubuntu
    /project
      /app
        /bin
          /behat
        /behat.yml
        /Test
          /Context
          /Features

circle.yml

test:
  override:
    - cd /home/ubuntu/project/app && bin/behat

I've changed that override command several times to explicitly set the path to the Features directory, but nothing I've tried works.


回答1:


This ended up being a case sensitivity issue. Long ago I had renamed my features folder to Features, and locally on my Mac it still appeared as Features, however, it was committed to Git as features. Mac seemed to be more forgiving and still ran the tests even though the config file had "Features" in it, but Ubuntu server on Circle wasn't as forgiving.



来源:https://stackoverflow.com/questions/35457469/behat-tests-not-running-on-circleci

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!