LiTiang / js-test-driver

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

Path resolver does not seem do fetch correct path informations (strips src/ folder from file paths) #246

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Project Layout (simplified), same root for all files:
- lib/ext-3.3.0/ext-all-debug.js
- src/main/webapp/js/util/Logger.js
- src/test/resources/jsTestDriver.conf

jsTestDriver.conf content:
basepath: ../../../

load:
  - lib/ext-3.3.0/ext-all-debug.js

test:
  - src/main/webapp/js/util/Logger.js

What is the expected output? What do you see instead?
Expected: working JsTestDriver

JSTestDriver error message:
JSTestDriver crashed!
Exception in thread "main" com.google.jstestdriver.FailureException: No tests 
executed.
    at com.google.jstestdriver.FailureCheckerAction.run(FailureCheckerAction.java:50)
    at com.google.jstestdriver.ActionRunner.runActions(ActionRunner.java:64)
    at com.google.jstestdriver.idea.TestRunner.execute(TestRunner.java:100)
    at com.google.jstestdriver.idea.TestRunner.execute(TestRunner.java:75)
    at com.google.jstestdriver.idea.TestRunner.main(TestRunner.java:164)

Instead:
Using the paths as described above, all files are found while deployment into 
jetty.
When investigating into the generated HTML Code and Javascript includes (using 
firebug) the following result could be seen:
- ext-all-debug.js has been included properly
-- path: /test/lib/ext-3.3.0/ext-all-debug.js
- Logger.js has not been included properly
-- path: /test/src/main/webapp/js/util/Logger.js
-- The file could not be found under this (correct) path

The file Logger.js is reachable under the following path:
- /test/main/webapp/js/util/Logger.js
So it seems that something strips the "src/" information out of the path 
information.

What version of the product are you using? On what operating system?
IntelliJ 10.5; JSTestDriver 1.3.3

Original issue reported on code.google.com by marco.j...@gmail.com on 1 Jun 2011 at 9:15

GoogleCodeExporter commented 9 years ago
After some more testing with the standalone versions it seems that the problem 
was caused by the IDEA plugin.

Starting the server using the following command (same config as above):
java -jar JsTestDriver-1.3.2.jar --config 
D:\t\apvertrieb\Common\src\test\resources\jsTestDriver.conf --port 10998 
--preloadFiles --runnerMode DEBUG_NO_TRACE --browser "C:\Program Files 
(x86)\Mozilla Firefox\firefox.exe"

the Logger.js is reachable as expected:
http://127.0.0.1:10998/test/src/main/webapp/js/util/Logger.js

So the "src/" path is not stripped out.

Original comment by marco.j...@gmail.com on 1 Jun 2011 at 9:59

GoogleCodeExporter commented 9 years ago

Original comment by Sergey.S...@gmail.com on 28 Jun 2011 at 2:36

GoogleCodeExporter commented 9 years ago
@marco, I failed to reproduce it in JsTestDriver IDEA plugin v1.3.5.
Could you please provide more info on this bug?
You use JsTestDriver IDEA plugin v1.3.3, don't you?

Original comment by Sergey.S...@gmail.com on 28 Jun 2011 at 3:13

GoogleCodeExporter commented 9 years ago
Simplified Logger.js content will be suffusient.

Original comment by Sergey.S...@gmail.com on 28 Jun 2011 at 3:14

GoogleCodeExporter commented 9 years ago
@marco: Correct files are available under 
/test/src/main/webapp/js/util/Logger.js and 
/test/lib/ext-3.3.0/ext-all-debug.js paths. I succeeded in running test from 
the described configuration.
JsTestDriver IDEA plugins version is 1.3.6.

Original comment by Sergey.S...@gmail.com on 28 Sep 2011 at 4:48