# How to add unit tests for verse code

**URL:** <https://forums.unrealengine.com/t/how-to-add-unit-tests-for-verse-code/1187146>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [June 2, 2023, 10:00pm UTC](https://forums.unrealengine.com/t/how-to-add-unit-tests-for-verse-code/1187146 "2023-06-02T22:00:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![latundaPC](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/latundapc/32/1068800_2.png) [@latundaPC](https://forums.unrealengine.com/u/latundaPC)\
**Post date:** [June 2, 2023, 10:00pm UTC](https://forums.unrealengine.com/t/how-to-add-unit-tests-for-verse-code/1187146/1 "2023-06-02T22:00:51Z")

</div>

How can we cover code in our devices with unit-tests? How can we run tests?

---

<div class="post-metadata">

**Author:** ![OB1\_canbeno](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@OB1\_canbeno](https://forums.unrealengine.com/u/OB1_canbeno)\
**Post date:** [June 2, 2023, 11:03pm UTC](https://forums.unrealengine.com/t/how-to-add-unit-tests-for-verse-code/1187146/2 "2023-06-02T23:03:41Z")

</div>

If I were so inclined, I would probably write a function called UnitTest(). Inside it …

For all functions under test: call the function (covering all cases), take the result. Record the success/failure of the test, in the Log presumably.

Then call UnitTest()

Then check the Log and move on or debug accordingly.

That is how we can.

André
