Closed GoogleCodeExporter closed 9 years ago
Original comment by Sergey.S...@gmail.com
on 1 Aug 2011 at 9:09
I'm running into this problem as well.
OS: Ubuntu
IJ version: 10.5.1
JSTD plugin version: 1.3.5
Same stack trace as the OP.
Original comment by noel....@gmail.com
on 19 Aug 2011 at 5:17
Fixed version of the plugin is 1.3.6.
Original comment by Sergey.S...@gmail.com
on 28 Sep 2011 at 8:30
Getting the same issue! Whenever I change my configuration.
Original comment by bartw...@gmail.com
on 10 Nov 2011 at 7:03
I'm getting the error "Unable to attach test reporter to test framework...."
but only when I'm try to use the "All configuration files in directory" option.
This option is really important for my large project. Any help would be
greatly appreciated.
JSTestDriver Plugin Version 1.3.9
IntelliJ version 10.5.2
Windows 7
Original comment by bartw...@gmail.com
on 10 Nov 2011 at 8:31
Original comment by corbinrs...@gmail.com
on 10 Nov 2011 at 8:35
I apologize but I found out the issue and it wasn't a bug. I had named my test
config files with a .conf extension and IntelliJ wasn't figuring out they were
config files for the JSTestDriver. I renamed them with a .jstd extension and
now the "All configuration files in directory" option is working. It wasted
1/2 a day of my life - it would by nice if the docs specified to name the
config files with a .jstd extension when using IntelliJ.
Original comment by bartw...@gmail.com
on 10 Nov 2011 at 10:31
Thanks for the feedback, bartwood.
* Actually "Unable to attach test reporter to test framework...." message means
that JsTestDriver server is not running or have no captured browsers.
In such case there is a detailed error description on the right panel. If you
don't see it or see something else, please let me know.
* Have you successfully run tests from attached project from the console?
It seems "factor.should factor 1" test expects 'factor' function definition.
* JsTestDriver IntelliJ plugin v1.3.9 bundles JsTestDriver 1.3.3c.
JsTestDriver 1.3.3c requires you to use JasmineAdapter version 1.1.2 from https://github.com/ibolmo/jasmine-jstd-adapter/tags .
JasmineAdapter version 1.1.2 depends on jasmine.js version 1.1.0.
You have jasmine.js version 1.0.2 and unknown version of JasmineAdapter.js.
I recommend you to download right dependencies manually or use plugin to correct them.
To correct missing dependencies with help of the plugin, please do this:
1) remove primefactor/lib folder, that contains jasmine.js and JasmineAdapter.js
2) restart IDE
3) open factor_spec.js, you will see error hightlighting on 'describe' and 'it' functions
4) position the caret on the error-highlighted code, press Alt+Enter and choose "Add Jasmine adapter support for JsTestDriver" from the list of available intention actions.
5) specify the location for jasmine.js and JasmineAdapter.js.
* Actually "All configuration files in directory" works fine for the attached
project. A file is considered to be JsTestDriver configuration file if its name
matches 'jsTestDriver.conf' or '*.jstd'.
Maybe you are talking about another project.
I'll add '*.jstd' info to the wiki page.
Thanks!
Original comment by Sergey.S...@gmail.com
on 11 Nov 2011 at 6:30
Hi Sergey,
In IntelliJ, if I named the conf files with a .conf extension IntelliJ does not
put the 'JSTD' icon on the file. It doesn't recognize the file as a 'JSTD'
file. When I try to run using the 'All configuration files in directory' it
bombs because the plugin doesn't recognize there are any files in the
directory. If I rename the files to .jstd then IntelliJ puts the 'JSTD' icon
on the files and I can run with the 'All configuration files in directory'
option with no errors at all. I just think that the error 'Unable to attach
test reporter to framework' is an erroneous error message in that situation.
BTW, A BIG THANKS for helping with this plugin - it's a life saver with unit
testing javascript :)
Original comment by bartw...@gmail.com
on 11 Nov 2011 at 4:26
As I said before the plugin identifies a file as a JsTestDriver configuration
file (i.e. puts 'JsTD' icon on a file) if its name matches 'jsTestDriver.conf'
or '*.jstd'.
If no files are identified as configs under a given directory, there will be no
action 'Run all jstd configs in a directory' available on a right-click on this
directory.
If you were able to run tests, I think you created RunConfiguration manually.
And as you ran this RunConfiguration you most likely saw something like this
(in the right-bottom panel):
Exception in thread "main" java.lang.RuntimeException: No valid config files
found
at com.google.jstestdriver.idea.TestRunner$Settings.build(TestRunner.java:347)
at com.google.jstestdriver.idea.TestRunner$Settings.access$100(TestRunner.java:291)
at com.google.jstestdriver.idea.TestRunner.main(TestRunner.java:185)
Well, that is not good.
I'll try to enhance error handling for this particular case.
Maybe a little description on the JsTestDriver RunConfiguration dialog (when
'All configuration files in directory' is selected) will help.
And maybe there will be shown a list of all files that are identified as JsTD
configs and located inside the currently selected directory.
Original comment by Sergey.S...@gmail.com
on 11 Nov 2011 at 7:34
Sergey,
When I run my unit tests I have a single .jstd file per QUnit test file. I do
this because if I run multiple test files in the same .jstd file the memory
bleeds over from one test to another - if I mock a class/function in one QUnit
test file the test files that run afterwards also see the same mocked
class/function etc. rather than the original file. Also I only want to include
the relevant javascript classes in my test rather than all of the javascript
classes across my entire application.
In IntelliJ the "All configuration files in directory" is a life saver because
it allows me to use many config files easily.
But I don't know how to do the same thing from the command line. Now I'm
trying to integrate my QUnit tests inside of Team City. Unfortunately it looks
like I will need to generate a script that runs each of my tests manually with
this type of command line... And I'll need a command line in a batch file
defined for every single one of my tests. I was hoping that the --config
option could take wild cards but didn't have any luck with that. Any help
would be greatly appreciated.
..suites\provider>java -jar ..\..\..\..\lib\JsTestDriver-1.3.3d.jar --port 9876
--browser "C:\Users\user\AppDat
a\Local\Google\Chrome\Application\chrome.exe" --captureConsole --config
TestOne.jstd --tests all --verbose --testOutput ../results
Original comment by bartw...@gmail.com
on 15 Nov 2011 at 6:40
Run Configuration UI for 'All configuration files in directory' has been
improved in 1.3.10 version of the plugin.
Original comment by Sergey.S...@gmail.com
on 23 Nov 2011 at 3:10
Great. Unfortunately, the new Plugin Version is incompatible with IDEA 10.5.2.
See http://youtrack.jetbrains.net/issue/WI-8577.
Stefan
Original comment by stefan.s...@googlemail.com
on 23 Nov 2011 at 4:14
I forgot to clarify that 1.3.10 version of the plugin is compatible with IDEA
11.
http://confluence.jetbrains.net/display/IDEADEV/IDEA+11+EAP
Original comment by Sergey.S...@gmail.com
on 23 Nov 2011 at 6:12
Original issue reported on code.google.com by
stefan.s...@googlemail.com
on 29 Jul 2011 at 11:32Attachments: