Closed jtanningbed closed 7 years ago
I see, you can try running Chrome in headless mode (use headless option). PhantomJS's browser engine is not that up to date and may have issues with some websites. Another reason is websites are not tested during development to work on automated browsers such as PhantomJS, so some websites will behave in unexpected ways with PhantomJS.
From your original flow file, TagUI generates a CasperJS script. You can see if you are able to tell at which section PhantomJS crashes and raise an issue with CasperJS or PhantomJS repo, since what TagUI does in default mode is translate the natural english syntax into CasperJS JavaScript code for consumption by PhantomJS - https://github.com/casperjs/casperjs/issues
UPDATE - forgot to add that for normal cases where it is public website, you can provide the flow steps to replicate. But since it is a local web service, outsiders can't replicate and test. For web services testing, you can also take a look at https://www.getpostman.com
I see. running Chrome in headless mode works fine. If the PhantomJS crash persists, will I be unable to use CasperJS to interact and test assertions?
Yes, the 30+ test assertions from CasperJS have no access to the Chrome browser. For Chrome non-testing mode I built internal integration in TagUI to communicate with Chrome browser.
The most likely cause is incompatibility of PhantomJS engine with the web service you are testing. As PhantomJS has stopped maintenance, there won't be a fix that can be done over there.
Closing this as per above conclusion. Created #63 to experiment with extending check step to automatically become test assertions when test option is used, so that general assertions and CI can work with Chrome.
Not sure if it's appropriate to report here or in PhantomJS repo. I do not get this issue when I run on chrome. When I try to run headless mode using integrated PhantomJS and CasperJS, I get a PhantomJS crash that does not log anything useful.
PhantomJS has crashed. Please read the bug reporting guide at http://phantomjs.org/bug-reporting.html and file a bug report.>
I'm quite unfamiliar with js and headless browser testing so I do not even know where to begin to debug the issue. Running in debug mode does not provide much additional context. It seems the crash always occurs after a navigation request and that I am hitting 302 redirects shortly before the crash. I am testing locally on a web service in network.