xsbt-cucumber-plugin icon indicating copy to clipboard operation
xsbt-cucumber-plugin copied to clipboard

Not a file or directory: .../pretty

Open Glamdring opened this issue 11 years ago • 6 comments

I'm running the sbt-cucumber-plugin on Windows, with cygwin.

I get: Exception in thread "main" java.lang.IllegalArgumentException: Not a file or directory: C:\Users\workspace\pretty

However, the "out" files contains the following:

[0m[[0mdebug[0m] [0mJVM Settings: JvmSettings(List(<..>\target\scala-2.10\test-classes, <..>\target\scala-2.10\classes, <..>.sbt\boot\scala-2.10.3\lib\scala-library.jar, <...etc classpathentries>,cucumber.api.cli.Main,LoggedOutput(sbt.MultiLogger@1e6bfa26),Map(),List(),Some(256M),Some(64M))[0m [0m[[0mdebug[0m] [0mCucumber Options: Options(classpath:,,List(),,,false,false,false)[0m [0m[[0mdebug[0m] [0mCucumber Output: Output(false,false,false,false,<..>\target\scala-2.10.3\cucumber.txt,<..>\target\scala-2.10.3\cucumber-report,<..>\target\scala-2.10.3\cucumber.xml,<..>\target\scala-2.10.3\cucumber.json)[0m [0m[[0minfo[0m] [0mRunning cucumber...[0m

(here it gets interesting) [0m[[0mdebug[0m] [0m-classpath <...same classpath as above - classes folders and jars) <..>.ivy2\cache\org.scala-tools.testing\test-interface\jars\test-interface-0.5.jar -Xmx256M -XX:MaxPermSize=64M cucumber.api.cli.Main --glue --format pretty --name classpath:[0m [0m[[31merror[0m] [0mException in thread "main" java.lang.IllegalArgumentException: Not a file or directory: C:\Users\workspace\pretty[0m

Three things that bother me:

  • the line that is supposed to print the classpath, also prints ..cliMain and a bunch of command-line options
  • cucumberSettings from the build config are reflected (i.e. when I add CucumberPlugin.cucumberHtmlReport := true, --format html is added to that line), but "pretty" is always there, regardless of what is configured
  • there are two spaces after --glue

I don't know whether the two spaces might be an issue on windows (and not be an issue on linux, for example), but that's what I find suspicious.

Glamdring avatar Feb 06 '14 18:02 Glamdring

And when I create the folder "pretty", it finds it and I get:

None of the features at [pretty] matched the filters: [classpath:]

Glamdring avatar Feb 07 '14 08:02 Glamdring

We have the same problem on Windows 7 in 'cmd'

maciejjaskowski avatar Feb 27 '14 09:02 maciejjaskowski

I am also facing same issue in Windows 8.1

with

Exception in thread "main" cucumber.runtime.CucumberException: Couldn't load formatter class: json-pretty

chetandewangan avatar Mar 03 '14 16:03 chetandewangan

I'm running the sbt-cucumber-plugin on Windows, WITHOUT cygwin. Despite my best attempts, I haven't been able to get anything to work. Although I enjoy writing the features in a separate, it would seem the FeatureSpec is the only way to go at the moment.

[info] Running cucumber...
[error] Exception in thread "main" java.lang.IllegalArgumentException: Not a file or directory: C:\project\pretty
[error]         at cucumber.runtime.io.FileResourceIterator$FileIterator.<init>(FileResourceIterator.java:54)
[error]         at cucumber.runtime.io.FileResourceIterator.<init>(FileResourceIterator.java:20)
[error]         at cucumber.runtime.io.FileResourceIterable.iterator(FileResourceIterable.java:19)
[error]         at cucumber.runtime.model.CucumberFeature.load(CucumberFeature.java:51)
[error]         at cucumber.runtime.model.CucumberFeature.load(CucumberFeature.java:33)
[error]         at cucumber.runtime.RuntimeOptions.cucumberFeatures(RuntimeOptions.java:124)
[error]         at cucumber.runtime.Runtime.run(Runtime.java:89)
[error]         at cucumber.api.cli.Main.run(Main.java:20)
[error]         at cucumber.api.cli.Main.main(Main.java:12)
[trace] Stack trace suppressed: run last *:cucumber for the full output.
[error] (*:cucumber) There were failed tests.
[error] Total time: 3 s, completed Apr 15, 2014 9:37:26 AM

asotrox avatar Apr 15 '14 16:04 asotrox

I am also facing same issue :

Exception in thread "main" java.lang.IllegalArgumentException: Not a file or directory: /pretty

How to resolve this issue?

chetandewangan avatar Jul 07 '14 13:07 chetandewangan

Any advice from anyone, on how to solve this problem?

ezhiljohnson avatar Nov 25 '14 10:11 ezhiljohnson