-1

Can I send a ping request by k6, does it possible?

I know k6's websocket can send a ping request, but it is ws ping and it only support ws and wss.

Or how can I execute a shell script?

Yang
  • 389
  • 2
  • 15
  • Looks like k6 is built on ordinary node.js. In that case, [this thread](https://stackoverflow.com/q/4737130/1048572) should answer both your questions. – Bergi Jan 30 '18 at 10:16
  • @Bergi Thank you. [npm modules](https://docs.k6.io/docs/modules) should help. – Yang Jan 30 '18 at 10:47
  • k6 is not built on node.js, it's a distinct JS execution environment with a different set of APIs from that of nodejs. That said, it does support some node.js modules, namely those that can be "browserified". – Robin Gustafsson Jan 30 '18 at 14:44
  • @Yang, may I ask what your use case is? – Robin Gustafsson Jan 30 '18 at 14:53
  • @RobinGustafsson Just want to run an example ... I can use `http.get` to replace it. – Yang Jan 30 '18 at 16:07
  • k6 looks great and JavaScript looks cool, but I expect it works like go or ruby. I think that will make k6 more handy. – Yang Jan 30 '18 at 16:13

1 Answers1

0

There's currently no builtin support for pings or other parts of the ICMP protocol in k6, and it's not possible to execute a shell command or script from a k6 script either.