saga
saga copied to clipboard
Exception caught while instrumenting code
Hi guys, First of all thanks for a great plugin :+1: .
Now even though the reports are being generated I get an exception on maven:
13:58:32.960 [main] INFO com.github.timurstrekalov.saga.core.DefaultCoverageGen erator - Using the following no-instrument patterns: ./OpenLayers. .+_from\d+\d+to\d+\d+$ ./spec/. .+#\d+(eval)(\d+) .+JavaScriptStringJob ./jquery/. 13:58:33.287 [pool-6-thread-1] INFO com.github.timurstrekalov.saga.core.Default CoverageGenerator - Running test at http://localhost:61907 13:58:34.106 [pool-6-thread-1] ERROR com.github.timurstrekalov.saga.core.instrum entation.ScriptInstrumenter - Exception caught while instrumenting code java.lang.IllegalArgumentException: null
I can seem to understand why its having problems, anyway of solving this exception?
thanks
Ugh, the exception is not exactly descriptive.
Is it possible to get a list of the <script>
URLs from the test that causes the problem (i.e. from the test runner, i guess)? I have a feeling that this is caused by a URI.create()
call.
<plugin>
<groupId>com.github.searls</groupId>
<artifactId>jasmine-maven-plugin</artifactId>
<version>1.3.1.2</version>
<executions>
<execution>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
<configuration>
<skipTests>false</skipTests>
<keepServerAlive>true</keepServerAlive>
<!--<autoRefreshInterval>10</autoRefreshInterval>-->
<jsSrcDir>${project.basedir}/src/main</jsSrcDir>
<jasmineTargetDir>${project.build.directory}${file.separator}tests</jasmineTargetDir>
<preloadSources>
<source>webapp/include/jquery/jquery.js</source>
<source>webapp/js/OpenLayers.js</source>
<source>webapp/js/ol/Control/ViewAttributes.js</source>
<source>webapp/js/ol/Control/ModifyAttributes.js</source>
<source>webapp/js/ol/Control/MergeCables.js</source>
</preloadSources>
<srcDirectoryName>webapp</srcDirectoryName>
<sourceIncludes>
<include>js/ol/Control/MergeCables.js</include>
</sourceIncludes>
<jsTestSrcDir>tests/js/spec</jsTestSrcDir>
</configuration>
</plugin>
<plugin>
<groupId>com.github.timurstrekalov</groupId>
<artifactId>saga-maven-plugin</artifactId>
<version>1.4.2</version>
<executions>
<execution>
<goals>
<goal>coverage</goal>
</goals>
</execution>
</executions>
<configuration>
<skipTests>false</skipTests>
<baseDir>http://localhost:${jasmine.serverPort}</baseDir>
<outputDir>${project.build.directory}/tests</outputDir>
<noInstrumentPatterns>
<pattern>.*/spec/.*</pattern> <!-- Don't instrument specs -->
<pattern>.*/jquery/.*</pattern>
<pattern>.*/OpenLayers.*</pattern>
<pattern>.*/ViewAttributes.*</pattern>
<pattern>.*/ModifyAttributes.*</pattern>
</noInstrumentPatterns>
</configuration>
</plugin>
http://localhost:8234/webapp/webapp/include/jquery/jquery.js http://localhost:8234/webapp/webapp/js/OpenLayers.js http://localhost:8234/webapp/webapp/js/ol/Control/ViewAttributes.js http://localhost:8234/webapp/webapp/js/ol/Control/ModifyAttributes.js http://localhost:8234/webapp/webapp/js/ol/Control/MergeCables.js http://localhost:8234/spec/MergeCable.js
I just noticed the "webapp/webapp" but if I remove the webapp on the preloadSources the test dont run, keeping it the tests run fine and coverage report is generated. Hope this helps.