I have a large app with many test cases that I would like to be able run in parallel. However the uitest framework functions (type, press etc. ) all fail when run in parallel due to MATLAB:uiautomation:Driver:NoDisplay. Is there a way to set up the parpool to allow this?
I provide an example of this with a simple file selector app that uses uigetfile to select a file. If the file exists then the first line is written to a label in the app, otherwise an error message is written. The testing utilizes the uitest framework function "press" in both tests and it failes due to the error above when run in parallel. When run without parallel processes both tests pass without errors.
(I borrowed the original code base from the example provided in the answer linked below and modified it for this question)
https://www.mathworks.com/matlabcentral/answers/1989568-create-a-test-case-with-uitest-class-using-uigetfile-and-uiputfile

 채택된 답변

Bret
Bret 2026년 4월 17일 17:33

1 개 추천

After speaking with the folks at matlab, there are means of doing this on linux (dummy displays) or in C-IDE environments, but not locally on a windows machine. More of a windows problem than matlab issue here.

추가 답변 (1개)

Adarsh
Adarsh 2026년 4월 9일

0 개 추천

Hi @Bret,
As per my understanding, you are trying to run some UI related tests using parallel computing toolbox to run the tests in parallel.
This operation might not be supported by MATLAB. As there is no documentation related to executing UI tests in parallel.
I hope this helps!

댓글 수: 1

Bret
Bret 2026년 4월 13일
I don't see any specific documentation on it either but as a subclass of matlab.unittest, which does have parallel processing capabilty, I would think that it should be able to work. There is a page on unittest's ability to parallel process and the "limitations" does not state or imply that this wouldn't be feasible.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품

릴리스

R2023a

질문:

2026년 4월 6일

답변:

2026년 4월 17일 17:33

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by