New question on test execution

I have a simple test to skeleton project in spring framework
export default function() {
When I execute the test docker-compose run k6 run /tests/02-stages/skeletonProject.js
I see an error message : error=“Get http://localhost:8080/hello: dial tcp connect: connection refused”


Hi, welcome to the forum!

This is a standard connection error unrelated to k6. Since you’re running inside a Docker container, and if the service you’re testing is exposed on the host network, you’ll need to access it via the Docker bridge interface, run with --net=host, or run the service itself from another container part of the same Compose stack.

See the answers on this SO question for details and other suggestions.

Good luck!

Thanks for the response Imiric.