質問

I had initial problems loading the goinstant libraries in PhantomJS via Selenium. I was wondering what is preferred method of writing integration tests for the client code is.

役に立ちましたか?

解決

Testing should work fine with either Selenium and any supported browsers, or PhantomJS. At GoInstant, we use both real browsers and phantomjs internally, along with mocha as our test harness to exercise javascript logic.

Make sure that if your tests are looking for specific elements on a page that are populated or influenced by GoInstant, you either retry your test on a timeout, or trigger a callback once you've initialized GoInstant, as the initialization might take enough time after page load to confuse a test.

If you're having a specific issue with PhantomJS, Selenium, and GoInstant, consider posting another question on StackOverflow with a code example, or at https://goinstant.com/support

Disclosure: I work for GoInstant

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top