function compressedSldvData = compressDataForTestExtension(sldvData)
    
    compressedSldvData = sldvData;
    simData = sldvData.TestCases;
    numTestCases = length(simData);
    
    % If the data value is in compressed format then TestCases field must
    % have stepValues field. If it is in uncompressed format then we donot
    % expect stepValues field in TestCases. 
    
    % If stepValues field is not present in TestCases struct, add it.
    
    % updating any element in array will update all the struct defn. in the
    % array.
    if ~isfield(simData, 'stepValues')
        simData(1).stepValues = [];
    end
    
    % 1.if sldvData is from loggedTestSignal, it will not have
    %   dataNoEffect field but output of compressTestCaseData will return a
    %   struct with dataNoEffect field.
    % 
    % 2. data no effect is not being used in test case extension workflow
    
    % if dataNoEffect is not present add it to TestCase struct.    
    if ~isfield(simData, 'dataNoEffect')
        simData(1).dataNoEffect = [];
    end

    for idx = 1 : numTestCases
        simData(idx) = Sldv.DataUtils.compressTestCaseData(simData(idx));
    end
    
    compressedSldvData.TestCases = simData;
end