Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


How to run a test suite?

How to run a test suite?

How to run a test suite?

I am newbie to JUnit. I am running JUnit 4 in eclipse 3.2.1. I have created test cases in a package called "testsuite". Moreover, I have created a test suite in the same package to run these test cases.

Sample code for a test case:


package testsuite;

import junit.framework.TestCase;

import org.junit.Before;
import org.junit.Test;

import system.NodeItem;

public class NodeItemTest extends TestCase {

    NodeItem aNode;
    public void setUp() throws Exception {
        aNode = new NodeItem();

    public void testSetMinTempTherm() {
        assertEquals(2, aNode.getMinTempTherm());

Sample code for the test suite I have created to run this case and another one:



package testsuite;

import junit.framework.Test;
import junit.framework.TestSuite;

public class AllTests {

    public static Test suite() {
        TestSuite suite = new TestSuite("Test for testsuite");
        return suite;

The problem is:

When I run the test cases separetly, everything runs without any problems, but when I try to run the test suite I get the follwing ERROR:

In the Failure Trace window I get "java.lang.Exception: No runnable methods".

In the other winodw if I double click the error, a dialog pop up which says "Method 'testsuite.AllTests' not found. Openning the test class".

I have followed some tutorials to reach the point I am at now. Please help me proceed.

Thanks in advance.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close