Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Resolved Editor Test Runner does nothing from the command line

Discussion in 'Testing & Automation' started by joaopccosta, Jan 25, 2016.

  1. joaopccosta

    joaopccosta

    Joined:
    Nov 4, 2012
    Posts:
    4
    Hi everyone

    I am having problems with the Editor Test Runner with the latest Unity 5.3 version.
    I have unit tests which ran just fine from the command line with Unity Test Tools in Unity 5.0. But now with the latest version, when I run the editor tests from the command line (as per this link), nothing happens... The editor opens and literally nothing happens.

    I should also mention that the same tests run just fine from inside the editor in the Test Runner, which makes this problem even more strange.

    Cheers,
    JC
     
  2. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    How are you running the tests? what is the exact command line you're using?

    Also, are the tests run locally on your machine, or on a build server? do you have the build log to see what was executed and whether it contains any useful info ?
     
  3. joaopccosta

    joaopccosta

    Joined:
    Nov 4, 2012
    Posts:
    4
    Back with 5.0 it used to run just fine on the build server (Jenkins build).

    At the moment I was testing locally to check what is wrong.

    I have an alias to the Unity app (running on mac os at the moment) and this is how I am trying to run the tests.
    I have also gave it a shot on windows but the same result happens.

    I get no test results xml after running the command. :/

    Thanks for your reply!
     
  4. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    Did you check out the Unity editor log? when you launch it (even from command line) it should generate a log file. That may contain some useful information as to what happened (it's especially easy to check it out if you're testing on the local machine).

    Check this link for paths of the log file per platform: http://docs.unity3d.com/Manual/LogFiles.html
     
  5. joaopccosta

    joaopccosta

    Joined:
    Nov 4, 2012
    Posts:
    4
    Hi again,

    I did check the Editor.log file (see here) and I did not find anything suspicious. :/

    Cheers!
     
  6. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    Actually the log mentions this;
    Running editor test from the project requires batch mode.

    Consider adding the -batchmode argument (not sure why this has worked before and why it is broken now...)
     
  7. joaopccosta

    joaopccosta

    Joined:
    Nov 4, 2012
    Posts:
    4
    Adding -batchmode did the trick. :)
    Do you think this would be a regression? I.e., the -batchmode will most likely be removed from the command in the future?

    Cheers and thanks for the help!
     
    liortal likes this.
  8. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    No idea. This parameter has been there for ages
     
  9. RKhandare

    RKhandare

    Joined:
    Sep 28, 2015
    Posts:
    1
    is there any command to run integration test through the ant script ? Please share command.