Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Integration between ceylon.test and java junit test #642

Open
DiegoCoronel opened this issue Nov 24, 2016 · 5 comments
Open

Integration between ceylon.test and java junit test #642

DiegoCoronel opened this issue Nov 24, 2016 · 5 comments
Labels
Milestone

Comments

@DiegoCoronel
Copy link
Contributor

DiegoCoronel commented Nov 24, 2016

Theres lots of famous enterprise frameworks (SprintBoot, Wildfly, etc) extending JUnit behavior to provide a more useful test environment. Currently we can use these frameworks with Ceylon with almost no configuration, but we dont have anything to integrate with their test environment and this is a big restriction to make real programs because we are unable to test the code using these frameworks test environment.

This issue is much more a request for feedback to understand what are the steps to make ceylon.test delegate to junit environment.

@DiegoCoronel
Copy link
Contributor Author

In my mind one possible solution:

  • Declare some kind of extension in ceylon test that will look up for junit test annotation
  • Programatically setup Junit environment
  • Delegate all tests found to junit

Of course Im talking about all this with no knowledge of both test frameworks :( .. so maybe there are restrictions that i dont know.. but Im available to focus my efforts to help with this issue and complete the enterprise development with ceylon + java integration.

What do you think @thradec ?

@luolong
Copy link
Contributor

luolong commented Nov 24, 2016

My take on this is that if we do integrate with JUnit, we should aim for compatibility/integration with JUnit 5/Jupiter as a TestEngine implementation.

@gavinking
Copy link
Contributor

So why precisely is it that we can't simply use JUnit or Arquillian directly from Ceylon?

@DiegoCoronel
Copy link
Contributor Author

So why precisely is it that we can't simply use JUnit or Arquillian directly from Ceylon?

I believe for that we would need to create our Runner, but Arquillian and Sprinboot have their own runner and we cant specify 2 Runners for tests.

@luolong
Copy link
Contributor

luolong commented Nov 24, 2016

Well, I suppose we can. Use JUnit directly from Ceylon that is.

Although I have not tried it myself, so I can not vouch of how well it does work or at what point it falls over.

I suspect that JUnit's native test discovery & execution method might not work so well for Ceylon tests. But I might be wrong and it all works out fine.

What I would like to see however is that ceylon.test tests could be picked up by third party test runners implementing JUnit 5 test runner protocol. That includes IDEs (currently only IDEA implements support for JUnit 5, but Eclipse support is in the works and I have no doubt that others are following suit), build tools, CI platforms, etc.

@bjansen bjansen added the m-test label Jan 5, 2017
@bjansen bjansen modified the milestone: 1.3.2 Jan 5, 2017
@quintesse quintesse modified the milestones: 1.3.2, 1.3.3 Mar 3, 2017
@FroMage FroMage modified the milestones: 1.3.3, 1.4.0 beta Sep 6, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants