得到"junit.framework.AssertionFailedError:分叉的Java VM异常退出".例外 [英] Getting "junit.framework.AssertionFailedError: Forked Java VM exited abnormally" Exception
问题描述
我有一个用于JUnit测试的Java程序,该程序是我在netbeans IDE中编写的,用于测试单线程的类. 当我要编译它时,它可以正常工作并显示出100%成功的结果,但是 当我尝试运行该程序时,出现了一个异常-
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 测试运行:1,失败:1,错误:0,经过的时间:0.057秒
Testsuite: glb.chatmeter.crawler.yahoolocal.YahooBusinessDataTest Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0.057 sec
测试用例:警告(junit.framework.TestSuite $ 1):失败 在glb.chatmeter.crawler.yahoolocal.YahooBusinessDataTest中找不到测试 junit.framework.AssertionFailedError:在glb.chatmeter.crawler.yahoolocal.YahooBusinessDataTest
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 测试运行:1,失败:0,错误:1,经过时间:0秒
Testsuite: glb.chatmeter.crawler.yahoolocal.YahooBusinessDataTest Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
测试用例:glb.chatmeter.crawler.yahoolocal.YahooBusinessDataTest:空:导致错误 分叉的Java VM异常退出.请注意,报告中的时间不会反映出VM退出之前的时间. junit.framework.AssertionFailedError:分叉的Java VM异常退出.请注意,报告中的时间不会反映出VM退出之前的时间. 在org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:154)
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)
是netbean问题还是其他问题?有谁可以帮助我吗?
is its netbean problem or some thing else? is any one help me thanks.
我的代码就是这样-
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);
}
}
推荐答案
这看起来像Netbeans中的错误-请参见错误204729
This looks like a bug in Netbeans - See Bug 204729
这篇关于得到"junit.framework.AssertionFailedError:分叉的Java VM异常退出".例外的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!