+4 votes

How do people have Unit Testing set up for C#?

Godot Mono seems to crash on windows if I add a Testing subproject to the solution.
It doesn't crash on Mac though.

If I add NUnit Tests directly to the existing project, the runner can't seem to find the tests.

How are other people setting this up?

in Engine by (26 points)

2 Answers

+2 votes

Follow this: https://docs.microsoft.com/fr-fr/visualstudio/test/walkthrough-creating-and-running-unit-tests-for-managed-code?view=vs-2019

And add the two .dll you can find in root://.mono/assemblies as dependencies of your test project. It should work correctly.

by (18 points)
+2 votes
by (58 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.