Turn off UIFigure visibility during unit test
Mostrar comentarios más antiguos
How can I run unit tests on an app without displaying the UIFigure during the tests? Rendering the graphics makes the tests take 10 times longer.
classdef UI < matlab.apps.AppBase
...
end
classdef tUI < matlab.uitest.TestCase
...
% many tests involving UI gestures
...
end
Respuesta aceptada
Más respuestas (1)
Anjaneyulu Bairi
el 13 de Oct. de 2025
Hi,
In your code, you can create a function which turn on/off the visibilty of the figures. See the below code for example
function app = TurnOff(fig)
fig.Visible = 'off';
end
This way, you can show or hide any figure by changing its Visible property.
Hope this helps
1 comentario
Categorías
Más información sobre App Testing Framework en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!