Class Rule

  • All Implemented Interfaces:
    ExtensionPoint, Serializable
    Direct Known Subclasses:
    StatementCoveragePerSourceFileRule

    public abstract class Rule
    extends Object
    implements Serializable, ExtensionPoint
    Rule object encapsulates the logic to mark CoverageObjects as "failed". Such logic is used to mark builds as unstable when certain condition is met.

    For example, one can define a rule where "MCDC coverage must be better than 50% for any class", and if this rule is violated, the build will be marked as unstable.

    The rule instances are persisted as a part of Build, so make sure to make your class serializable. This is so that we can consistently mark coverage results even if the job configuration changes.

    Author:
    Kohsuke Kawaguchi
    See Also:
    Serialized Form