mathworks / matlab-azure-devops-extension

Continuous Integration with MATLAB on Azure DevOps
https://marketplace.visualstudio.com/items?itemName=MathWorks.matlab-azure-devops-extension
Other
14 stars 5 forks source link

Issue on loading mlprj via Azure pipeline #70

Open NTmuir opened 1 year ago

NTmuir commented 1 year ago

When running via the pipeline I get this warning, which I believe is effecting how my .mlprj is loaded as it cannot access even the Simulink model's I require from the test manager.

image

I ran this specific code above with the console at the same file level, and I was able to see the mlprj load successfully within the console, which I don't see with the above trace and run my tests. (Additionally, MATLAB version is attached within the image)

I was able to make this work when making a separate functional test setup file, but I wish to have the project run all of the startup and teardown.

Any help would be much appreciated! Thanks, Nick

acampbel commented 1 year ago

Hi Nick,

Thank for trying out the extension and creating this issue.

When you say .mlprj do you mean project files (.prj) or maybe project archives (mlproj)?

It does seem clear that the project is not loading as your expect. I am not sure why this may be but here are a couple things to investigate.

  1. What folder are you in when launching MATLAB to run these tests? The RunMATLABTests task assumes that you are in the project root folder. Is that the case here?
  2. IS this a project saved in an older version of MATLAB? If so then perhaps you can ensure you have resaved it in a version that is at least 20a or later.
  3. Are you sure your source control is matching what is on your machine? For example, perhaps you imported a project archive (mlproj) into your sandbox and it works there as a full project, but maybe haven't checked in the relevant artifacts (like the prj file and the resources folder) to the git repo so the ci agent which is cloning from source also sees it as a valid project.

Does that help? Thanks, Andy