How to create Unit tests and evaluate them in a plugin

Hello everyone !

Recently i have been creating a VR Plugin for a very easy task. I managed to make the API/Plugin interaction as small as possible to get only structured data with the goal to have a cleaner API, especially a testable API.

My plugin is structured the same way most are on the internet, it is a repository with the .uplugin folder at it’s root. It is really handy because i can make git submodules to integrate my plugin in projects and with minimal effort it will still work on our CI test and build plateform.

After some time I realised that a .uplugin is not a project and very few things can be done with it. In particular, even if I created tests I wouldn’t be able to run them in my Plugin-Repository specifically.

I found this outdated and unanswered post with the same issue (How to do unit test on a plugin module?).
One lead I found (if ou have another solution, I am very very interesed !) :

However I saw that when you package your project from Command Line (Windows > Bat > RunUAT > BuildPlugin), a “Hostproject” is created to build the plugin inside of the output folder, then deleted and replaced with the build files.

I was wondering if there was a way to do something similair where a hostproject is created, tests are being run and then everything is deleted ?
Is there a way to edit the way the plugin package is being executed to run tests beforehand ? Event if not ideal, I would still be able to execute then on the CI server.

Thanks in advance !
(Don’t forget to have a Wonderful day !)