question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WebSockets tests fail to run if using loop

See original GitHub issue

Steps to reproduce:

  1. Create a websockets test with loop construct (example attached test2.txt)
  2. Run it

Actual result: test run fails with an error Console output:

C:\Users\akir>artillery run C:\arttest\test2.json
Log file: artillery_report_20160729_124845.json
Phase 0 started - duration: 60s
 -C:\Users\akir\AppData\Roaming\npm\node_modules\artillery\node_modules\artillery-core\lib\engine_util.js:45
    newContext.vars.$loopCount = i;
                               ^

TypeError: Cannot set property '$loopCount' of undefined
    at aLoop (C:\Users\akir\AppData\Roaming\npm\node_modules\artillery\node_modules\artillery-core\lib\engine_util.js:45:32)
    at fn (C:\Users\akir\AppData\Roaming\npm\node_modules\artillery\node_modules\async\lib\async.js:746:34)
    at C:\Users\akir\AppData\Roaming\npm\node_modules\artillery\node_modules\async\lib\async.js:1213:16
    at C:\Users\akir\AppData\Roaming\npm\node_modules\artillery\node_modules\async\lib\async.js:166:37
    at C:\Users\akir\AppData\Roaming\npm\node_modules\artillery\node_modules\async\lib\async.js:706:43
    at C:\Users\akir\AppData\Roaming\npm\node_modules\artillery\node_modules\async\lib\async.js:167:37
    at C:\Users\akir\AppData\Roaming\npm\node_modules\artillery\node_modules\async\lib\async.js:1209:30
    at WebSocket.<anonymous> (C:\Users\akir\AppData\Roaming\npm\node_modules\artillery\node_modules\artillery-core\lib\engine_ws.js:71:14)
    at emitNone (events.js:67:13)
    at WebSocket.emit (events.js:166:7)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Elringuscommented, Oct 11, 2016

Well, that’s sad: testing ws without variables and loop features is a pain 😦 Maybe put a warning to the docs, so people would be aware ws lacks some core features, before attempting to use the library…

0reactions
hassycommented, Dec 1, 2016

@raghavendra-annakula are you using artillery-core from master?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I avoid the loop argument - Stack Overflow
Firstly, I am getting a deprecation warning on the app = web.Application(loop=loop) statement: The recommended way to avoid passing around ...
Read more >
1655372 - Websockets fails to connect and enters a ...
If network.http.spdy.websockets is set to false, the WebSocket connection test works correctly without any problems with the same HTTP/2 TLS web proxy. Expected ......
Read more >
Testing WebSockets - Artillery.io
This page covers WebSocket testing functionality in Artillery provided by the built-in WebSocket engine. Enabling WebSocket support​. To use the WebSocket ...
Read more >
WebSockets - Grafana k6
When the WebSocket connection is created, the run function will be immediately called, all code inside it will be executed (usually code to...
Read more >
Advanced → WebSockets - Vapor Docs
Use the webSocket method like you would use get or post . ... to the send method to be notified when the message...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found