Package jenkins.test

Class RunMatchers

java.lang.Object
jenkins.test.RunMatchers

public final class RunMatchers extends Object
Matchers for Run objects.
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.hamcrest.Matcher<hudson.model.Run<?,?>>
    Creates a matcher checking whether a build has completed.
    static org.hamcrest.Matcher<hudson.model.Run<?,?>>
    hasStatus(hudson.model.Result result)
    Creates a matcher checking whether a build has a specific outcome.
    static org.hamcrest.Matcher<hudson.model.Run<?,?>>
    Creates a matcher checking whether a build is successful.
    static org.hamcrest.Matcher<hudson.model.Run<?,?>>
    Creates a matcher checking whether build logs contain a specific message.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • isSuccessful

      public static org.hamcrest.Matcher<hudson.model.Run<?,?>> isSuccessful()
      Creates a matcher checking whether a build is successful.
    • hasStatus

      public static org.hamcrest.Matcher<hudson.model.Run<?,?>> hasStatus(hudson.model.Result result)
      Creates a matcher checking whether a build has a specific outcome.
    • logContains

      public static org.hamcrest.Matcher<hudson.model.Run<?,?>> logContains(String message)
      Creates a matcher checking whether build logs contain a specific message.
      Parameters:
      message - the expected message
    • completed

      public static org.hamcrest.Matcher<hudson.model.Run<?,?>> completed()
      Creates a matcher checking whether a build has completed.