This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Testing and the fly likes Junit4 with Netbeans6 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Junit4 with Netbeans6" Watch "Junit4 with Netbeans6" New topic
Author

Junit4 with Netbeans6

Pat Sri
Greenhorn

Joined: Jun 27, 2006
Posts: 2
I have Test Class and create TestSuite.
Here is my code.

package sampleproject;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;

/**
*
* @author stcc
*/
@RunWith(Suite.class)
@Suite.SuiteClasses( value = {KoloTest.class})
public class NewTestSuite {

// public NewTestSuite() {
// }
//
// @BeforeClass
// public static void setUpClass() throws Exception {
// }
//
// @AfterClass
// public static void tearDownClass() throws Exception {
// }
//
// @Before
// public void setUp() throws Exception {
// }
//
// @After
// public void tearDown() throws Exception {
// }

}

All of my TestClass work but when I use TestSuite Class it doesn't show the result of test. It show just "Junit result root node".
I guess it should show all node of every TestClass.
So what wrong with it?

If you've ever used Junit with Netbeans plase tell me what kind of result came out???
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Junit4 with Netbeans6
 
Similar Threads
junit.awtui.TestRunner- classnotfound error
Question on addTest method of Junit
Test Suites
Junit and Selenium - Passing objects between test cases and test suites
Ant + JUnit integration problem