Search Unity

Bug Running tests sets "Run in background" and "Error Pause" but does not revert

Discussion in 'Testing & Automation' started by Arkade, Oct 21, 2019.

  1. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    655
    Hi
    The value of both "Run in background" and "Error Pause" get set by running tests but not changed back afterwards. The former is enabled (please leave it alone or restore it) and the latter gets disabled (again I expect it left alone / restored). I haven't investigated whether other things are being fiddled with. This seems to happen regardless of whether tests pass or fail.
    I noticed the prior while reading commit diffs and the latter when confused by error and realising an NRE had occurred without pausing.
    Unity 2019.3.0b7 + Test Framework 1.1.3
    Thx
     
  2. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    Looking at the code, this is what happens in PlaymodeLauncher.cs:

    upload_2019-10-21_14-14-5.png

    I don't see this getting reset to the original values.
    If you are using the package, you can modify the code to fix this issue yourself (see my post on how to easily do this).
     
  3. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    655
  4. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    655
    OK, so my "easily" might have been premature!
    Got frustrated with the error thing and decided to do it but while I seem to be able to fix the ErrorPause, RunInBackground doesn't keep its 'original' value. I've attached my patch in case you can see the (likely) dumb mistake :)
    (sorry if it's a bad patch -- created from Rider local history then hacked slightly. Unity-integral packages obviously not in VCS!)
     

    Attached Files: