Hello,
I am new to Unit Testing. I was trying to enable Test Runner in existing project. So I created “Tests” folder with assembly definition (AD) file and checked only “Editor” in “Included Platforms”. Then to be able to access the scripts, I added another AD to “Scripts” folder and this time checked “Editor, Andorid, iOS”. Then I got couple of missing references so I had to create two more “GoogleMobileAds.asmdef” and “PlayerPrefsEditor.asmdef” with the same three platforms and reference them from “Scripts.asmdef”. That resolved the issues in Unity Editor and I was able to create couple of Test/UnityTests.
However, when I tried to compile project for Andorid platform, I got different errors. They were all related to “Editor” subfolders inside “GoogleMobileAds” and “PlayerPrefsEditor” folders. So I created another AD inside those “Editor” folders and checked only “Editor” as “Included Platforms”.
**Question #1: Is that proper way to do it? (**for every “Editor” folder)
Answer: Yes, that’s how it should be done.
Then I finally compiled app and uploaded it to device, everything worked fine with exception of AdMob ads. I was using TestAds (ca-app-pub-3940256099942544/5224354917) so they should work all the time. However, I was getting “OnAdFailedToLoad” with “No fill” error message. I tried to manually add “Google.Play.Common.asmdef” to “Assembly Definition References” for “GoogleMobileAds.asmdef” but it did not help.
Question #2: How should I fix the issue with AdMob?
Answer: Using assemblies do not cause this bug. The test ads are not working in both Development Build and Release. The real ads are working ONLY in Release but not in Development Build. I tried to use both Mono and IL2CPP as Scripting Backend and to do “Android Resolver / Force Resolve”. Nothing helped but since actual ads are working, I am skipping this for now.
Question #3 (optional): How to check what other features stopped working?
Answer: As far as I understood, if some script is missing for some platform (you may not see error in Editor), you will get an error message when you will start building for that platform. If app was successfully built then everything is fine with assemblies and if issue remains it could be related to something else.
Thank you in advance for your tips and help


