ssi-schaefer / lcdsl

Eclipse Launch Configuration DSL (Xtext based)
Eclipse Public License 1.0
23 stars 12 forks source link

How to launch Plug-in Tests? #25

Closed buchen closed 3 years ago

buchen commented 5 years ago

Is there a way to launch plug-in tests?

I usually would create the launch configuration by right-clicking the project and choosing "Run --> JUnit Plug-in Test".

mduft commented 5 years ago

This is still an open point. Unit tests are right now not supported. All dependencies are there, it's just a TODO... contributions of course more than welcome :)

glatuske commented 4 years ago

I plan to contribute support for JUnit Plug-in and SWTBot tests.

Is there recommendation for the Xtext version which should be used?

mduft commented 4 years ago

Yay, great! :) I currently use Xtext 2.19.0, but I assume it would work with slightly different versions without any change. If you need smallish guidance through the code, feel free to contact me anytime :)

glatuske commented 4 years ago

I used 2.19 too. That results in small changes in almost every generated file. Is there a general minimal required Eclipse version? Probably this would restrict the Xtext version.

The major implementation part is already done. I'm still want to update the documentation and fix some issues on auto completion. Because I did the implementation as part of a hackathon at my company, I need an approval for the contribution. So I hope, I can provide you the first version for review before Christmas.

mduft commented 4 years ago

This is great to hear! Are you on Windows? Maybe line endings (I'm on Linux)? Or is it actual code changes? Whatever it is, as long as the generated code works we're fine here IMHO :) Eagerly awaiting the pull request!

glatuske commented 4 years ago

I'm working on Windows. I'll check the line endings. But I think it's more about the comment in each Java file: /*

mduft commented 4 years ago

OK. As long as you're based of off the current master, I'm OK with all the files changing :)

miklossy commented 3 years ago

Hello Markus!

In your LcDsl presentation on the EclipseCon Europe 2018 (at 17:50 minute) you mentioned that it is possible with LcDsl to specify environment variables to run automated ui tests on different display. I would like to run the Xtext Domainmodel example (File -> New -> Example... -> Xtext Examples -> Xtext Domain-Model Example) Plug-in Tests (org.eclipse.xtext.example.domainmodel.ui.tests) on the secondary display.

Could you please help me how to define such a launch configuration in LcDsl?

Thank you very much for your help in advance!

Tamás

mduft commented 3 years ago

Hi. You're right, I said that :) but we were (are) not using Plug-in Test Launch Configurations. Our tests run as "normal" eclipse launch configuration. LcDsl still has no support for Unit Test Launch Configurations at all right now - it needs to be added...

miklossy commented 3 years ago

Do you know how to configure that using the standard Eclipse Launch Configuration mechanism? Once I make it work using the standard way (without LcDsl) , I can add this support to LcDsl as well.

mduft commented 3 years ago

Unfortunately we're not using actual 'tests' at all - we're using a plain Eclipse application to run our custom test framework, so no, sorry :|

miklossy commented 3 years ago

Maybe you can help me how it is possible to make a plain Eclipse application run on a secondary display?

mduft commented 3 years ago

Sure, on linux you need to set DISPLAY in the launch configuration like this:

environment DISPLAY=":5";

Then start a Xephyr or Xvfb on :5 before launching - this should do the trick...

miklossy commented 3 years ago

Thanks, I will give it a try!

mduft commented 3 years ago

Fixed by #36

mduft commented 3 years ago

https://mduft.github.io/lcdsl-latest has been updated with the 0.3.0 version which includes #36 - Thanks @glatuske for the contribution!