Search code examples
gitlab-cicodeceptjs

How to implement the autotesting stage in GitLab CI using CodeceptJS?


I am trying to configure the startup stage of autotests in the GitLab CI pipeline according to the example:

CodeceptJS GitLab Integration

Step to reproduce:

  1. I cloned this repository https://gitlab.com/paulvincent/codeceptjs-e2e-testing
[email protected]:paulvincent/codeceptjs-e2e-testing.git
  1. added changes and make a push

As a result, the Job filed with error

enter image description here

enter image description here

If someone has set up CodeceptJS + Gitlab CI, please share the config .gitlab-ci.yml


Solution

  • It looks like you're not experiencing an issue with GitLab, so much as you have a failing test. On line 77 of your image, it shows a test failing based on not finding the mceu_3 id. Once you resolve that test, your job should complete successfully.

    Note that if you want to add a test result (such as a junit result) into your merge request, you'll want to set when:always on the artifact for the job so it collects the report even when the job fails!