You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by "Abraham Elmahrek (JIRA)" <ji...@apache.org> on 2015/02/08 20:46:34 UTC

[jira] [Commented] (SQOOP-2090) Sqoop2: Have TestNG provide test names for all parameterized tests

    [ https://issues.apache.org/jira/browse/SQOOP-2090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14311521#comment-14311521 ] 

Abraham Elmahrek commented on SQOOP-2090:
-----------------------------------------

Here's a quick example of a class:
{code}
public class TestStuff implements ITest {
  private String testName;
  private String arg1;

  @Override
  public String getTestName() {
    return testName;
  }

  @Factory(dataProvider="test-stuff")
  public TestExtractor(String arg1) {
    this.arg1 = arg1;
  }

  @DataProvider(name="test-hdfs-extractor")
  public static Object[][] data() {
    ...
  }

  @BeforeMethod(alwaysRun = true)
  public void setUpTestName(Method method) {
    this.testName = getClass().getSimpleName()
        + "#" + method.getName() + "("
          + this.arg1 
        + ")";
  }
}
{code}

> Sqoop2: Have TestNG provide test names for all parameterized tests
> ------------------------------------------------------------------
>
>                 Key: SQOOP-2090
>                 URL: https://issues.apache.org/jira/browse/SQOOP-2090
>             Project: Sqoop
>          Issue Type: Sub-task
>          Components: sqoop2-test
>            Reporter: Abraham Elmahrek
>            Assignee: Abraham Elmahrek
>              Labels: newbie
>             Fix For: 1.99.6
>
>
> {{ITest#getTestName}} can be used to provide test names that are more verbose.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)