0
votes

I have some cucumber tests that are running great locally but have issues with it passing on Travis CI. My specific issue is with Gherkin/Cucumber assertions that deal with text output to stdout/console.

The interesting aspect of this is that I have phpunit tests in the suite which test for console output and they run perfectly. The Travis CI test suite can be seen at this url https://travis-ci.org/ddelnano/dredd-hooks-php. However, I have included a picture of one of the failing tests below.

My .travis.yml file is shown below:

language: php
before_install:
  - npm install -g dredd
  - bundle install
  - composer install

php:
  - "5.5"    
  - "5.6"

script:
  - bundle exec cucumber
  - vendor/bin/phpunit  

The assertions that fail on Travis CI are:

Then the output should contain: 
"""
Text that should be output
"""

It seems from the Travis CI output I am getting no output. Travis CI failing test output

I have looked through Travis's common questions and I couldn't find anything related to my issue.

I would greatly appreciate any help since this is the last thing I need to fix before my first open source contribution is ready to use!

1
any idea how you fixed the issue?prasad.surase
Yes I figured this out a long time ago but will post an answer to the question now.ddelnano
Let me know if that fixes your problem.ddelnano

1 Answers

0
votes

I was able to solve this issue from the suggestions from the cucumber / aruba github page which can be seen here. My cucumber tests had the @debug annotation for each scenario block and in order to resolve my issue I needed to replace that annotation with @announce.