Search Unity

Question Test Case Count = 0 when running with command line

Discussion in 'Testing & Automation' started by Maeslezo, Feb 10, 2020.

  1. Maeslezo

    Maeslezo

    Joined:
    Jun 16, 2015
    Posts:
    330
    Hi,

    I am setting up a build pipeline and I am trying the test framework command line.

    I have been trying with a toy project, with some tests, some of them pass and others fail.

    When I execute the command line, it seems like the framework is not getting any test, the test case count is equal to 0

    Am I missing something?
    My line:

    %unityPath% -runTests -batchmode -projectPath %projectPath% -testResults %testResultPath% -testPlatform EditMode


    My result:
    Code (xml):
    1. <?xml version="1.0" encoding="utf-8"?>
    2. <test-run id="2" testcasecount="0" result="Passed" total="0" passed="0" failed="0" inconclusive="0" skipped="0" asserts="0" engine-version="3.5.0.0" clr-version="4.0.30319.42000" start-time="2020-02-10 10:41:27Z" end-time="2020-02-10 10:41:27Z" duration="0,005319">
    3.   <test-suite type="TestSuite" id="1003" name="CI" fullname="CI" runstate="Runnable" testcasecount="0" result="Passed" start-time="2020-02-10 10:41:27Z" end-time="2020-02-10 10:41:27Z" duration="0.005319" total="0" passed="0" failed="0" inconclusive="0" skipped="0" asserts="0">
    4.     <properties />
    5.   </test-suite>
    6. </test-run>

    The same project in Unity Editor:
    upload_2020-2-10_11-47-57.png

    Unity Editor: 2019.3.0f6
    Test Framework: 1.1.11

    Thank you
     
  2. Maeslezo

    Maeslezo

    Joined:
    Jun 16, 2015
    Posts:
    330
    My mistake, never mind.

    Thank you
     
  3. BenAtWork

    BenAtWork

    Joined:
    Oct 1, 2019
    Posts:
    1
    I've got the same issue, so if you share your solution I'd be grateful
     
  4. Maeslezo

    Maeslezo

    Joined:
    Jun 16, 2015
    Posts:
    330
    I was pointing to another project which was empty :'(

    But I had the same problem in other project and the problem was the filters

    If you provide more info, maybe I can be more helpful