Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Resolved How to run unit tests from Rider?

Discussion in 'Testing & Automation' started by YuriyVotintsev, Jul 2, 2023.

  1. YuriyVotintsev

    YuriyVotintsev

    Joined:
    Jun 11, 2013
    Posts:
    93
    I am trying to launch unit tests from rider using Edit & Play Mode launcher. First time i'm running tests it completes all test, but stuck at this state:
    upload_2023-7-2_23-16-4.png

    It never ends and i can't run tests second time. Stop button do nothing. If i close "All tests from Solution" and try to start all tests from Explorer - all test stuck in Pending state forewer.

    I tried unity 2021, 2022, 2023, Unity test framework 1.1.27 and 2.0.1. Tried to change .net standard to .net framework. I have Rider 2023.1.1 Build #RD-231.8770.54 (but some older versions since 2021 don't work too). Jetbrain Rider Editor plugin is 3.0.24. So everything is fresh.

    This problem is with me for two years (I used to use unity test runner), so many older version of unity, rider, rider editor plugin and other stuff combinations was not work for me.

    What am i doing wrong?
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    7,008
    Update to Rider 2023.2 EAP. It fixes the test run issue.

    But there is an easier way: just do not use „Edit & Play Mode“. Set it to run either edit or play mode tests, and switch manually when you have to. That way it never got stuck for me.
     
  3. YuriyVotintsev

    YuriyVotintsev

    Joined:
    Jun 11, 2013
    Posts:
    93
    Thank you. Setting only Edit or only Play mode don't help in current version. But 2023.2 EAP works like a charm. So question is closed.