Class CodeCoverageRequestBuilder

java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.test.codecoverage.CodeCoverageRequestBuilder

public class CodeCoverageRequestBuilder extends BaseRequestBuilder
Provides functionality to work with Test code coverage Api.
  • Constructor Details

    • CodeCoverageRequestBuilder

      public CodeCoverageRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential)
      Instantiates a new RequestBuilder instance and sets the default values.
      Parameters:
      organizationUrl - Represents organization location request url.
      accessTokenCredential - Access token credential object.
  • Method Details

    • getBuildCodeCoverageAsync

      public CompletableFuture<BuildCoverages> getBuildCodeCoverageAsync(int buildId, int flags) throws AzDException
      Get code coverage data for a test run.
      Parameters:
      buildId - ID of the build for which code coverage data needs to be fetched.
      flags - Value of flags determine the level of code coverage details to be fetched. Flags are additive. Expected Values are 1 for Modules, 2 for Functions, 4 for BlockData.
      Returns:
      List of BuildCoverage BuildCoverages
      Throws:
      AzDException - Default Api exception handler.
    • getTestRunCodeCoverageAsync

      public CompletableFuture<TestRunCoverages> getTestRunCodeCoverageAsync(int runId, int flags) throws AzDException
      Get code coverage data for a test run
      Parameters:
      runId - ID of the test run for which code coverage data needs to be fetched.
      flags - Value of flags determine the level of code coverage details to be fetched. Flags are additive. Expected Values are 1 for Modules, 2 for Functions, 4 for BlockData.
      Returns:
      List of TestRunCoverage TestRunCoverages
      Throws:
      AzDException - Default Api exception handler.
    • getBuildCodeCoverage

      public BuildCoverages getBuildCodeCoverage(int buildId, int flags) throws AzDException
      Get code coverage data for a test run.
      Parameters:
      buildId - ID of the build for which code coverage data needs to be fetched.
      flags - Value of flags determine the level of code coverage details to be fetched. Flags are additive. Expected Values are 1 for Modules, 2 for Functions, 4 for BlockData.
      Returns:
      List of BuildCoverage BuildCoverages
      Throws:
      AzDException - Default Api exception handler.
    • getTestRunCodeCoverage

      public TestRunCoverages getTestRunCodeCoverage(int runId, int flags) throws AzDException
      Get code coverage data for a test run
      Parameters:
      runId - ID of the test run for which code coverage data needs to be fetched.
      flags - Value of flags determine the level of code coverage details to be fetched. Flags are additive. Expected Values are 1 for Modules, 2 for Functions, 4 for BlockData.
      Returns:
      List of TestRunCoverage TestRunCoverages
      Throws:
      AzDException - Default Api exception handler.