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

Document how to use ConsoleLauncher archive in the User Guide #155

Closed
nipafx opened this issue Feb 13, 2016 · 9 comments
Closed

Document how to use ConsoleLauncher archive in the User Guide #155

nipafx opened this issue Feb 13, 2016 · 9 comments

Comments

@nipafx
Copy link
Contributor

nipafx commented Feb 13, 2016

I've been trying to get the console runner working for a while now (the one from the ZIP linked in #146) but failed. I'm assuming I'm doing something wrong.

After I failed to launch the script in any sensible configuration, I looked at the code and got it running from within IntelliJ with the following parameters:

-p ${my_test_root_directory} -a

or

-p ${my_test_root_directory} ${name_of_some_test_class}

Irritatingly, the same arguments to the script lead to an empty run:

junit-console -p ~/code/JUnit-5-Demo/target/test-classes/ -a

Feb 13, 2016 7:46:04 AM org.junit.gen5.launcher.main.ServiceLoaderTestEngineRegistry loadTestEngines
INFO: Discovered TestEngines with IDs []
Test execution started. Number of static tests: 0
Test execution finished.

As I said, I'm assuming I'm doing something wrong but I have no idea what it could be.

@marcphilipp marcphilipp added this to the 5.0 M1 milestone Feb 13, 2016
@marcphilipp
Copy link
Member

From the logging it looks like no TestEngines are available at runtime. Are junit5-engine.jar and junit4-engine.jar present in the lib folder and included in the classpath in junit-console.sh/.bat?

@nipafx
Copy link
Contributor Author

nipafx commented Feb 13, 2016

Damn it! 😳 Well, at least I was right that I was doing something wrong. 😜 I even checked that but mistook junit-engine-api-5.0.0-ALPHA.jar for junit5-engine-5.0.0-ALPHA.jar.

Now that that's solved I end up at a similar point as in #146. Is the ZIP The Official Way to get and use the console runner? If so, I'd be happy to ...

  1. document the current situation
  2. slightly change the script to include all JARs in lib
  3. add the test engines or at least recommend them in the documentation

What do you think?

@marcphilipp
Copy link
Member

Yep, the ZIP is the official way to use the console runner and therefore should be documented as such. Do you have time to provide a pull request?

Regarding the script: I agree that it would be nice to include all JARs in the lib folder. However, the script is not hand-written but generated by Gradle. I very briefly looked into the options of the application plugin and couldn't find a way to enable this behaviour besides overriding the whole script. Since I do not want to maintain a shell and a batch script, I don't think that's the way to go. Maybe you can find a way to change its behaviour without replacing the whole script?

The test engines have been added (in the current snapshot) in #146.

@marcphilipp
Copy link
Member

Team decision: Document how to use ZIP distribution in User Guide.

@nicolaiparlog Do you have time to work on this issue?

@nipafx
Copy link
Contributor Author

nipafx commented May 13, 2016

Let's see how #258 comes along (good thing, I'm lazy).

@sbrannen sbrannen changed the title Document Console Runner Document ConsoleLauncher Jun 29, 2016
@sbrannen sbrannen modified the milestones: 5.0 M2, 5.0 M3 Jul 15, 2016
@sbrannen sbrannen changed the title Document ConsoleLauncher Document how to use ConsoleLauncher archive in the User Guide Aug 8, 2016
@marcphilipp marcphilipp modified the milestones: 5.0 M3, 5.0 M4 Oct 11, 2016
@Mathreyu
Copy link

Hey there, I recently got interest in helping to this awesome project. How can I help in this issue? (I'm rather new to this so bare with me if I take a while :P)

@sbrannen
Copy link
Member

@Mathreyu, glad to hear you're interested in helping out!

At the moment, however, I think it's probably better to wait on the outcome of #258 before we spend too much time documenting how to use the ConsoleLauncher since that will certainly change.

In the meantime, you are free to check out any of the other up-for-grabs issues.

@Mathreyu
Copy link

@sbrannen Thanks :D Will do.

@marcphilipp
Copy link
Member

We have decided to get rid of the ZIP archive distribution in favor of providing a fat JAR (see #258).

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

No branches or pull requests

4 participants