Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to launch Plug-in Tests? #25

Closed
buchen opened this issue May 5, 2019 · 16 comments
Closed

How to launch Plug-in Tests? #25

buchen opened this issue May 5, 2019 · 16 comments

Comments

@buchen
Copy link

buchen commented May 5, 2019

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
Copy link
Member

mduft commented May 6, 2019

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
Copy link
Contributor

glatuske commented Dec 3, 2019

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

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

@mduft
Copy link
Member

mduft commented Dec 3, 2019

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
Copy link
Contributor

glatuske commented Dec 3, 2019

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
Copy link
Member

mduft commented Dec 3, 2019

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
Copy link
Contributor

glatuske commented Dec 3, 2019

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

  • generated by Xtext 2.19.0
    */

@mduft
Copy link
Member

mduft commented Dec 3, 2019

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

@miklossy
Copy link
Contributor

miklossy commented Aug 2, 2020

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
Copy link
Member

mduft commented Aug 3, 2020

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
Copy link
Contributor

miklossy commented Aug 3, 2020

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
Copy link
Member

mduft commented Aug 3, 2020

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
Copy link
Contributor

miklossy commented Aug 3, 2020

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

@mduft
Copy link
Member

mduft commented Aug 3, 2020

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
Copy link
Contributor

miklossy commented Aug 3, 2020

Thanks, I will give it a try!

@mduft
Copy link
Member

mduft commented Dec 14, 2020

Fixed by #36

@mduft mduft closed this as completed Dec 14, 2020
@mduft
Copy link
Member

mduft commented Dec 14, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants