#Setting up Testing Environment

1 messages · Page 1 of 1 (latest)

dawn fractal
#

I've been working on some Bukkit and CraftBukkit changes. I want to make 100% sure that it would work if someone wanted to develop a plugin with these new features. I've developed my share of plugins, and I just want clear steps how I can set this environment up. This way I can create a test plugin with my new changes and test if the features work properly with my own test server as well.

Sorry if this feels very newbie but I'm more of a full-stack dev and this is a new forte for me lol.

#

Edit: I'm specifically just expanding a part of the API. I've done some unit testing, but a dummy server isn't enough to test certain things.

wary urchin
#

What exactly are you trying to achieve

#

Integration test, or just unit tests?

#

Or trying to emulate the server to run some specific tests?

dawn fractal
#

basically integration testing, i need to make sure that the bukkit api is being properly implemented on craftbukkit, and that if i were to make a plugin with the api, it would do as expected in its implementation. if that makes sense.

#

for example: i extend the api for a player event, and i want to test the event in an actual server, with a plugin to know the event is being fired and that im getting the proper information

#

also im just assuming this is how i could do it, but if theres an official way to go about testing changes, please let me know. all i know is that there's junit5 but this doesnt seem to efficient enough to test real implementation and player related stuff.

dawn fractal
#

@wary urchin

wary urchin
#

use mockbukkit

#

or the paper variant

#

but yea

dawn fractal
#

@wary urchin sorry but im still really confused, i need a clear explanation, sorry to bother

proven lotus
#

So you are trying to contribute to Bukkit ?

#

Mockbukkit and the likes are for plugin development. If you are about to propose changes to Bukkit itself, try to cover as much as feasible with unit tests. Server specific stuff is usually done via just a small test plugin maintained locally

dawn fractal
#

i have a PR currently but i want to test with an actual plugin locally like you said

#

i was just tryna understand how to go about that step

tender gazelle
#

hmmm it seems to me you're scared there will be bugs you won't catch

dawn fractal
#

yea p much i want to see if something goes wrong in a live environment

#

just to feel confident