Skip to content

Issue with UnityTestTask@1 - The "path" argument must be of type string. Received type undefined #219

@IanMoroney

Description

@IanMoroney

So, trying to use the example in the docs, and I get the error:
The "path" argument must be of type string. Received type undefined
when trying to run the task.

This is the debug output from the task:

##[debug]Agent.ProxyUrl=undefined
##[debug]Agent.CAInfo=undefined
##[debug]Agent.ClientCert=undefined
##[debug]Agent.SkipCertValidation=undefined
##[debug]check path : /Users/user/adoagent/1/_work/_tasks/UnityTestTask_85e57e6f-cb59-4d1d-979f-dd830b51f2fa/1.5.0/task.json
##[debug]adding resource file: /Users/user/adoagent/1/_work/_tasks/UnityTestTask_85e57e6f-cb59-4d1d-979f-dd830b51f2fa/1.5.0/task.json
##[debug]system.culture=en-US
##[debug]testMode=editMode
##[debug]unityProjectPath=/Users/user/adoagent/1/_work/5/s
##[debug]testCategory=undefined
##[debug]testFilter=undefined
##[debug]testResultsPath=Test Results
##[debug]unityEditorsPathMode=unityHub
##[debug]customUnityEditorsPath=undefined
##[debug]unityVersion=undefined
The "path" argument must be of type string. Received type undefined
##[debug]task result: Failed
##[error]The "path" argument must be of type string. Received type undefined
##[debug]Processed: ##vso[task.issue type=error;]The "path" argument must be of type string. Received type undefined
##[debug]Processed: ##vso[task.complete result=Failed;]The "path" argument must be of type string. Received type undefined
Finishing: unitytest

According to the docs, there isn't an input called path.
According to the code, unity-test.ts does refer to path and it joins it with task.json. However, in the above debug output, you can see the check path running which shows a full path to the task.json, so I don't know exactly what's going wrong here.

I assume i'm not missing any required input parameter, and my build environment is fine. If i'm missing something, can you let me know what it is?

YAML:

steps:
- task: UnityTestTask@1
  name: unitytest
  inputs:
    testMode: editMode
    unityProjectPath: $(System.DefaultWorkingDirectory)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions