Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Why does CDT require JUnit tests to be run through a testsuite?


Can we get rid of the extra test-suite classes?

Yes please!

I believe the answer is that up until now the simple answer is no one has done it. Similar as the move to Junit4 (although I guess we should move to Junit5 now!). Some newer tests are written in Junit4 though.

Jonah

On Wed, 3 Jun 2020 at 14:50, 15 knots <fifteenknots505@xxxxxxxxx> wrote:
Hi all,

is was a bit annoyed when I added Junit test classes and realized that these are not picked up by the build automatically. Instead the CDT parent pom requires me to write an additional testsuite classes to pick up and run the tests.

Are the test suites required to create nicely section testreports in HTML format?

IIRC, it was Junit 2 that required tests to be organized in a hierarchy of test suites with the actual test classes as leaves. Since Junit 3, the test-runner does pick up any individual test class and can run it.

The line in the top-level pom that forces developers to add extra test-suite classes is the non-default
<include>**/AutomatedIntegrationSuite.*</include>.
The default pattern of the surefire-plugin [1] will pick up test classes directly, no test-suite classes required.

Can we get rid of the extra test-suite classes?

/Martin




_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev

Back to the top