Skip to content

Execution from packaged jar fails #2

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

Open
GoogleCodeExporter opened this issue May 27, 2015 · 8 comments
Open

Execution from packaged jar fails #2

GoogleCodeExporter opened this issue May 27, 2015 · 8 comments

Comments

@GoogleCodeExporter
Copy link

Within our environment it is necessary to execute the tests from the packaged 
jar file. This fails because WildcardPatternSuite.getBaseDir() returns a File. 
For us it would be better if it would return an InputStream instead.

What steps will reproduce the problem?
You can reproduce the problem by following the steps described on:
http://stackoverflow.com/questions/18055189/why-my-uri-is-not-hierarchical

What is the expected output? What do you see instead?
Expected is a runing test suite.
Instead I get an exception:
Testcase: initializationError(<myPackage>.MyUnitTests): 
Caused an ERROR URI is not hierarchical
java.lang.IllegalArgumentException: URI is not hierarchical
   at java.io.File.<init>(File.java:363)
   at com.googlecode.junittoolbox.WildcardPatternSuite.getBaseDir(WildcardPatternSuite.java:135)
   at com.googlecode.junittoolbox.WildcardPatternSuite.findSuiteClasses(WildcardPatternSuite.java:59)
   at com.googlecode.junittoolbox.WildcardPatternSuite.getSuiteClasses(WildcardPatternSuite.java:54)
   at com.googlecode.junittoolbox.WildcardPatternSuite.<init>(WildcardPatternSuite.java:180)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)


What version of the product are you using? On what operating system?
Version 1.5
Windows 7 environment

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 23 Jan 2014 at 1:41

@MichaelCowanPdx
Copy link

Any updates on this? It is still happening.

@hsyed
Copy link

hsyed commented Nov 9, 2017

Can't run the tests from bazel as the tests are always run from a packaged jar.

@JohannesRudolph
Copy link

JohannesRudolph commented Jan 25, 2018

Same issue here. Anyone have details where exactly junit-toolbox needs to be fixed?

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