You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bigtop.apache.org by "Wing Yew Poon (JIRA)" <ji...@apache.org> on 2012/07/26 01:48:34 UTC

[jira] [Created] (BIGTOP-685) provide a way to specify the parameters expected by a test

Wing Yew Poon created BIGTOP-685:
------------------------------------

             Summary: provide a way to specify the parameters expected by a test
                 Key: BIGTOP-685
                 URL: https://issues.apache.org/jira/browse/BIGTOP-685
             Project: Bigtop
          Issue Type: New Feature
          Components: Tests
    Affects Versions: 0.5.0
            Reporter: Wing Yew Poon
            Assignee: Wing Yew Poon
             Fix For: 0.5.0
         Attachments: contract.txt

Many tests take parameters. Parameters may be passed into a test via system properties or environment variables. These parameters can be regarded as part of the test's contract. Over time, with increasing number of tests, it becomes hard to keep track of the set of parameters that may be used by the tests.
I propose to address this issue at two levels:
1. Introduce an annotation type for annotating a test class with the list of system properties and environment variables used by it. This allows for the contract to be exposed in the javadoc, as well as to annotation processing tools.
2. Provide utility functions for automatically obtaining the parameters and their values from the above annotation.

Not addressed in this proposal: Injecting 2. into the test runner itself (currently we are running tests through JUnit).


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (BIGTOP-685) provide a way to specify the parameters expected by a test

Posted by "Bruno Mahé (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BIGTOP-685?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bruno Mahé closed BIGTOP-685.
-----------------------------

    
> provide a way to specify the parameters expected by a test
> ----------------------------------------------------------
>
>                 Key: BIGTOP-685
>                 URL: https://issues.apache.org/jira/browse/BIGTOP-685
>             Project: Bigtop
>          Issue Type: New Feature
>          Components: Tests
>    Affects Versions: 0.5.0
>            Reporter: Wing Yew Poon
>            Assignee: Wing Yew Poon
>             Fix For: 0.5.0
>
>         Attachments: contract.txt
>
>
> Many tests take parameters. Parameters may be passed into a test via system properties or environment variables. These parameters can be regarded as part of the test's contract. Over time, with increasing number of tests, it becomes hard to keep track of the set of parameters that may be used by the tests.
> I propose to address this issue at two levels:
> 1. Introduce an annotation type for annotating a test class with the list of system properties and environment variables used by it. This allows for the contract to be exposed in the javadoc, as well as to annotation processing tools.
> 2. Provide utility functions for automatically obtaining the parameters and their values from the above annotation.
> Not addressed in this proposal: Injecting 2. into the test runner itself (currently we are running tests through JUnit).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (BIGTOP-685) provide a way to specify the parameters expected by a test

Posted by "Wing Yew Poon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BIGTOP-685?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wing Yew Poon updated BIGTOP-685:
---------------------------------

    Attachment: contract.txt
    
> provide a way to specify the parameters expected by a test
> ----------------------------------------------------------
>
>                 Key: BIGTOP-685
>                 URL: https://issues.apache.org/jira/browse/BIGTOP-685
>             Project: Bigtop
>          Issue Type: New Feature
>          Components: Tests
>    Affects Versions: 0.5.0
>            Reporter: Wing Yew Poon
>            Assignee: Wing Yew Poon
>             Fix For: 0.5.0
>
>         Attachments: contract.txt
>
>
> Many tests take parameters. Parameters may be passed into a test via system properties or environment variables. These parameters can be regarded as part of the test's contract. Over time, with increasing number of tests, it becomes hard to keep track of the set of parameters that may be used by the tests.
> I propose to address this issue at two levels:
> 1. Introduce an annotation type for annotating a test class with the list of system properties and environment variables used by it. This allows for the contract to be exposed in the javadoc, as well as to annotation processing tools.
> 2. Provide utility functions for automatically obtaining the parameters and their values from the above annotation.
> Not addressed in this proposal: Injecting 2. into the test runner itself (currently we are running tests through JUnit).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (BIGTOP-685) provide a way to specify the parameters expected by a test

Posted by "Wing Yew Poon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BIGTOP-685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13422741#comment-13422741 ] 

Wing Yew Poon commented on BIGTOP-685:
--------------------------------------

I have attached a patch with a concrete prototype. It includes a demonstration of how the annotation is used in a test. I have tested it by running this test. This addresses Bruno's concerns in BIGTOP-678.
I have also tested using environment variables (not demonstrated) in a dummy test.
I am open to calling Parameters Contract and to calling ParameterSetter something else.
There is a performance cost to using introspection or reflection, of course. However, the utility functions are called once per class, and there can be many test methods in one class making use of the same set of parameters.
                
> provide a way to specify the parameters expected by a test
> ----------------------------------------------------------
>
>                 Key: BIGTOP-685
>                 URL: https://issues.apache.org/jira/browse/BIGTOP-685
>             Project: Bigtop
>          Issue Type: New Feature
>          Components: Tests
>    Affects Versions: 0.5.0
>            Reporter: Wing Yew Poon
>            Assignee: Wing Yew Poon
>             Fix For: 0.5.0
>
>         Attachments: contract.txt
>
>
> Many tests take parameters. Parameters may be passed into a test via system properties or environment variables. These parameters can be regarded as part of the test's contract. Over time, with increasing number of tests, it becomes hard to keep track of the set of parameters that may be used by the tests.
> I propose to address this issue at two levels:
> 1. Introduce an annotation type for annotating a test class with the list of system properties and environment variables used by it. This allows for the contract to be exposed in the javadoc, as well as to annotation processing tools.
> 2. Provide utility functions for automatically obtaining the parameters and their values from the above annotation.
> Not addressed in this proposal: Injecting 2. into the test runner itself (currently we are running tests through JUnit).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (BIGTOP-685) provide a way to specify the parameters expected by a test

Posted by "Roman Shaposhnik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BIGTOP-685?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Roman Shaposhnik updated BIGTOP-685:
------------------------------------

    Affects Version/s:     (was: 0.5.0)
                       0.4.0
        Fix Version/s:     (was: 0.5.0)
                       0.4.0
    
> provide a way to specify the parameters expected by a test
> ----------------------------------------------------------
>
>                 Key: BIGTOP-685
>                 URL: https://issues.apache.org/jira/browse/BIGTOP-685
>             Project: Bigtop
>          Issue Type: New Feature
>          Components: Tests
>    Affects Versions: 0.4.0
>            Reporter: Wing Yew Poon
>            Assignee: Wing Yew Poon
>             Fix For: 0.4.0
>
>         Attachments: contract.txt
>
>
> Many tests take parameters. Parameters may be passed into a test via system properties or environment variables. These parameters can be regarded as part of the test's contract. Over time, with increasing number of tests, it becomes hard to keep track of the set of parameters that may be used by the tests.
> I propose to address this issue at two levels:
> 1. Introduce an annotation type for annotating a test class with the list of system properties and environment variables used by it. This allows for the contract to be exposed in the javadoc, as well as to annotation processing tools.
> 2. Provide utility functions for automatically obtaining the parameters and their values from the above annotation.
> Not addressed in this proposal: Injecting 2. into the test runner itself (currently we are running tests through JUnit).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (BIGTOP-685) provide a way to specify the parameters expected by a test

Posted by "Bruno Mahé (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BIGTOP-685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13422903#comment-13422903 ] 

Bruno Mahé commented on BIGTOP-685:
-----------------------------------

+1
Thanks!
                
> provide a way to specify the parameters expected by a test
> ----------------------------------------------------------
>
>                 Key: BIGTOP-685
>                 URL: https://issues.apache.org/jira/browse/BIGTOP-685
>             Project: Bigtop
>          Issue Type: New Feature
>          Components: Tests
>    Affects Versions: 0.5.0
>            Reporter: Wing Yew Poon
>            Assignee: Wing Yew Poon
>             Fix For: 0.5.0
>
>         Attachments: contract.txt
>
>
> Many tests take parameters. Parameters may be passed into a test via system properties or environment variables. These parameters can be regarded as part of the test's contract. Over time, with increasing number of tests, it becomes hard to keep track of the set of parameters that may be used by the tests.
> I propose to address this issue at two levels:
> 1. Introduce an annotation type for annotating a test class with the list of system properties and environment variables used by it. This allows for the contract to be exposed in the javadoc, as well as to annotation processing tools.
> 2. Provide utility functions for automatically obtaining the parameters and their values from the above annotation.
> Not addressed in this proposal: Injecting 2. into the test runner itself (currently we are running tests through JUnit).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira