How to display in a text area in the App the test assessment result
    5 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
I am creating a app to run test suite using sttest.manager in the back groud  I want to access the result of the assessment object after i simulate the harness with the test sequence  I can get to the summary but I also want to display the pass fail untested result individualy. The test assessemt has all the information and i can see it when i use the disp function but it is in the matlab command window not in the textt area of my app.
app.TextAera.Value = assessment return an error
app.TextAera.Value = string(assessment) return an error
I basically want to display in the text area of the app the results of the disp(as) if as if the assessment results
example of want i want to display which is the result of the command disp(as)
  Summary:
       Total: 9
    Untested: 0
      Passed: 9
      Failed: 0
      Result: Pass
  Passed Assessments (first 10):
    1 : Pass 'Test Sequence/.../Step_1:verify((status_State_VSC == Featurenotsupported_SM)&& (PDMState == e_PDM_Off))'
    2 : Pass 'Test Sequence/.../Step_2:verify((status_State_VSC == Initilizing_SM)&& (PDMState == e_PDM_Init)&& (status_MotorRunning == 0)&& (LVselfTestFaultcode == 0)&& (LPMActiveFlag == 0))'
    3 : Pass 'Test Sequence/.../Step_3:verify((status_State_VSC == Initilizing_SM)&& (PDMState == e_PDM_ConfigGateDrive)&& (status_MotorRunning == 0)&& (LVselfTestFaultcode == 0)&& (LPMActiveFlag == 0))'
    4 : Pass 'Test Sequence/.../Step_4:verify((status_State_VSC == Initilizing_SM)&& (PDMState == e_PDM_LVSelfTest)&& (status_MotorRunning == 0)&& (LVselfTestFaultcode == 0)&& (LPMActiveFlag == 0))'
    5 : Pass 'Test Sequence/.../Step_5:verify((status_State_VSC == HVready_SM)&& (PDMState == e_PDM_Ready)&& (status_MotorRunning == 0)&& (LVselfTestFaultcode == 0)&& (LPMActiveFlag == 0))'
    6 : Pass 'Test Sequence/.../Step_6:verify((status_State_VSC == Active_Motor_On_SM)&& (PDMState == e_PDM_Standby)&& (status_MotorRunning == 1)&& (LVselfTestFaultcode == 0)&& (LPMActiveFlag == 0))'
    7 : Pass 'Test Sequence/.../Step_7:verify((status_State_VSC == Active_Motor_On_SM)&& (PDMState == e_PDM_RampUp)&& (status_MotorRunning == 1)&& (LVselfTestFaultcode == 0)&& (LPMActiveFlag == 0))'
    8 : Pass 'Test Sequence/.../Step_8:verify((status_State_VSC == Active_Motor_On_SM)&& (PDMState == e_PDM_Active)&& (status_MotorRunning == 1)&& (LVselfTestFaultcode == 0)&& (LPMActiveFlag == 0))'
    9 : Pass 'Test Sequence/.../Step_1:verify((status_State_VSC == Active_Motor_On_SM)&& (PDMState == e_PDM_LPMActive)&& (status_MotorRunning == 1)&& (LVselfTestFaultcode == 0)&& (LPMActiveFlag == 1))'
0 comentarios
Respuestas (1)
  Sai Gokul
      
 el 12 de Jul. de 2023
        Hi xavier
I understand you want to display the text displayed in the MATLAB command window in the TextArea of the App.
You can convert the assessment object to a string and then assign it to the app.TextArea.Value. 
Here is how you can do it (Assuming 'disp(as)' prints the required format in MATLAB command window)
assessmentString = evalc('disp(as)');
app.TextArea.Value = assessmentString;
You can also refer to the following documentation to know how 'evalc' works :
Hope this helps!
0 comentarios
Ver también
Categorías
				Más información sobre Inputs en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!