py-mine / mcproto

Library providing easy low level interactions with minecraft protocol

Home Page:https://mcproto.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add integration tests

ItsDrike opened this issue · comments

Currently, we're only using unit tests, which, as the name would suggest, only test the code in individual "units". This means that while we do make sure that the individual components of our code-base work on their own, we don't test that they work properly together.

Adding integration tests would mean for example adding in a workflow, which either connects to a well established server that we trust will always remain online, or spinning up the minecraft server within that workflow (probably via docker), and testing the interactions like that.

Ideally, we should be spinning up our own server, as that allows us to see the console output as well, allowing us to test not only that we've obtained the correct information on mcproto side, but also that for example a player join was handled normally and there aren't any unexpected logs in the console.

Another major reason to use our own server is that with popular servers that we could trust to remain online, we would need to use an official minecraft account, which would be connecting to this server, and performing various automated actions, which this server likely wouldn't like. The only realistic and viable option with these existing servers would be to test obtaining a status response.