Strange behavior with e2e test when running on a jenkins node

Hi all,

My Environment:
@vue-cli and @vue-plugins 4.0.5
nodejs: 10.17.0
npm 6.13.1

I started to remark a strange behavior regarding the E2E Test (nightwatch, and chromedriver). So first I create my projects using the vue-cli “vue create” command using the following settings:
“router, vuex, sass, babel, pwa, eslint, unit-jest, e2e-nightwatch”

I have a jenkins job defined to compile and run the E2E tests on a root-server (Ubuntu 18.04 OS). My working laptop has the same Ubuntu version.

The E2E generated by the vue-cli create command run without problem both locally and on jenkins.

However when I am finished with my first feature (Login), the e2e test works perfectly when executed locally, whereas on jenkins the tests stays blocked on the login view. This although no suspicious error messages can be found in all kind of logs I have setup to understand this situation.

The test scenario of the Login is quite simle:

  1. start the browser
  2. move to the app url
  3. ensure that the login form is visible
  4. fill up the form with the expected data
  5. click on the submit button to send the credentials to a fake-backend-server designed for this purpose
  6. ensure that the Dashboard (this is the view visible after the login) is visible

Steps 6. never succeed on the jenkins server, but work without problem on my dev machine locally. The final screenshot I got from the server displays the login page, This tells me that the flows never moved to the route “/dashboard”.

I first tried to solve it by increasing the default waiting time, but this didn’t solve the problem.

Now after 2 months of hacking I found a work around. I just found out that when I do not use the lazy loading mechanism from vue-router, the problem disappear when executed on the jenkins server.

What could be the cause of this strange behavior?

This is a very annoying situation, since it will force us to renounce to the route level code splitting. I would rather prefer to have stable e2e test on fast load time of my SPA.

NB: This problem appeared after I migratd to VUE CLI4. All this code splitting issues were not present in when I worked wit VUE CLI3

Any idea from more experienced VUE-Expert out there?

Is there nobody with any hints for a solution?