[arquillian-issues] [JBoss JIRA] Commented: (ARQ-287) Add support for filtering tests based on required execution environment

Dan Allen (JIRA) jira-events at lists.jboss.org
Mon Sep 13 18:20:12 EDT 2010


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

Dan Allen commented on ARQ-287:
-------------------------------

Btw, I disagree that the design proposed does not scale. The built-in environments are merely a convenience. Developers have the option of combining ExecutionEnvironment and @ProvidedBy to define a custom execution environment. It's totally extensible.

For instance, some of the Arquillian JUnit examples can only be run on JBoss AS, so we define it as an execution environment:

@ProvidedBy(
   containers =
   {
      "~ org\\.jboss\\.arquillian\\.container\\.jbossas\\.(managed|remote|embedded)_5(_[0-9]+)*"
   }
)
public final class JBossAS6Container implements ExecutionEnvironment {}

There is no reason why the developer can't come up with any combination they need. I'm just not all the comfortable with how we are referencing containers. I'd like that to be a cleaner association. Perhaps to be discussed in a seperate JIRA, i'd like to have containers declare a unique identifier, the common name, the vendor and the supported version range.

> Add support for filtering tests based on required execution environment
> -----------------------------------------------------------------------
>
>                 Key: ARQ-287
>                 URL: https://jira.jboss.org/browse/ARQ-287
>             Project: Arquillian
>          Issue Type: Feature Request
>          Components: Configuration
>    Affects Versions: 1.0.0.Alpha4
>            Reporter: Dan Allen
>            Assignee: Dan Allen
>             Fix For: 1.0.0.Beta1
>
>
> Allow the developer to declaratively specify the execution environment required for a given test to function. Then, Arquillian should filter out tests that require an execution environment that the target container doesn't provide. (In other words, only execute a test case if the target container provides the execution environment the test requires).
> To support this feature, we need to introduce the concept of an execution environment definition into the API and a mechanism for indicating which containers provide a given execution environment. The developer experience will be something like:
> @Retention(RetentionPolicy.RUNTIME)
> @Target(ElementType.TYPE)
> @RequiresEnvironment(JavaEE6Environment.class)
> public @interface RequiresJavaEE6 {}
> @RunWith(Arquillian.class)
> @RequiresJavaEE6
> public class MyTestCase { ... }
> or
> @RunWith(Arquillian.class)
> @RequiresEnvironment(JavaEE6Environment.class)
> public class MyTestCase { ... }
> Formal proposals and prototypes will be submitted as branches in github.

-- 
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