Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Test and Performance Tools Platform (TPTP) » Running JUnit 4 tests organised with inner classes
Running JUnit 4 tests organised with inner classes [message #788050] Wed, 01 February 2012 04:38 Go to previous message
Joe Lemmer is currently offline Joe Lemmer
Messages: 2
Registered: February 2012
Junior Member
Hi,

I have organised my JUnit tests using one test class for the class that I'm testing and one static inner class each for each method / behaviour that I'm testing.

public class TestMyClass {

    public static class TestMyFirstMethod {
        
        @Test
        public void testMthodOneDoesSomething() {
            // test code here
        }

        @Test
        public void testMethodOneDoesSomethingElse() {
            // test code here
        }
    }

    public static class TestMyMethodTwo {
  
        @Test
        public void testMyMthodTwoDoesSomething() {
            // test code here
        }
    }
}


This works really well for me from an organisational point of view, but I'm am having trouble finding out how to run all the scripts at once. When I shift+alt+X T to run the tests, Eclipse offers me a choice of all the inner classes to run and I seem to have to pick one rather than to run all of them at once.

I really want to run them all at the same time. Is there a way I can configure this?

Many thanks
 
Read Message
Read Message
Read Message
Previous Topic:Eclipse Java Testing Tools - JAVA SE and JSP
Next Topic:No Profiling data captured, whatsoever.
Goto Forum:
  


Current Time: Thu May 23 18:22:47 EDT 2013

Powered by FUDForum. Page generated in 0.01939 seconds