java/src/main/resources/targets/claude/skills/conditional/test/x-test-smoke-socket/SKILL.md
Runs automated smoke tests against the TCP socket server using a standalone Java client with message framing and protocol validation.
npx skillsauth add edercnj/ia-dev-environment x-test-smoke-socketInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Orchestrate black-box smoke tests against the application's TCP socket server using a standalone Java client. The client speaks the real wire protocol with proper message framing (length-prefix header). Tests validate that the server correctly receives messages, processes them, and returns valid responses over persistent TCP connections.
Include this skill when smoke_tests is enabled AND "tcp-custom" is in protocols.
/x-test-smoke-socket -- run all scenarios against local environment/x-test-smoke-socket --k8s -- run with automatic port-forward (orchestrator)/x-test-smoke-socket --k8s --scenario echo -- run specific scenario/x-test-smoke-socket --host 10.0.0.1 --port 8583 -- run against custom host/port| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| --scenario | String | No | all | Scenario: echo, request-approved, request-denied, malformed, persistent, all |
| --k8s | Flag | No | false | Enable automatic port-forward for HTTP and TCP ports |
| --host | String | No | localhost | Target server hostname |
| --port | Integer | No | (configured) | Target server TCP port |
cd smoke-tests/socket && {{BUILD_COMMAND}}java --versionsmoke-tests/socket/target/Poll HTTP health endpoint:
Execute Java client JAR:
--scenario flag (default: all)--host and --port for target serverAutomatic via trap EXIT:
| Scenario | Flag | Description |
|----------|------|-------------|
| Echo/Ping | echo | Basic connectivity and response validation |
| Request Approved | request-approved | Standard request with successful response |
| Request Denied | request-denied | Request triggering a denial/error response |
| Malformed Message | malformed | Invalid bytes, expects error response |
| Persistent Connection | persistent | Multiple messages on same TCP connection |
| All | all | Runs all scenarios sequentially |
| File | Description |
|------|-------------|
| smoke-tests/socket/pom.xml | Client build file (executable JAR) |
| smoke-tests/socket/src/ | Java client source code |
| smoke-tests/socket/x-test-smoke-socket.sh | Execution script |
SmokeTestRunner -- Main class: arg parsing, scenario dispatch, result aggregationSmokeSocketClient -- TCP client wrapper with length-prefix framing (send/receive)SmokeScenario -- Sealed interface for scenario implementationsScenarioResult -- Record: pass/fail + message| Scenario | Action |
|----------|--------|
| JAR not found | Suggest build command: cd smoke-tests/socket && {{BUILD_COMMAND}} |
| Connection refused (TCP) | Suggest using --k8s flag or starting app manually |
| Connection refused (HTTP) | Check orchestrator service status |
| Unexpected response | Suggest checking application logs for protocol or logic bugs |
| Message parse failure | Suggest verifying length-prefix and encoding config |
testing
Scaffolds a Helidon SE/MP service with routing, health, config, Dockerfile, and tests.
tools
Generates a Picocli @Command with subcommands, options, converters, and unit tests.
testing
Scaffolds a Micronaut service with @Controller, DI, health, Dockerfile, and tests.
testing
Scaffolds a Helidon SE/MP service with routing, health, config, Dockerfile, and tests.