Annotation Type BeforeGroups


  • @Retention(RUNTIME)
    @Target(METHOD)
    @Documented
    public @interface BeforeGroups
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean alwaysRun
      For before methods (beforeSuite, beforeTest, beforeTestClass and beforeTestMethod, but not beforeGroups): If set to true, this configuration method will be run regardless of what groups it belongs to.
      java.lang.String[] dependsOnGroups
      The list of groups this method depends on.
      java.lang.String[] dependsOnMethods
      The list of methods this method depends on.
      java.lang.String description
      The description for this method.
      boolean enabled
      Whether methods on this class/method are enabled.
      java.lang.String[] groups
      The list of groups this class/method belongs to.
      boolean inheritGroups
      If true, this @Configuration method will belong to groups specified in the @Test annotation on the class (if any).
      long timeOut
      The maximum number of milliseconds this method should take.
      java.lang.String[] value
      The list of groups that this configuration method will run before.
    • Element Detail

      • value

        java.lang.String[] value
        The list of groups that this configuration method will run before. If specified it overrides the list of groups provided through groups() attribute. This method is guaranteed to run shortly before the first test method that belongs to any of these groups is invoked.
        Returns:
        the value
        Default:
        {}
      • enabled

        boolean enabled
        Whether methods on this class/method are enabled.
        Returns:
        the value (default true)
        Default:
        true
      • groups

        java.lang.String[] groups
        The list of groups this class/method belongs to. This list also describes the groups that this configuration method will run before (if no value() attribute is defined).
        Returns:
        the value
        Default:
        {}
      • dependsOnGroups

        java.lang.String[] dependsOnGroups
        The list of groups this method depends on. Every method member of one of these groups is guaranteed to have been invoked before this method. Furthermore, if any of these methods was not a SUCCESS, this test method will not be run and will be flagged as a SKIP.
        Returns:
        the value
        Default:
        {}
      • dependsOnMethods

        java.lang.String[] dependsOnMethods
        The list of methods this method depends on. There is no guarantee on the order on which the methods depended upon will be run, but you are guaranteed that all these methods will be run before the test method that contains this annotation is run. Furthermore, if any of these methods was not a SUCCESS, this test method will not be run and will be flagged as a SKIP.

        If some of these methods have been overloaded, all the overloaded versions will be run.

        Returns:
        the value
        Default:
        {}
      • alwaysRun

        boolean alwaysRun
        For before methods (beforeSuite, beforeTest, beforeTestClass and beforeTestMethod, but not beforeGroups): If set to true, this configuration method will be run regardless of what groups it belongs to.
        For after methods (afterSuite, afterClass, ...): If set to true, this configuration method will be run even if one or more methods invoked previously failed or was skipped.
        Returns:
        the value (default false)
        Default:
        false
      • inheritGroups

        boolean inheritGroups
        If true, this @Configuration method will belong to groups specified in the @Test annotation on the class (if any).
        Returns:
        the value (default false)
        Default:
        false
      • description

        java.lang.String description
        The description for this method. The string used will appear in the HTML report and also on standard output if verbose > 2.
        Returns:
        the value (default empty)
        Default:
        ""
      • timeOut

        long timeOut
        The maximum number of milliseconds this method should take. If it hasn't returned after this time, this method will fail and it will cause test methods depending on it to be skipped.
        Returns:
        the value (default 0)
        Default:
        0L