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

Kirk Lund commented on GEODE-166:
---------------------------------

This now exists on branch feature/GEODE-217.

> Enable test cases to be repeated by way of a JUnit Rule and custom annotation 
> (e.g. @Repeat).
> ---------------------------------------------------------------------------------------------
>
>                 Key: GEODE-166
>                 URL: https://issues.apache.org/jira/browse/GEODE-166
>             Project: Geode
>          Issue Type: Improvement
>          Components: general
>    Affects Versions: 1.0.0-incubating
>         Environment: Apache Geode Test environments (e.g. Gradle, Maven and 
> IDE).
>            Reporter: John Blum
>            Assignee: Kirk Lund
>            Priority: Minor
>         Attachments: Repeat.java, RepeatRule.java
>
>
> Ideally, it would be nice to encapsulate the logic for repeating a test case 
> in the _Apache Geode_ test suite using the test framework (i.e. JUnit) by way 
> of a JUnit Rule and accompanying Java Annotation, like {{@Repeat}}.
> For instance, a developer could annotate a test case method in a test class 
> like so...
> {code:java}
> @Test
> @Repeat(10)
> public void someTestCase() {
>   ...
> }
> {code}
> Alternatively, a developer could specify the test run count using a System 
> property that is settable from the command-line (using Gradle/Maven/Ant) or 
> via his/her IDE, for instance...
> {code:java}
> @Test
> @Repeat("test.runs")
> public void someTestCase() {
>   ...
> }
> {code}
> Then...
> {code}
> $ gradlew test -Dsingle.test=MyTestClass *-Dtest.runs=10*
> {code}
> It is up to the developer to define different conventions and System 
> properties used to enable a collection or specific grouping of tests to run 
> multiple times.
> The Java Annotation approach is more portable then build-based test 
> repetition.



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

Reply via email to