Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration tests #50

Closed
kappsegla opened this issue Feb 7, 2023 · 1 comment · Fixed by #167
Closed

Integration tests #50

kappsegla opened this issue Feb 7, 2023 · 1 comment · Fixed by #167

Comments

@kappsegla
Copy link
Contributor

Since the application is a server application we would like some integration tests that can run to verify the behavior of the whole app. Starting a server and verifying that it accepts socket connections.
But also tests for the individual functions that have been implemented. These command tests could be implemented in advance and ready to activate when the command is implemented. Or create some sort of template example test that can be copied and implemented by the assigneess implementing the command function.

I see at least two possibilities for starting the server. One option is to run it as a java application. What can be a bit problematic then is the server port. If the server tries to start and fails because the server port is already used our tests will fail. Therefor we should probably start the server on a random unused port. That can be done by using 0 as port number but how do we find out which port to connect to from our tests then.
Another option could be to use Testcontainers and actually build an image from Dockerfile and run that as a docker container?

@BobHogvall
Copy link
Contributor

Might be preferable to put this in its own class, since we have a lot of tests. Just a reminder that the class name should end with "IT", since this will also simplify the process of running it with maven and such.

@kappsegla kappsegla linked a pull request Mar 4, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants