You can run your function locally and test it using crossplane beta render
with these example manifests.
# Run the function locally
$ go run . --insecure --debug
# Then, in another terminal, call it with these example manifests
$ crossplane beta render xr.yaml composition.yaml functions.yaml