0
votes

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

behat results

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
can you post your behat.yml file, please? - gvf
Agreed, would be great to see more details about the configuration and about the tests you are running. - appplemac
Updated OP with the file. - Brian Litzinger
What else would be helpful to see? I put a var_dump() in the first test that runs and it doesn't even get to that point. It obviously knows where the Context files are and its not throwing any PHP errors, which is the odd thing. This project is bootstrapping the ExpressionEngine CMS in CLI, which works fine locally. When/if it fails to bootstrap locally I hear about it from PHP errors, but here I have none. - Brian Litzinger
I changed the features: Test/Features path in my local environment to an invalid path, and ran the tests. The result is exactly what I'm seeing within Circle. It doesn't run tests and just var_dumps the "Queries run" line that I have in the afterSuite() method. So basically for some reason its not finding the path to the Features. - Brian Litzinger

1 Answers

0
votes

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.