Annotation Type DataProvider


  • @Retention(RUNTIME)
    @Target(METHOD)
    @Documented
    public @interface DataProvider
    Mark a method as supplying data for a test method. The data provider name defaults to method name. The annotated method must return an Object[][] where each Object[] can be assigned the parameter list of the test method. The @Test method that wants to receive data from this DataProvider needs to use a dataProvider name equals to the name of this annotation.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      int[] indices
      Which indices to run from this data provider, default: all.
      java.lang.String name
      The name of this DataProvider.
      boolean parallel
      Whether this data provider should be run in parallel.
    • Element Detail

      • name

        java.lang.String name
        The name of this DataProvider.
        Default:
        ""
      • parallel

        boolean parallel
        Whether this data provider should be run in parallel.
        Default:
        false
      • indices

        int[] indices
        Which indices to run from this data provider, default: all.
        Default:
        {}