To identify the last active step, you can track the active steps in general. This allows you to evaluate which step was the last active one after the simulation. To do so:
1) Get the active step output through the Test Sequence block's property/option "Create data to monitor the active step". For more details, you can access the release-specific documentation by executing the following command in the MATLAB R2020a command window:
>> web(fullfile(docroot, 'sltest/ug/connecting-blocks-for-verify-statements.html'))
2) Log this output signal of the Test Sequence Block, like:
3) Analyze which was the last step (in the command window):
as = get(out.logsout,('Active_Step'))
as.Values
as.Values.Data
%or
%as.Values.Data(end)
Please follow the link below to search for the required information regarding the current release: