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?



On Thu., Jun. 4, 2020, 16:54 15 knots, <fifteenknots505@xxxxxxxxx> wrote:

Am Mi., 3. Juni 2020 um 21:48 Uhr schrieb Jonah Graham <jonah@xxxxxxxxxxxxxxxx>:

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

Yes please!

Through gerrit only or should I file a Bug?

Please file a bug. 


Changes would be: fix the surefire config, delete test suite classes.

Yes that sounds good to me. 


Plus we should verify that the number of tests run stays the same.
We could grep the maven output for 'Tests run: 123' to get the number before and after.
 
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
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
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