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

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

Reopening this to submit improvements on the original prototype.
I uploaded a new patch.
The changes are as follows:
- Renamed Parameters annotation to Contract, to avoid confusion with the 
org.junit.runners.Parameterized.Parameters annotation.
- Added convenience utility functions for setting parameters, using naming 
conventions for the static fields, so user does not have to specify them.
- Added detailed javadocs.

                
> 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: BIGTOP-685-2.txt, 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
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to