Profiling JUnit tests in Eclipse

J

Jan

I have set up Eclipse and have sets of JUnit test cases which I run
directly in Eclipse to monitor results.

I have installed an Eclipse plugin which provides profiling (called
the Eclipse Profiler Plugin - ru.nlmk.eclipse.plugins.profiler
0.5.27).

I want to run my Junit tests within Eclipse and be able to profile
these at the same time but this is not working.

My JUnit test has a main() method, so I don`t understand why it can`t
profile it (I can profile a simple class with a main() method which is
not running JUnit test).

The error I get when I start the profiler with it pointing to the main
method of my testcase is:


There was 1 error:
1) testConvertLegacyData(TestCase1)
java.lang.reflect.InvocationTargetException:
java.lang.NullPointerException
at

TestCase1.testConvertLegacyData(TestCase1.java:81)
at java.lang.reflect.Method.invoke(Native Method)
at junit.framework.TestCase.runTest(TestCase.java:166)
at junit.framework.TestCase.runBare(TestCase.java:140)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:131)
at junit.framework.TestSuite.runTest(TestSuite.java:173)
at junit.framework.TestSuite.run(TestSuite.java:168)
at junit.textui.TestRunner.doRun(TestRunner.java:74)
at junit.textui.TestRunner.run(TestRunner.java:200)
at junit.textui.TestRunner.run(TestRunner.java:186)
at TestCase1.main(TestCase1.java:58)



Can anyone help me with why this is happening?
Thanks in advance for any help,

Jan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top