Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Toggling "Enable PlayMode Tests for All Assemblies" From Command Line?

Discussion in 'Testing & Automation' started by jramsey_cs, Oct 25, 2019.

  1. jramsey_cs

    jramsey_cs

    Joined:
    Apr 19, 2017
    Posts:
    1
    Hello,

    My current understanding is that in order to use PlayMode tests, your AppCode needs to be able to be built into a separate assembly (that the PlayMode Test Assembly can then reference) and it cannot reference the Assembly-CSharp.dll?

    Our current app is quite big and trying to move to a custom-defined assembly solution would require restructuring of our current codebase, so I was hoping that there might be an easier way to do this.

    I'm able to get PlayMode tests running if I check the "Enable PlayMode Tests for All Assemblies" setting in the Test Runner, and I was wondering if it would be possible to toggle this from the command line?
    - The thought then would be to toggle this off when running a production build (along with #if blocks around our playmode test code)
    - And then run a separate build with the toggle on that would run include the PlayMode assemblies and run the PlayMode tests

    Thanks for any Help!
     
  2. Streamfall

    Streamfall

    Joined:
    Aug 8, 2011
    Posts:
    43
    Any update on how you went about this?