extension request on org.junit.internal.MethodSorter

[email protected] Tue, 3 Dec 2013 20:30:22 +0100
Newsgroups gmane.comp.java.junit.user
Message-ID <CAJhjstjqQytDk3qVR8j_y5Uh6xRVsPn9gp3z1kfXXWQmV0-F-A@mail.gmail.com>
Hi Mathew and David

Having used Junit with great pleasure inside the eighth largest software
organization in the world during many years I would like to ask you to add
an method sorter extension to org.junit.internal.MethodSorter.

It looks like:

    /**
     * Linear congruential pseudorandom number sort order, with
     * {@link Random#nextInt(int) } as a tiebreaker
     */
    public static Comparator<Method> PSUEDO_RANDOM = new
Comparator<Method>() {
        public int compare(Method m1, Method m2) {
            final int nextInt = randomizer.nextInt(2);
            return nextInt == 0 ? -1 : 1;
        }
    };

I can submit the full code sample with Junit test cases somewhere. It would
be a great addon in junit since there are many developers that sometimes
forget that it is a bad idea to create test classes where the testmethods
depend on each other. TestNG has this feature. This addon would make Junit
standout better in feature comparisions.

Look forward to hearing from you soon.

Regards

Long time user and promoter of Junit

- ikedumike