Main Content

slreq.verification.services.TAP class

Package: slreq.verification.services
Superclasses:

Work with external results sources

Description

Instances of the slreq.verification.services.TAP provides utilities for interpreting TAP (Test Anything Protocol) result files for verification.

Construction

Service objects used in the custom logic of GetResultFcn to script up result fetching logic.

tapService = slreq.verification.services.TAP() directs the result fetching logic to the TAP file.

Output Arguments

expand all

Service used in GetResultFcn to script up result fetching logic

Methods

The output is result that is an instance of the tapService object. For the resultFile with testID, the GetResultFcn function returns the result for that testID:

result = tapService.getResult(testID, resultFile);

The GetResultFcn fetches the result for the testID with test points in the resultFile using:

result = tapService.getAllResults(resultFile);

Example

Service Usage in a GetResultFcn of Link Type

 function result = GetResultFcn(link)
    testID = link.destination.id;
    testFile = link.destination.artifact;
    resultFile = getResultFile(testFile);
    
    if ~isempty(resultFile) && isfile(resultFile)
        tapService = slreq.verification.services.TAP();
        result = tapService.getResult(testID, resultFile);
    else
        result.status = slreq.verification.Status.Unknown;
    end
end

Introduced in R2020a