hello! I would like to create some custom integrat...
# gradle
d
hello! I would like to create some custom integration test using Gradle but unsure if that is possible - basically I need to: • start up 2 Spring Boot apps (graphql servers) • once they are up - start node app (graphql gateway) • once everything is up post HTTP request to the node app and verify response • stop all apps I know this most likely would be pretty messy but would love to run such integration test during our CI to ensure the libraries used by SpringBoot apps produce valid results that can be consumed by the node app. Alternative would be to the same with Github Actions but unsure if single action can spawn multiple processes. Any suggestions?
guess since I cannot guarantee whether node is available on the target system I guess Github Actions are the way to go
c
You could do this easily enough using docker compose. There are several gradle plugins which can help with that. E.g. in my work project we're starting a dockerized database for tests via dcompose plugin when running integration tests on developers' machines, and when running on CI instead of gradle plugin we just have a pipeline step in Jenkinsfile do it before running the tests.
☝️ 2
s
I track node availability with…
Copy code
echo "Waiting local server to start"
    while [ -z "$(lsof -i :${LOCALHOST_PORT} | grep LISTEN)" ]; do 
        sleep .5
    done
    echo "Local server is ready"
d
thanks, might give it a shot