|
IntelliJPlugin
How to use the IntelliJ Plugin for JsTestDriver.
JsTestDriver IntelliJ plugin allows you to enjoy all the benefits of JsTestDriver right from the comfort of your IDE (WebStorm, PhpStorm, IntelliJ IDEA, RubyMine, PyCharm or AppCode). It is the open-source project under the terms of Apache License 2.0. Features
InstallationPlease visit Installation page. Getting startedPlease visit Getting Started page. Releases & ChangelogYou can check out the plugin page for more information about the releases. RoadmapYou can find features that we are planning to implement in the future on the Roadmap page. Issue trackerIf you've found a bug, a glitch or anything that doesn't work well, please file an issue in the WebStorm/PhpStorm project issue tracker (select "Plugin: JsTestDriver" subsystem when creating an issue). Please don't file an issue in the http://code.google.com/p/js-test-driver/issues/list?q=label:IntelliJ. Those bugs are handled normally, but it's an old way. For developersIf you are considering participation in the development of the plugin, or just going to build it yourself, please visit Development page. |
Hi guys, I have been using the Eclipse plugin, and just have been moving over to WebStorm? 2 EAP. I enjoyed the ability to run my tests on every file save ... is this possible in WebStorm?? The Eclipse run configuration allowed this with a simple checkbox tick ... any plans to support this in WebStorm? also?
@Ireney: IntelliJ automatically saves your files, so you may as well use the keybinding for running the tests directly. Just replace ctrl-s (save) with shift-F10 (re-run) in your brain, and you'll get exactly the same behavior you're used to.
Does this plugin work with IntelliJ 10? I can get the server running and it's green. I added src/main/js and src/test/js and put my javascript files in there. I then made a configuration file to point to:
load:
I then made a configuration, pointed it to the configuration file (and I tried to either run inside the IDE or pointed to the server directly) but no tests run. It just does nothing at all.
Help?
@Ken: make sure you've got the most recent version, which shouldn't have a Java dependency. It uses a more generic way to launch the test runner. It works for me in IDEA 10.
Can the IDEA plugin accept params/flags? I need to set the --basePath and --config flags.
hi, noob question :o)
"Now just launch that config" - can you provide more detail - can you do this from the IDE or do you need to use the command line?
thanks
It seems that plugin is broken in PHPStorm 2.0? There is an exception on the start of the project...
@Anton: Please update JsTestDriver?-plugin from plugin repository. Fixed version is already there.
So I tried checking out the source code to compile the IntelliJ-Plugin, but failed to find the newest version in SVN.
Where is version 1.3.5? :-)
Version 1.3.5 can be found at http://git.jetbrains.org/?p=idea/contrib.git;a=tree;f=JsTestDriver;h=57f655bfc53f67fa5259c211adffc01dd7e1d288;hb=HEAD .
$ git clone git://git.jetbrains.org/idea/contrib.git
Plugin source code is being moving to JetBrains? repo. We need to resolve a few problems to complete the moving.
If you want to sumbit a patch before moved is completed, you can create an issue at http://code.google.com/p/js-test-driver/issues/list and attach your patch to it.
After moving is done wiki page will be updated.
May I ask what is the status of the repo transition?
I can't get the source from the jetbrains repo to build against IDEA 10.5.2. It seems that the HEAD is built against an IDEA OpenAPI version > 10.5.2? Is that observation correct?
What revision is the latest plugin release (1.3.5)?
Thank you!
Hi!
Repo transition is not finished yet.
The latest plugin release version is 1.3.5. I've updated plugin's source code in JetBrains? git repository, so now plugin can be built against IDEA 10.5.2.
Now I am working on the next JsTestDriver? plugin release. After that I'll focus on the repo transition. If you want to contribute, you can email me a patch or just describe your needs.
Any help is appreciated!
Thank you, Sergey!
The code from the jetbrains repo now compiles nicely against 10.5.2!
I also have a version of the plugin compiling against the trunk of the jstestdriver core. Unfortunately, since the jstd 1.3.2 release, there have been some breaking API changes.
I wonder if there are any future plans/strategies to keep the core library and the plugin in sync. I will drop you an email!
Would it be possible to configure how the auto-generated jstd files are generated for running Jasmine cases?
Our use case: We recently started adding Jasmine tests for a new feature we're building. The feature we're building has all the production JS files in a subdirectory of the project (e.g. project/production-js/tested-js/feature1. For future features, we're planning to put the production JS files in a similar subdirectory (e.g. project/production-js/tested-js/feature2). All of the jasmine tests are in project/js-tests/spec/feature1. We're planning something similar with future features (e.g. project/js-tests/spec/feature2)
The existing project has a ton of JS files all over the place, including project/production-js/. Unfortunately, there are no real tests for those JS files. In addition, some of the existing JS has DOM manipulation in it, which we don't want to test in js-test-driver.
We can run all the tests in project/js-tests/spec/feature1 by configuring the jsTestDriver.conf appropriately and setting up an IntelliJ run configuration. Unfortunately, this takes close to 20 seconds for 500 or so tests. It would be nice to be able to run individual tests in IntelliJ instead. However, whenever we try to run individual tests cases, the auto-generated jstd file has all of the JS files in the project, even those we don't want to test. It also includes JS files that are embedded in library jar files, which js-test-driver can't read and blows up.
A potential solution would be to provide a configuration option in the plugin for where the production JS files would come from (i.e. everything under project/production-js/tested-js/). The run configuration would created the generated jstd with only those files, in addition to the file that contains the JS test that we're trying to run.
If any of the above doesn't make sense or if I can help out, please let me know.
Thanks, George Shakhnazaryan
Hi George,
Thank you for the detailed report! Yes, there is a real need to configure a set of files/directories for a given file. Generally it's an issue for WebStorm?, because it will let us improve reference resolving. I'll try to investigate it. Anyway I have plans to improve jstd config automatic generation in a slightly another way.
-- Sergey Simonchik
Is it possible to debug the test cases within phpStorm using this plugin? I'm sorry I haven't found any way to do this if there is.
No, it's impossible to debug. This feature is planned.
Okay...so How DO I use JsTestDriver? with IntelliJ when I have never used JsTestDriver?. All this page has it how to install it, not use it.
It's been 3 hours, I'm looking at the Getting Started page which has little relevance to using the IntelliJ plugin. Through IntelliJ I have the serving running with Firefox captured.
But the Getting Started page states that the conf file will list the files to test and the files that will perform the tests. Yet the plugin has no conf file in the directory. I searched the hard drive that it is not there.
So how do I use this friggin plugin to test these files? You are not providing any kind of guidance just "You can install it".
How does the plugin know what files to test if the plugin doesn't have the conf file?
mcmahon: Sorry this wasn't more clear. I'll update this page to indicate that you should still follow the GettingStarted instructions (http://code.google.com/p/js-test-driver/wiki/GettingStarted) to create the conf file.
Jetbrains / IDEA users -- at the time of this writing, JetBrains? doesn't support debugging JSTestDriver tests within IDE. If you want to debug, you still would use chrome / firebug. I've created a youtrack request for adding feature in IDE debugging. Would appreciate your votes!
http://youtrack.jetbrains.net/issue/IDEA-81226
Thanks