I have some weird behavior on a Rails 6.0.4 application when running system tests: when running rails test:system
on my machine I correctly see which error is failing, but in Travis I only see the following, without any hint of which error failed:
Puma starting in single mode...
* Version 4.3.8 (ruby 2.6.6-p146), codename: Mysterious Traveller
* Min threads: 0, max threads: 4
* Environment: test
* Listening on tcp://127.0.0.1:34339
Use Ctrl-C to stop
The command "bundle exec rails test:system" exited with 1.
The only thing that pops on my mind is the parallelization, but I tried with and without the parallelize
statement in test_helper.rb
and it didn't change much, unfortunately.
This is the content of .travis.yml:
language: ruby
cache: bundler
before_install:
- yes | gem update --system
- gem install bundler
env:
global:
# CodeClimate : INI
- COVERAGE=true
- secure: #..................
# CodeClimate : END
rvm:
- 2.6.6
services:
- mysql
- mongodb
addons:
apt:
sources:
- mysql-5.7-bionic
packages:
- mysql-server
dist: bionic
sudo: required
before_install:
- yes | gem update --system
- gem install bundler
before_script:
# needed for system testing
- sudo -- sh -c 'mkdir -p /var/run/puma/ && chown travis /var/run/puma/'
- sudo -- sh -c 'mkdir -p /var/log/puma/ && chown travis /var/log/puma/'
- sudo mysql_upgrade
- sudo service mysql restart
- RAILS_ENV=test bundle exec rake db:create db:schema:load
# CodeClimate : INI
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
# CodeClimate : END
script:
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then bundle exec rails checks:all; fi
- bundle exec rails test
- bundle exec rails test:system
after_script:
# CodeClimate : INI
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
# CodeClimate : END
notifications:
email:
- developers@company.com
Any tips on how to troubleshoot this?