chilio / laravel-dusk-ci

Docker Test suite for Laravel Dusk in gitlab CI
MIT License
159 stars 51 forks source link

Dusk result give a false positive #53

Closed Gil-1 closed 4 years ago

Gil-1 commented 4 years ago

I'm currently working on a full pipe check based of ohdear's config (https://github.com/ohdearapp/gitlab-ci-pipeline-for-laravel) I added a dusk part using this docker image and if the tests fails I still have Gitlab telling me it succeded.

You can check the dusk job config here :

dusk:
  stage: testing
  image: chilio/laravel-dusk-ci
  services:
    - name: mysql:8.0
      command: ["--default-authentication-plugin=mysql_native_password"]
  dependencies:
    - build-assets
    - composer
    - db-seeding
  script:
    - php -v
    - mysql --host="${DB_HOST}" --user="${MYSQL_USER}" --password="${MYSQL_PASSWORD}" "${MYSQL_DATABASE}" < db.sql
    - google-chrome --version
    # Upgrade Chrome Driver
    - php artisan dusk:chrome-driver 77
    - start-nginx-ci-project
    # Run Dusk Tests
    - php artisan dusk --colors --debug
  artifacts:
    paths:
      - storage/logs # for debugging
      - tests/Browser/screenshots
      - tests/Browser/console
    expire_in: 1 days
    when: always

And here is what I get as an output if I make it fail


ERRORS!
Tests: 41, Assertions: 0, Errors: 41.
Uploading artifacts...
storage/logs: found 2 matching files               
tests/Browser/screenshots: found 2 matching files  
tests/Browser/console: found 2 matching files      
Uploading artifacts to coordinator... ok            id=338202026 responseStatus=201 Created token=6t_BaFoR
Job succeeded

Any idea where it could come from ?

chilio commented 4 years ago

@Gil-1 how do you see it in gitlab as passed job?

Gil-1 commented 4 years ago

Hello @chilio It says "Job succeeded" at the end and when I check the pipeline it's in green. The artifacts are always generated as you can see in the yml config.

chilio commented 4 years ago

Hello @Gil-1 ok now I see. First what versions are your running:

  1. Gitlab
  2. Gitlab-runner
  3. Type of registered Gitlab-runnner Have you tried workflow with package inbuilt chromedriver (configure-laravel, etc.)?
Gil-1 commented 4 years ago

Hello @chilio Sorry for the late reply but I was on vacation and the issue fixed itself.

Thanks for the support !

chilio commented 4 years ago

@Gil-1 Glad to hear. Happy coding....