# Server Runtime Testing with Golang

**URL:** <https://forum.heroiclabs.com/t/server-runtime-testing-with-golang/4009>\
**Category:** Runtime Framework\
**Tags:** server-framework, golang\
**Created:** [July 4, 2023, 12:24pm UTC](https://forum.heroiclabs.com/t/server-runtime-testing-with-golang/4009 "2023-07-04T12:24:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BernardoSantos](https://avatars.discourse-cdn.com/v4/letter/b/a87d85/32.png) [@BernardoSantos](https://forum.heroiclabs.com/u/BernardoSantos)\
**Post date:** [July 4, 2023, 12:24pm UTC](https://forum.heroiclabs.com/t/server-runtime-testing-with-golang/4009/1 "2023-07-04T12:24:19Z")

</div>

Hey!

Is there any guide regarding testing with Golang similar to what exists for typescript: [Heroic Labs Documentation | Testing TypeScript Server Runtime Code with Jest](https://heroiclabs.com/docs/nakama/guides/server-framework/typescript-testing/#writing-the-first-test)

For example how would one test the ResetLeaderboards endpoint that gets triggered when leaderboards expire.

---

<div class="post-metadata">

**Author:** ![sesposito](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sesposito/32/2594_2.png) [@sesposito](https://forum.heroiclabs.com/u/sesposito)\
**Post date:** [July 6, 2023, 1:35pm UTC](https://forum.heroiclabs.com/t/server-runtime-testing-with-golang/4009/2 "2023-07-06T13:35:21Z")

</div>

Hello @BernardoSantos,

You’d need to implement a function with the same interfaces that [RegisterLeaderboardReset](https://github.com/heroiclabs/nakama-common/blob/master/runtime/runtime.go#L354) receives and mock all the arguments in your unit test.

As suggested [here](https://forum.heroiclabs.com/t/go-rpc-functions-testing/3976/3) you could use some Go library to generate the mocks.

Best.
