[
https://issues.apache.org/jira/browse/LUCENE-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470739#comment-13470739
]
Robert Muir commented on LUCENE-4463:
-------------------------------------
{quote}
you can do:
ant test -Dtests.dups=100 -Dtestcase=XXXX -Dtestmethod=YYYY
It will respin the suite/test 100 times. The global starting seed will be
identical for each suite though (because they have exactly the same name). If
you want different seeds each time there is no way to do this other than
re-running the task (junit4) 100 times using a script or something.
{quote}
{noformat}
test:
[junit4:junit4] <JUnit4> says cześć! Master seed: 968CB4DA24E595DE
[junit4:junit4] Executing 10 suites with 4 JVMs.
[junit4:junit4]
[junit4:junit4] Suite: org.apache.lucene.TestDemo
[junit4:junit4] OK 0.54s J3 | TestDemo.testDemo
[junit4:junit4] Completed on J3 in 1.09s, 1 test
[junit4:junit4]
[junit4:junit4] Suite: org.apache.lucene.TestDemo
[junit4:junit4] OK 0.50s J2 | TestDemo.testDemo
[junit4:junit4] Completed on J2 in 1.05s, 1 test
[junit4:junit4]
[junit4:junit4] Suite: org.apache.lucene.TestDemo
[junit4:junit4] OK 0.46s J0 | TestDemo.testDemo
[junit4:junit4] Completed on J0 in 0.98s, 1 test
...
{noformat}
This is really cool and fast especially since it gets multiple threads. I wish
there was a way to get different seeds each time:
what do you mean when you say each suite has exactly the same name? Could there
be an option that somehow wraps each suite
with a "fake name" (e.g. TestDemo-1, TestDemo-2) to trick it into getting
different ones?
> add support for running the same test method many times
> -------------------------------------------------------
>
> Key: LUCENE-4463
> URL: https://issues.apache.org/jira/browse/LUCENE-4463
> Project: Lucene - Core
> Issue Type: Wish
> Components: general/build
> Reporter: Robert Muir
> Attachments: LUCENE-4463.patch
>
>
> I have a shell script for this, mike has a python script, its annoying :)
> I want to do something like this:
> ant beast -Dtestcase=XXXX -Dtestmethod=YYYY -Diterations=100
> I would be happy with a simple loop that just invokes 'test' somehow: getting
> a fresh new JVM to each iteration is desirable anyway (so you get fresh
> codecs, etc).
> the -Dtests.iters is not really useful for this because it does not allow
> -Dtestmethod and it does not give a fresh jvm.
> bonus points if it can use multiple jvms at the same time though :)
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]