Is it possible to use the unity test runner for integration tests with dlls?
We are working on a C# solution that is not located in the Unity Assets folder but instead build the dlls of our projects in Assets/Binaries.
While trying to get the test runner working with our project I encountered some problems. Firstly, I am not able to get the test runner to recognize tests written in our project and compiled in a dll. * We tried overcoming this by creating a test script via the test runner and linking them in our project, but this led to an "imported type nunit.framework. ... is defined multiple times" error, as our project and Unity both use NUnit.
Secondly, we are using a dependency injection framework(Zenject) and we want to use the unity test runner for running Integration tests and the setup for each test script becomes very complicated. Do you have any tips on how to better use the test-runner for Integration tests? So, we would like to know if it is possible to run a test compiled inside of a dll, where a specific scene is used and scene changes can occur. If yes, the question would be how to best implement it. If it isn't possible, the question is how to best make use of the test runner for Integration tests.
Thank you in advance for any help with this!
Unity version: 2018.2.5f1 for Ubuntu 18.04 LTS Working in Rider
Answer by aesir_silcore3 · Aug 23, 2019 at 09:10 AM
An update from my side: The NUnit.Framework problem occurred because we are copying our references to Unity. So this problem we can fix now in our project.
Still, it would be good to know if there is a way to discover tests, that are compiled in dlls, with the test runner.