4

I have a java program for JUnit test which I have written in netbeans IDE where I am testing a class with single thread. When I am going to compile this its working fine and showing results 100% success, but when I am trying to run this program I am getting an exception that is -

Testsuite: glb.chatmeter.crawler.yahoolocal.YahooBusinessDataTest Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0.057 sec

Testcase: warning(junit.framework.TestSuite$1): FAILED No tests found in glb.chatmeter.crawler.yahoolocal.YahooBusinessDataTest junit.framework.AssertionFailedError: No tests found in glb.chatmeter.crawler.yahoolocal.YahooBusinessDataTest

Testsuite: glb.chatmeter.crawler.yahoolocal.YahooBusinessDataTest Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec

Testcase: glb.chatmeter.crawler.yahoolocal.YahooBusinessDataTest:null: Caused an ERROR Forked Java VM exited abnormally. Please note the time in the report does not reflect the time until the VM exit. junit.framework.AssertionFailedError: Forked Java VM exited abnormally. Please note the time in the report does not reflect the time until the VM exit. at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:154)

is its netbean problem or some thing else? is any one help me thanks.

My code is like this-

public class BusinessDataTest {

    String url = "http://local.com/info-66122628-andy-richards-house-painting-mesa";
    Integer[] locId = {1354};
    String customerDetail ="Business Name";

    public BusinessDataTest() {
    }

    @BeforeClass
    public static void setUpClass() throws Exception {
    }

    @AfterClass
    public static void tearDownClass() throws Exception {
    }

    @Test
    public void testGetFullDataOfBusiness() {
        System.out.println("getFullDataOfBusiness");
        BusinessData instance = new BusinessData();
        Integer expResult = 4;
        Integer result = instance.getFullDataOfBusiness(url, customerDetail);
        System.out.println("Result : " + result);
        assertEquals(expResult, result);
    }
}
Chris
  • 11,100
  • 13
  • 44
  • 67
Khoyendra Pande
  • 1,617
  • 3
  • 25
  • 41

1 Answers1

0

This looks like a bug in Netbeans - See Bug 204729

akjain
  • 1,677
  • 3
  • 20
  • 35