mercredi 10 octobre 2018

Different result in automated testing, jenkins

I wrote over 300 tests and local seems to be anything fine.

But when i ran these tests on a jenkins via a docker build, it throws me :

 CreateComponent
    ✖ should fill all required
      HeadlessChrome 0.0.0 (Linux 0.0.0)
    [object ErrorEvent] thrown

  AccessProfileDetailComponent
    ✖ should has timespan created
      HeadlessChrome 0.0.0 (Linux 0.0.0)
    [object ErrorEvent] thrown

    ✖ should has properties changed
      HeadlessChrome 0.0.0 (Linux 0.0.0)
    Failed: Response with status: 0  for URL: null
        at <Jasmine>
        at eval (./node_modules/zone.js/dist/zone-testing.js?:779:30)
        at eval (./node_modules/zone.js/dist/zone-testing.js?:834:21)
        at ZoneDelegate.invoke (./node_modules/zone.js/dist/zone.js?:387:26)
        at ProxyZoneSpec.onInvoke (./node_modules/zone.js/dist/zone-testing.js?:287:39)

    ✖ should has periode created
      HeadlessChrome 0.0.0 (Linux 0.0.0)
    [object ErrorEvent] thrown

    ✖ should create
      HeadlessChrome 0.0.0 (Linux 0.0.0)
    Failed: Response with status: 0  for URL: null
        at <Jasmine>
        at eval (./node_modules/zone.js/dist/zone-testing.js?:779:30)
        at eval (./node_modules/zone.js/dist/zone-testing.js?:834:21)
        at ZoneDelegate.invoke (./node_modules/zone.js/dist/zone.js?:387:26)
        at ProxyZoneSpec.onInvoke (./node_modules/zone.js/dist/zone-testing.js?:287:39)

    ✖ should has timespan deleted
      HeadlessChrome 0.0.0 (Linux 0.0.0)
    [object ErrorEvent] thrown

    ✖ should has readers added
      HeadlessChrome 0.0.0 (Linux 0.0.0)
    Failed: Response with status: 0  for URL: null
        at <Jasmine>
        at eval (./node_modules/zone.js/dist/zone-testing.js?:779:30)
        at eval (./node_modules/zone.js/dist/zone-testing.js?:834:21)
        at ZoneDelegate.invoke (./node_modules/zone.js/dist/zone.js?:387:26)
        at ProxyZoneSpec.onInvoke (./node_modules/zone.js/dist/zone-testing.js?:287:39)

  ElementDetailElementComponent
    ✖ should be as a popup
      HeadlessChrome 0.0.0 (Linux 0.0.0)

this might happen due a async. service call I guess.

this is my script :

"test": "ng test --browsers Chrome_no_sandbox --source-map=false --watch false",

My questions :

  1. What do I have to do to get the same errors in local 2.Is there a way to detect the exact wrong lines that cause these errors?

Aucun commentaire:

Enregistrer un commentaire