Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wtp-dev] JUnit 4: Am I silly and embarrassed? Or missing something?

My understanding is this:

1. No unit tests in WTP yet take advantange of JUnit 4.

2. Since the range is set strict, it will currently always use JUnit 3.8.2 for testing.

When we will have problems and the changes are necessary is when a project does use JUnit 4. Which it really does offer several advantages over JUnit 3, and can make setting up large test suites much simpler.

What you can't do without making the change is Mix Junit3 and JUnit 4 tests. Because the test frameowork can't randomly instantiat the JUnit 3 framework, and Junit 4 frameworks because they were different bundle names. With the change they have deprecated the old junit4 bundle, and now everything is version as org.junit. With appropriate ranges. So now you can mix Junit3 and Junit 4 tests as long as you set your version ranges to have no max version specified. This way it will pickup Junit4 and run all tests using the Junit 4 framework, since Junit 3 tests can be run under Junit 4.

Hope that helps clarify the situation, or at least my understanding of it.

Dave



David M Williams wrote:

Or all of the above?

With the recent notes about the inclusion of org.junit version 4, and from following several bugs, I got the impression that we _had_ to make the kind of adjustments so well described in http://wiki.eclipse.org/Eclipse/Testing/JUnit4_Changes or else our tests would fail.

Over the weekend, I updated to latest platform I-build prereq and ran a few test builds. I expected our unit tests to fail all over the place, since few have made the described adjustments.

But ... all the tests ran just fine!

So, I'm thinking maybe I have been misunderstanding all along?

Or, maybe it is because no one in WTP is yet trying to use junit version 4?

Or, perhaps our test scripts are different enough from the standard one (from Platform) that we are not effected?

Or, maybe I'm missing something?

Is it only "running in the IDE" that it matters? And does not matter when ran in "batch mode"?

I currently can not get "Run As ... plugin unit test" to run in my workbench, so maybe that is where it does matters (but, its not failing in ways described, and I haven't ran any tests in my workspace for months, so not sure what shape it is in).

Maybe I'm the only one confused, but thought I'd post this comment, and look forward to hearing of others experiences, if successful, or seeing your bug reports if not. :)

Thanks,

------------------------------------------------------------------------

_______________________________________________
wtp-dev mailing list
wtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/wtp-dev



Back to the top