https://github.com/hyperspace-metaverse/xk6-socketio
K6 extension for Socket.IO support
https://github.com/hyperspace-metaverse/xk6-socketio
k6 k6-extension socket-io xk6 xk6-extension
Last synced: 2 days ago
JSON representation
K6 extension for Socket.IO support
- Host: GitHub
- URL: https://github.com/hyperspace-metaverse/xk6-socketio
- Owner: Hyperspace-Metaverse
- License: gpl-3.0
- Created: 2025-05-28T10:07:49.000Z (about 1 month ago)
- Default Branch: master
- Last Pushed: 2025-05-28T16:36:12.000Z (about 1 month ago)
- Last Synced: 2025-05-28T17:46:40.945Z (about 1 month ago)
- Topics: k6, k6-extension, socket-io, xk6, xk6-extension
- Language: Go
- Homepage:
- Size: 41 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# xk6-socketio
This is a k6 extension for Socket.IO support, allowing you to load test Socket.IO servers with k6.
## Build Instructions
You can build a custom k6 binary with this extension using [xk6](https://github.com/grafana/xk6):
### Prerequisites
- [Go](https://golang.org/dl/)
- [Docker](https://www.docker.com) or a compatible container runtime
- [xk6](https://github.com/grafana/xk6) (optional. If not present, building with `Make` will default to using a Docker container to build the k6 binary)
- Make (optional, for convenience)### Build with xk6
```sh
xk6 build --with github.com/Hyperspace-Metaverse/xk6-socketio=.
```Or use the provided Makefile:
```sh
make build
```This will produce a `k6` binary in the project directory.
## Test
### Unit Tests
Run the unit tests using the following command:
```sh
make test-unit
```To see coverage reports, you can run:
```sh
make coverage
```### Integration Tests
Run your k6 test script (see `examples/`) with the custom k6 binary:
```sh
./k6 run examples/basic.js
```Or:
```sh
make test-k6 TEST=examples/basic.js
```You can also build, run `docker compose` and run a test using Make:
```sh
make run-all
```For more advanced usage, run:
```sh
make help
```## Examples
See the `examples/` directory for usage scripts, including `basic.js` and `advanced.js`.
## Contributing
Feel free to open issues or pull requests to improve this extension.
## License
Copyright (c) 2025 Hyperspace Metaverse
[https://hyperspace.mv](https://hyperspace.mv)This project is licensed under the GNU General Public License v3.0 (GPL-3.0). See the LICENSE file for details.