简体   繁体   中英

zombie.js and socket.io (node.js)

I would like to test my node.js/socket.io application using the zombie.js headless browser.

Unfortunately when the zombie.js app connects to my app it reports a load of connection/disconnection events.

Eg.

Zombie: Firing timeout 234, delay: 1000
Zombie: GET http://localhost:8000/socket.io/1/?t=1313487267750&jsonp=68
Zombie: GET http://localhost:8000/socket.io/1/?t=1313487267724&jsonp=69
connected
connected
connected
Zombie: Firing timeout 237, delay: 2000
Zombie: Firing timeout 226, delay: 16000
Zombie: Firing timeout 218, delay: 25000
disconnected

It seems Zombie doesn't respect timeout delays, so I wonder if this could be a cause?

Has anyone tried using zombie with socket.io or can tell me why zombie seems to fire timeouts immediately rather than waiting the stated time?

To wrap this up: I used Phantomjs as recommended by @Raynos which works nicely.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM