testng-team / testng

TestNG testing framework
https://testng.org
Apache License 2.0
1.98k stars 1.02k forks source link

Running tests on Method/Class directly fails with error Initializer not found #681

Closed gnulib closed 9 years ago

gnulib commented 9 years ago

After upgrade to latest Eclipse testng plugin (version 6.9.0.201505070412) I'm not able to run tests directly on test methods/class. It fails with error mockit.initegration.testng.initializer not found.

I verified that my class path are correct, and that jmockit jar is in library. However, it continues to give error.

I'm able to run mvn test at the project level, that does not have problem. Its only a problem when running test on a test method, or test class directly from eclipse. This is blocking TDD for us.

As a workaround, I reverted my eclipse testng plugin back to an older (6.8.xxxx) build, and then things started working normally same as before the upgrade to latest build.

cbeust commented 9 years ago

@missedone Any thoughts?

missedone commented 9 years ago

@gnulib

could you generate a small project for us to reproduce the issue? put it on github or cloud driver, thanks

cbeust commented 9 years ago

I did a few quick tests and I was able to run class and method tests directly without any problems.

What is the error exactly? Does this happen for tests that don't need JMockit?

As @missedone said, the best way to investigate this is if you could make a small project or snippet available to reproduce the issue.

Thanks.

gnulib commented 9 years ago

Thank you for looking into this. I'll try to recreate and upload a small project.

Regards, Amit

gnulib commented 9 years ago

I verified on a new installation of Eclipse over Windows with Java8, with latest testng plugin, and it was able to run the test method directly. So, issue I noticed must have been related to something specific in my setup (Mac OS-X 10.10, Java7).

We can close this case for now, and if I'm able to reproduce this with a small project, I'll re-open the issue.

Regards, Amit