nikseras / js-test-driver

Automatically exported from code.google.com/p/js-test-driver
0 stars 0 forks source link

The first test result is not reported back to the JSTestDriver plugin #362

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a jsTestDriver.conf:
server: http://localhost:9876
load:
  - test/lib/jasmine/jasmine.js
  - test/lib/jasmine-jstd-adapter/JasmineAdapter.js
  - test/JSTestDriverTest.js

2. Create test/JSTestDriverTest.js:
describe("JSTestDriver", function () {
  it("should be able to add numbers", function () {
    expect(1 + 1).toBe(3);
  });
  it("should be able to add numbers", function () {
    expect(2 * 2).toBe(4);
  });
});

What is the expected output? What do you see instead?
Should see a failing test because 1+1 != 3 :)
However, the first test is not reported back to the plugin.
So, it looks all green, like all tests ran successfully.

What version of the product are you using? On what operating system?
RubyMine 4.0.3
Plug-in Version 1.4.1, 2012 March (build on JsTestDriver-1.3.4-a)
Windows 7 64-bit Ultimate

Please provide any additional information below.

Original issue reported on code.google.com by dan...@gmail.com on 16 Apr 2012 at 7:08

GoogleCodeExporter commented 8 years ago
Using latest version of JasmineAdapter at:
https://raw.github.com/ibolmo/jasmine-jstd-adapter/master/src/JasmineAdapter.js

Original comment by dan...@gmail.com on 16 Apr 2012 at 7:13

GoogleCodeExporter commented 8 years ago
I have compensated by creating an extra test, but for those that do not know of 
this bug, it could be a critical problem, since they may push buggy code into 
production. 

Original comment by dan...@gmail.com on 18 Apr 2012 at 1:27

GoogleCodeExporter commented 8 years ago
Do you see this without the jasmine adapter?

Original comment by corbinrs...@gmail.com on 18 Apr 2012 at 2:21

GoogleCodeExporter commented 8 years ago
I get "Unable to attach test reporter to test framework or test framework quit 
unexpectedly" if I don't have the JasmineAdapter. I was under the impression it 
was necessary to run Jasmine Tests which is all that I'm using at present.

I can say that the tests run properly when I run them with JsTestDriver.jar 
from the command line. However, there is always at least one test dropped when 
I run them from within the JetBrains IDE with the plugin.

Original comment by dan...@gmail.com on 18 Apr 2012 at 2:37

GoogleCodeExporter commented 8 years ago
I meant a non-Jasmine test, but it sounds like it might be something in the IDE 
plugin. Sergey?

Original comment by corbinrs...@gmail.com on 18 Apr 2012 at 2:44

GoogleCodeExporter commented 8 years ago
This bug seems to have been 'fixed' by the latest plug-in
Version 117.222, 2012 April (build on JsTestDriver-1.3.4.b)

Original comment by dan...@gmail.com on 18 Apr 2012 at 2:58

GoogleCodeExporter commented 8 years ago
The problem is that your tests have the same name: "should be able to add 
numbers".
IDE plugin assumes that there are no two tests with the same name that is why 
"JSTestDriver" node (this name was passed as the first argument to the 
'describe' function call) in test result tree has only one child node - "should 
be able to add numbers".
I believe that in some cases such assumption could be harmful.
I'll try to fix it (a little investigation is needed).

BTW I run the test from the issue description in 1.4.1 and 117.222 versions of 
the plugin and behavior was the same -- "Done: 1 of 1 Failed: 1".

Original comment by Sergey.S...@gmail.com on 18 Apr 2012 at 7:13

GoogleCodeExporter commented 8 years ago
It's only possible in Jasmine, I think.

Original comment by corbinrs...@gmail.com on 18 Apr 2012 at 7:30

GoogleCodeExporter commented 8 years ago

Original comment by Sergey.S...@gmail.com on 20 Apr 2012 at 4:01

GoogleCodeExporter commented 8 years ago
I have a problem with ruining jasmine test from testdriver plug in. Cannot read 
[
/tmp/.m2/repository/org/testng/testng/6.7/testng-6.7.jar!/testng-reports.js
    /home/clouway/.m2/repository/org/testng/testng/6.7/testng-6.7.jar!/testng-reports.js
] derived from 
.m2/repository/org/testng/testng/6.7/testng-6.7.jar!/testng-reports.js
Cannot read [
/tmp/.m2/repository/org/testng/testng/6.7/testng-6.7.jar!/jquery-1.7.1.min.js
    /home/clouway/.m2/repository/org/testng/testng/6.7/testng-6.7.jar!/jquery-1.7.1.min.js
] derived from 
.m2/repository/org/testng/testng/6.7/testng-6.7.jar!/jquery-1.7.1.min.js
    at com.google.jstestdriver.PathResolver.resolve(PathResolver.java:98)
    at com.google.jstestdriver.config.ParsedConfiguration.resolvePaths(ParsedConfiguration.java:99)
    at com.google.jstestdriver.config.Initializer.initialize(Initializer.java:86)
    at com.google.jstestdriver.embedded.JsTestDriverImpl.createRunnerInjector(JsTestDriverImpl.java:368)
    at com.google.jstestdriver.embedded.JsTestDriverImpl.runConfigurationWithFlags(JsTestDriverImpl.java:342)
    at com.google.jstestdriver.embedded.JsTestDriverImpl.runConfiguration(JsTestDriverImpl.java:233)
    at com.google.jstestdriver.idea.TestRunner.runTests(TestRunner.java:195)
    at com.google.jstestdriver.idea.TestRunner.executeTestCase(TestRunner.java:131)
    at com.google.jstestdriver.idea.TestRunner.unsafeExecuteConfig(TestRunner.java:122)
    at com.google.jstestdriver.idea.TestRunner.executeConfig(TestRunner.java:97)
    at com.google.jstestdriver.idea.TestRunner.executeAll(TestRunner.java:88)
    at com.google.jstestdriver.idea.TestRunner.main(TestRunner.java:330)

Original comment by Fireball...@gmail.com on 11 Sep 2012 at 10:53

GoogleCodeExporter commented 8 years ago
@Fireball183, what JsTestDriver IntelliJ plugin version are you using?
How is it possible to reproduce the issue?

Original comment by Sergey.S...@gmail.com on 11 Sep 2012 at 2:05