Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 552370 - [pomless][eclipse-test] support execution/discovery of TestSuites
Summary: [pomless][eclipse-test] support execution/discovery of TestSuites
Status: CLOSED DUPLICATE of bug 564670
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Tycho (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Christoph Laeubrich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-24 04:54 EDT by Christoph Laeubrich CLA
Modified: 2021-04-28 16:51 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Laeubrich CLA 2019-10-24 04:54:31 EDT
currently default includes will be **/Test*.java **/*Test.java **/*TestCase.java

In the Eclipse-IDE offers a way to add a TestSuite and name this "AllTests", so it woud be good to include **/*Tests.java into the default pattern.
Comment 1 Mickael Istria CLA 2019-10-24 07:58:47 EDT
One risk with this is that if you have

Test1
Test2
Test3
and AllTest being a suite of the 3 previous one, then a new pattern would basically run Test1, Test2 and Test3 twice: one as standalone testCases, and once as part of the suite.
Comment 2 Christoph Laeubrich CLA 2019-10-24 09:01:01 EDT
Thats true but in fact in my case a "Suite" is only used because of all other tests don't match in name.
Comment 3 Mickael Istria CLA 2019-10-24 09:19:19 EDT
(In reply to Christoph Laeubrich from comment #2)
> Thats true but in fact in my case a "Suite" is only used because of all
> other tests don't match in name.

It's not the general case.
Platform has plenty of suites structured to cover different parts, different package, with some different settings... Also, different tools (JDT even) may provide extra-value for suites that make people define them anyway.
So we cannot assume that people are fine getting of suites to make a decision here. IMO, it's still about always better to explicit the `test` in the pom.xml.
Comment 4 Christoph Laeubrich CLA 2019-11-03 04:46:06 EST
Okay, I see, will close this request as it seems to be not suitable.
Comment 5 Christoph Laeubrich CLA 2019-11-06 00:45:46 EST
I noticed that Eclipse-Platfrom-Test uses the following setup:

<packaging>eclipse-test-plugin</packaging>
<properties>
 <testSuite>${project.artifactId}</testSuite>
 <testClass>org.eclipse.text.tests.EclipseTextTestSuite</testClass>
</properties>

But I can't find out what these properties actually means, can someone redirect me to the documentation? Maybe we just need support for those in the pomlessbuilds to resolve my issue?
Comment 6 Mickael Istria CLA 2019-11-06 02:12:17 EST
(In reply to Christoph Laeubrich from comment #5)
> <properties>
>  <testSuite>${project.artifactId}</testSuite>
>  <testClass>org.eclipse.text.tests.EclipseTextTestSuite</testClass>
> </properties>
> 
> But I can't find out what these properties actually means, can someone
> redirect me to the documentation?

Those are properties to configure the tycho-surefire-plugin: https://www.eclipse.org/tycho/sitedocs/tycho-surefire/tycho-surefire-plugin/test-mojo.html#testClass

The testSuite may actually be useless.
Comment 7 Christoph Laeubrich CLA 2019-11-06 02:59:23 EST
Thanks I'll test this, can these properties also be specified in the surefire.properties[1] file or must they be given by maven-properties?

[1] https://www.eclipse.org/tycho/sitedocs/tycho-surefire/tycho-surefire-plugin/test-mojo.html#surefireProperties
Comment 8 Mickael Istria CLA 2019-11-06 03:04:20 EST
(In reply to Christoph Laeubrich from comment #7)
> Thanks I'll test this, can these properties also be specified in the
> surefire.properties[1] file or must they be given by maven-properties?

I don't know, sorry.
Comment 9 Christoph Laeubrich CLA 2020-03-01 08:58:35 EST
After some more investigation I think what we really need is supporting to pass some properties "pomless" to the tycho-surefire plugin, I'll prepare a patch for this so we can review/discuss.
Comment 10 Mickael Istria CLA 2020-03-01 11:04:28 EST
(In reply to Christoph Laeubrich from comment #9)
> After some more investigation I think what we really need is supporting to
> pass some properties "pomless" to the tycho-surefire plugin, I'll prepare a
> patch for this so we can review/discuss.

Either there is a stamdard file for surefire oraven pomless to pass those properties and we should reuse those, otherwise.wecan use the build.properties fileas source for build properties.
It's essential that Tycho doesn't define a new convention, a nez file name, whatever.
Comment 11 Christoph Laeubrich CLA 2020-03-02 08:06:01 EST
Yep, build.properties could be used as it already is used for marking/skipping a bundle as a test. I just want to investigate some setups in the wild to check if we can guess some properties from the manifest for example.
Comment 12 Christoph Laeubrich CLA 2020-06-26 01:38:15 EDT

*** This bug has been marked as a duplicate of bug 564670 ***