Behat测试未在CircleCI上运行 [英] Behat tests not running on CircleCI

查看:122
本文介绍了Behat测试未在CircleCI上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在CircleCI中运行测试.测试在本地运行正常,如屏幕截图右侧所示.但是在CircleCI中,它将加载SuiteContext文件并运行Before/AfterSuite方法,但仅此而已.什么会导致这种行为?谢谢

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: ~

Circle实例中文件的路径:

Paths to files in Circle instance:

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

circle.yml

circle.yml

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

我已经多次更改了覆盖命令,以明确设置Features目录的路径,但是我没有尝试过.

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

推荐答案

这最终成为区分大小写的问题.很久以前,我已经将我的features文件夹重命名为Features,并且在Mac上本地仍将其显示为Features,但是,它仍将Git用作features. Mac似乎更加宽容,即使配置文件中包含功能",Mac仍然可以运行测试,但是Circle上的Ubuntu服务器却没有那么宽容.

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.

这篇关于Behat测试未在CircleCI上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆