与 InternJS 一起使用时的幻影 JS 配置

phantom JS configuration when used with InternJS

我想将 phantomJS 与 Intern 一起用于功能测试。

但我一直收到错误

intern-runner config=tests/intern  
Listening on 0.0.0.0:9000  
Tunnel started  
Suite phantomjs on any platform FAILED  
UnknownError: [POST http: //localhost:4444/wd/hub/session / {"desiredCapabilities":{"browserName":"phantomjs","name":"tests/intern","idle-timeout":60}}] An unknown server-side error occurred while processing the command.

实习生。

和错误

[ERROR - 2015-10-14T10:14:35.611Z] RouterReqHand - _handle.error - {"message":"{
\"headers\":{\"Connection\":\"close\",\"Host\":\"localhost:4444\",\"accept\":\"a
pplication/json,text/plain;q=0.9\",\"content-length\":\"91\",\"content-type\":\"
application/json;charset=UTF-8\",\"user-agent\":\"dojo/2.0.0-dev Node.js/4.1.2\"
},\"httpVersion\":\"1.1\",\"method\":\"POST\",\"url\":\"/session\",\"urlParsed\"
:{\"anchor\":\"\",\"query\":\"\",\"file\":\"session\",\"directory\":\"/\",\"path
\":\"/session\",\"relative\":\"/session\",\"port\":\"\",\"host\":\"\",\"password
\":\"\",\"user\":\"\",\"userInfo\":\"\",\"authority\":\"\",\"protocol\":\"\",\"s
ource\":\"/session\",\"queryKey\":{},\"chunks\":[\"session\"]}}","name":"Missing
 Command Parameter","line":85,"sourceId":65775352,"sourceURL":":/ghostdriver/req
uest_handlers/session_manager_request_handler.js","stack":"Missing Command Param
eter: {\"headers\":{\"Connection\":\"close\",\"Host\":\"localhost:4444\",\"accep
t\":\"application/json,text/plain;q=0.9\",\"content-length\":\"91\",\"content-ty
pe\":\"application/json;charset=UTF-8\",\"user-agent\":\"dojo/2.0.0-dev Node.js/
4.1.2\"},\"httpVersion\":\"1.1\",\"method\":\"POST\",\"url\":\"/session\",\"urlP
arsed\":{\"anchor\":\"\",\"query\":\"\",\"file\":\"session\",\"directory\":\"/\"
,\"path\":\"/session\",\"relative\":\"/session\",\"port\":\"\",\"host\":\"\",\"p
assword\":\"\",\"user\":\"\",\"userInfo\":\"\",\"authority\":\"\",\"protocol\":\
"\",\"source\":\"/session\",\"queryKey\":{},\"chunks\":[\"session\"]}}\n    at :
/ghostdriver/request_handlers/session_manager_request_handler.js:85\n    at :/gh
ostdriver/request_handlers/session_manager_request_handler.js:44\n    at :/ghost   
driver/request_handlers/router_request_handler.js:70","stackArray":[{"sourceURL"
:":/ghostdriver/request_handlers/session_manager_request_handler.js","line":85},
{"sourceURL":":/ghostdriver/request_handlers/session_manager_request_handler.js"
,"line":44},{"sourceURL":":/ghostdriver/request_handlers/router_request_handler.
js","line":70}]}

在 phantomjs - 这个错误出现在 运行 实习生-运行ner- 之后。

有人知道问题出在哪里吗?

p.s。我正在使用 phantomJS v.1.9.8


tests/intern :  

define({
proxyPort: 9000,
proxyUrl: 'http://localhost:9000/',
environments: [
    { browserName: 'phantomjs' }
],
maxConcurrency: 3,
useSauceConnect: false,
loaders: {
  'host-browser': 'node_modules/requirejs/require.js'
},
tunnel: 'NullTunnel',
functionalSuites: [ 'tests/functional/modetest' ],

});

PhantomJS 1 很古老(它使用 2012 年的 WebKit 版本)并且不受支持。您必须将 PhantomJS 2+ 与实习生一起使用。