6

I have written 751 test cases in Jasmine JavaScript. 116 test cases for Mobile View and 645 test cases on Desktop view. While executing test cases, most of the times, test case execution was not completed. Phantom JS Get crashed. For PhantomJs crashing, we had switched to Chrome headless browser. Due to Fast rendering in chrome headless, few of the test cases are failed in chrome headless. And also I have included two links on same chrome headless browser.

Limitations on Chrome Headless browser

Why Test case are failures in chrome headless browser?

Gulp configuration for Desktop View:-

 customLaunchers: {
 'PhantomJS_Desktop': {
  base: 'PhantomJS',
   options: {
    viewportSize: {
      width: 1228,
      height: 1000
  }
  }
  }
  }

Gulp Configuration for Mobile View:-

customLaunchers: {
'PhantomJS_Mobile': {
 base: 'PhantomJS',
  options: {
    viewportSize: {
      width: 500,
      height: 500
  }
  }
  }
  }

Karma Configuration for Desktop View:-

 { 
    pattern: 'ts/foo/path/sample.html',
    watched:true,
    served:true,
    included:false
    }
 ],
concurrency: Infinity,
browserDisconnectTolerance: 3,
browserNoActivityTimeout: 1000000,
browserDisconnectTimeout: 1000000,
captureTimeout: 1000000,
retryLimit: 5,    

Karma Configuration for Mobile View:-

{
    pattern: 'ts/foo/path/sample.html',
    watched:true,
    served:true,
    included:false
}
],
browserNoActivityTimeout: 100000,

Finally, we are looking for a solution with Phantom JS browser. We are using Phantom JS 2.1.1 browser. Already I have asked about chrome headless due to test case failure. PhantomJs Crashed Screenshot is given below,

Phantom JS Crashed image

Could anyone tell me how to resolve this issue?

2
  • 1
    A quick web search indicates that the error code is an access violation. This suggests that you might do better if you restart your machine to clear out any problems with memory access. You may also want to consider exiting/restarting your browser more often.
    – Kate Paulk
    Commented Aug 22, 2017 at 18:48
  • 1
    It looks like you tried to use a value that was fetched in test 388 but it came back empty.
    – Amias
    Commented May 21, 2018 at 14:23

1 Answer 1

2

PhantomJS notoriously has a lot of memory issues and will crash after a certain amount of memory use. I have dealt with this issue by splitting up the tests into separate phantom processes rather than all in one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.