Class Build

java.lang.Object
com.aventstack.chaintest.domain.Build
All Implemented Interfaces:
ChainTestEntity

public class Build extends Object implements ChainTestEntity
Represents a build in the ChainTest framework. This class contains information about the build such as project details, execution stage, test runner, git information, and statistics. It also provides methods to update and complete the build.
  • Constructor Details

    • Build

      public Build()
      Default constructor.
    • Build

      public Build(int projectId, String testRunner)
      Constructs a Build with the specified project ID and test runner.
      Parameters:
      projectId - the project ID
      testRunner - the test runner
    • Build

      public Build(String projectName, String testRunner)
      Constructs a Build with the specified project name and test runner.
      Parameters:
      projectName - the project name
      testRunner - the test runner
    • Build

      public Build(String testRunner)
      Constructs a Build with the specified test runner.
      Parameters:
      testRunner - the test runner
  • Method Details

    • updateStats

      public void updateStats(Test test)
      Updates the statistics of the build based on the provided test.
      Parameters:
      test - the test to update statistics from
    • complete

      public void complete(Result result)
      Completes the build with the specified result.
      Parameters:
      result - the result to set
    • complete

      public void complete()
      Completes the build with the current result.
    • setEndedAt

      public void setEndedAt(long endedAt)
    • getDurationPretty

      public String getDurationPretty()
    • addTags

      public void addTags(List<String> tags)
    • addTags

      public void addTags(Set<String> tags)
    • addTags

      public void addTags(Collection<Tag> tags)
    • addTags

      public void addTags(Stream<Tag> tags)
    • setIsBdd

      public void setIsBdd(boolean val)