[arquillian-issues] [JBoss JIRA] Commented: (ARQ-50) research an alternative approach to inheriting from Arquillian base class in TestNG

Cedric Beust (JIRA) jira-events at lists.jboss.org
Tue Sep 7 17:17:52 EDT 2010


    [ https://jira.jboss.org/browse/ARQ-50?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12549513#action_12549513 ] 

Cedric Beust commented on ARQ-50:
---------------------------------

The URL is actually http://testng.org/beta (no 's') although the easiest is probably to just pull from the github repo:

http://github.com/cbeust/testng

I'm happy to work with you guys until you are satisfied with the level of integration between Arquilian and TestNG.

Yesterday, I added the new interface IConfigurable, which is similar to IHookable but for configuration methods. Here is my email to Dan and Aslak:

The new interface is IConfigurable, and it's like IHookable except that it's for configuration methods (@Before* and @After*).

public interface IConfigurable extends ITestNGListener {
  public void run(IConfigureCallBack callBack, ITestResult testResult);
}

public interface IConfigureCallBack { 
  public void runConfigurationMethod(ITestResult testResult);
}

If you call callBack.runConfigurationMethod(testResult), the configuration method gets called normally. Omit this and the configuration method will not be run.

Additionally, both IHookable and IConfigurable are now TestNG listeners, which means that you can specify them with <listeners>, @Listeners, or on the command line/ant/maven.


> research an alternative approach to inheriting from Arquillian base class in TestNG
> -----------------------------------------------------------------------------------
>
>                 Key: ARQ-50
>                 URL: https://jira.jboss.org/browse/ARQ-50
>             Project: Arquillian
>          Issue Type: Feature Request
>          Components: Test Harness Integration
>            Reporter: Dan Allen
>            Assignee: Aslak Knutsen
>            Priority: Minor
>             Fix For: 1.0.0.Beta1
>
>
> This issue is a research and development task to determine if there is an alternative approach that can be used, rather than inheriting from the Arquillian base class, to hook a TestNG test into the Arquillian functionality. JUnit offers a @RunWith annotation which is what the JUnit module uses. The closest hook TestNG seems to offer is the ITestListener interface. However, the question becomes, how does that map to the requirements:
> @BeforeSuite -> start container (~ ITestListener.onStart)
> @BeforeClass -> deploy (??)
> TestMethod/IHookable -> remote call (??)
> @AfterClass -> undeploy -> (??)
> @AfterSuite -> stop container -> (~ ITestListener.onFinish)
> There was discussion on this thread about supporting @RunWith in TestNG: http://markmail.org/message/fxm6bddk6wzqa4yp

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the arquillian-issues mailing list