as I'm using tycho pomless tycho surefire is not enabled for my plugin.
Would it have worked if I have had enabled surefire? Is surefire
responsible to compile the test classes? Are source folders that contain
test are explicitly excluded in the normal build?
From Tycho POV, the source folders are controlled by the build.properties file. Tycho just processes the build.properties file and ignores .classpath; so if you test folder is not in build.properties, it's ignored..
It would be a good possible enhancement that in case no build.properties exist, Tycho default to something smart enough from .classpath. I don't know how much PDE would like it or not though. If PDE can already handle that, then it brings even move value to having that in Tycho soon.
Now, for the case of having tests in the same module but not in the bundle package, I think it's kind of impossible with the way tycho-surefire-plugin runs the tests: tycho-surefire-plugin will provision an Eclipse application including the bundle, and the bundle would need to contain the test class for tycho-surefire-plugin to load them.
It would be interesting to let Tycho automatically build a test fragment from the "test" source folders of the current module and make tycho-surefire-plugin include it. But it involves tweaking a lot of things in many mojo. The result would probably be great, but not easy to reach IMO.