How to organize files and scene for testing?

I’m a bit annoyed with the way the default organization works, I’d like to get some feedback to see if I’m doing things wrong or something. Basically I have some test scenes that are set up as part of my unit testing. In the scene I have specific monobehavours that just exist to facilitate the test happening in that scene, as well as the monobehavours I want to actually test. Then I have actual test code in my “Tests/” folder that run the scene and do various asserts to make sure everything is working correctly

The way unity by default sets up the main assembly is that only files in the “Scripts/” folder will be included. Then the test assembly includes the files in “Tests/”. But then I have the actual scene files in the “Scenes/” folder.

So my files are split across so many different places:

  1. test specific monobehaviours in my “Scripts/” folder

  2. scene objects in “Scenes/”

  3. test code in “Tests/”

  4. monobehaviours that I want to actually test in my “Scripts/” folder

its kind of annoying keeping track of this, the test set up is split across 4 different places. What I would like to do is something like this:

Scripts/
- monobehaviours to test
Tests/
- testAssembly
- TestCase1/
-- TestScene
-- TestSpecificMonobehviours
-- TestCode

Where all my test specific code is inside the test assembly, and co-located with the test scene, and test specific monobehaviours etc. However when I do this, I get the following error message when I try to put the TestSpecificMonobehaviour into my scene “the script is an editor script.”

Is this not allowed somehow? The script is not an editor script, its a Monobehviour and its not in the “editor/” folder. Is there a different recommended way to organize these files so I can keep them together and still comply with whatever requirements unity has?