Skip to content
Browse files

Update project samples for JavaScript 1.5

  • Loading branch information...
1 parent 984bd07 commit 5e85cc1c64cb25de5f3d237a4e5f5409695730f5 @racodond racodond committed Jan 20, 2014
Showing with 128 additions and 54 deletions.
  1. +0 −19 projects/languages/javascript/javascript-sonar-runner-JsTestDriver/README.md
  2. BIN ...s/languages/javascript/javascript-sonar-runner-JsTestDriver/jstestdriver/JsTestDriver-1.3.4.b.jar
  3. BIN projects/languages/javascript/javascript-sonar-runner-JsTestDriver/jstestdriver/coverage-1.3.4.b.jar
  4. +0 −13 projects/languages/javascript/javascript-sonar-runner-JsTestDriver/jstestdriver/jsTestDriver.conf
  5. +0 −21 projects/languages/javascript/javascript-sonar-runner-JsTestDriver/sonar-project.properties
  6. +13 −0 projects/languages/javascript/javascript-sonar-runner-lcov/README.md
  7. +87 −0 projects/languages/javascript/javascript-sonar-runner-lcov/report/lcov.dat
  8. +14 −0 projects/languages/javascript/javascript-sonar-runner-lcov/sonar-project.properties
  9. 0 ...avascript/{javascript-sonar-runner-JsTestDriver → javascript-sonar-runner-lcov}/sources/Person.js
  10. 0 .../{javascript-sonar-runner-JsTestDriver → javascript-sonar-runner-lcov}/sources/com/company/Car.js
  11. 0 ...javascript-sonar-runner-JsTestDriver → javascript-sonar-runner-lcov}/sources/com/company/Truck.js
  12. 0 ...vascript-sonar-runner-JsTestDriver → javascript-sonar-runner-lcov}/sources/com/company/Vehicle.js
  13. 0 ...ascript/{javascript-sonar-runner-JsTestDriver → javascript-sonar-runner-lcov}/tests/PersonTest.js
  14. 0 ...javascript-sonar-runner-JsTestDriver → javascript-sonar-runner-lcov}/tests/com/company/CarTest.js
  15. +13 −0 projects/languages/javascript/javascript-sonar-runner-lcov/validation.txt
  16. +1 −1 projects/languages/javascript/javascript-sonar-runner/validation.txt
View
19 projects/languages/javascript/javascript-sonar-runner-JsTestDriver/README.md
@@ -1,19 +0,0 @@
-This example demonstrates how to analyze a JavaScript project with the SonarQube Runner reusing reports generated by JsTestDriver.
-
-Prerequisites
-=============
-* [SonarQube](http://www.sonarsource.org/downloads/) 3.0 or higher
-* [SonarQube Runner](http://docs.codehaus.org/x/N4KxDQ) 2.0 or higher
-* [SonarQube JavaScript Plugin](http://docs.codehaus.org/display/SONAR/JavaScript+Plugin) 1.3 or higher
-
-Usage
-=====
-* Execute JsTestDriver unit tests and gather code coverage statistics. Replace <path_to_browser> by the path to your browser executable. Examples with Chrome:
- * Windows: C:\Users\myUser\AppData\Local\Google\Chrome\Application\chrome.exe
- * Mac: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
-
- java -jar jstestdriver/JsTestDriver-1.3.4.b.jar --port 9876 --tests all --browser "<path_to_browser>" --testOutput jstestdriver --config jstestdriver/jsTestDriver.conf
-
-* Analyze the JavaScript code with SonarQube and import the unit tests results:
-
- sonar-runner
View
BIN ...ges/javascript/javascript-sonar-runner-JsTestDriver/jstestdriver/JsTestDriver-1.3.4.b.jar
Binary file not shown.
View
BIN ...nguages/javascript/javascript-sonar-runner-JsTestDriver/jstestdriver/coverage-1.3.4.b.jar
Binary file not shown.
View
13 .../languages/javascript/javascript-sonar-runner-JsTestDriver/jstestdriver/jsTestDriver.conf
@@ -1,13 +0,0 @@
-server: http://localhost:9876
-
-load:
- - ../sources/*.js
- - ../sources/com/company/*.js
-test:
- - ../tests/*.js
- - ../tests/com/company/*.js
-
-plugin:
- - name: "coverage"
- jar: "coverage-1.3.4.b.jar"
- module: "com.google.jstestdriver.coverage.CoverageModule"
View
21 projects/languages/javascript/javascript-sonar-runner-JsTestDriver/sonar-project.properties
@@ -1,21 +0,0 @@
-# project metadata (required)
-sonar.projectKey=org.codehaus.sonar:javascript-sonar-runner-jstestdriver
-sonar.projectName=JavaScript project with SonarQube Runner reusing reports generated by JsTestDriver
-sonar.projectVersion=1.0
-
-# path to source directories (required)
-sonar.sources=sources
-
-# path to test source directories (optional)
-sonar.tests=tests
-
-# Language
-sonar.language=js
-
-# Advanced parameters
-sonar.javascript.jstestdriver.reportsPath=jstestdriver
-sonar.javascript.lcov.reportPath=jstestdriver/jsTestDriver.conf-coverage.dat
-sonar.dynamicAnalysis=reuseReports
-
-# Encoding of the source files
-sonar.sourceEncoding=UTF-8
View
13 projects/languages/javascript/javascript-sonar-runner-lcov/README.md
@@ -0,0 +1,13 @@
+This example demonstrates how to analyze a JavaScript project with the SonarQube Runner reusing an LCOV report.
+
+Prerequisites
+=============
+* [SonarQube](http://www.sonarsource.org/downloads/) 3.7 or higher
+* [SonarQube Runner](http://docs.codehaus.org/x/N4KxDQ) 2.3 or higher
+* [SonarQube JavaScript Plugin](http://docs.codehaus.org/display/SONAR/JavaScript+Plugin) 1.5 or higher
+
+Usage
+=====
+* Analyze the project with SonarQube using the SonarQube Runner:
+
+ sonar-runner
View
87 projects/languages/javascript/javascript-sonar-runner-lcov/report/lcov.dat
@@ -0,0 +1,87 @@
+SF:C:\git\sonar-examples\projects\languages\javascript\javascript-sonar-runner-lcov\tests\PersonTest.js
+DA:1,1
+DA:4,1
+DA:5,1
+DA:9,1
+DA:10,1
+end_of_record
+SF:C:\git\sonar-examples\projects\languages\javascript\javascript-sonar-runner-lcov\tests\com\company\CarTest.js
+DA:1,1
+DA:4,1
+DA:5,1
+DA:9,1
+DA:10,1
+DA:14,1
+DA:15,1
+end_of_record
+SF:C:\git\sonar-examples\projects\languages\javascript\javascript-sonar-runner-lcov\sources\Person.js
+DA:2,1
+DA:3,2
+DA:4,2
+DA:5,2
+DA:8,1
+DA:11,2
+end_of_record
+SF:C:\git\sonar-examples\projects\languages\javascript\javascript-sonar-runner-lcov\sources\com\company\Car.js
+DA:1,1
+DA:2,3
+DA:3,3
+DA:4,3
+DA:5,3
+DA:6,3
+DA:9,1
+DA:12,1
+DA:16,1
+DA:17,0
+DA:18,1
+DA:19,1
+DA:21,0
+DA:26,0
+DA:27,0
+DA:31,0
+DA:32,0
+DA:36,1
+DA:37,0
+DA:38,0
+DA:39,0
+DA:41,1
+DA:42,1
+DA:47,0
+end_of_record
+SF:C:\git\sonar-examples\projects\languages\javascript\javascript-sonar-runner-lcov\sources\com\company\Truck.js
+DA:1,1
+DA:2,0
+DA:3,0
+DA:4,0
+DA:5,0
+DA:6,0
+DA:9,1
+DA:12,0
+DA:16,0
+DA:17,0
+DA:18,0
+DA:19,0
+DA:21,0
+end_of_record
+SF:C:\git\sonar-examples\projects\languages\javascript\javascript-sonar-runner-lcov\sources\com\company\Vehicle.js
+DA:9,1
+DA:10,0
+DA:11,0
+DA:12,0
+DA:13,0
+DA:14,0
+DA:22,1
+DA:25,0
+DA:29,0
+DA:30,0
+DA:31,0
+DA:32,0
+DA:34,0
+DA:39,0
+DA:40,0
+DA:41,0
+DA:42,0
+DA:44,0
+DA:45,0
+DA:50,0
+end_of_record
View
14 projects/languages/javascript/javascript-sonar-runner-lcov/sonar-project.properties
@@ -0,0 +1,14 @@
+sonar.projectKey=org.codehaus.sonar:javascript-sonar-runner-lcov
+sonar.projectName=JavaScript project analyzed with SonarQube Runner reusing LCOV report
+sonar.projectVersion=1.0
+
+sonar.language=js
+sonar.sources=sources
+sonar.sourceEncoding=UTF-8
+
+# Optional
+sonar.tests=tests
+
+# To import the LCOV report
+sonar.dynamicAnalysis=reuseReports
+sonar.javascript.lcov.reportPath=report/lcov.dat
View
0 ...nar-runner-JsTestDriver/sources/Person.js → ...cript-sonar-runner-lcov/sources/Person.js
File renamed without changes.
View
0 ...r-JsTestDriver/sources/com/company/Car.js → ...ar-runner-lcov/sources/com/company/Car.js
File renamed without changes.
View
0 ...JsTestDriver/sources/com/company/Truck.js → ...-runner-lcov/sources/com/company/Truck.js
File renamed without changes.
View
0 ...TestDriver/sources/com/company/Vehicle.js → ...unner-lcov/sources/com/company/Vehicle.js
File renamed without changes.
View
0 ...r-runner-JsTestDriver/tests/PersonTest.js → ...ipt-sonar-runner-lcov/tests/PersonTest.js
File renamed without changes.
View
0 ...JsTestDriver/tests/com/company/CarTest.js → ...-runner-lcov/tests/com/company/CarTest.js
File renamed without changes.
View
13 projects/languages/javascript/javascript-sonar-runner-lcov/validation.txt
@@ -0,0 +1,13 @@
+start server
+ with plugin javascript 1.5
+sonar-runner
+verify org.codehaus.sonar:javascript-sonar-runner-lcov
+ measure lines is 141
+ measure ncloc is 107
+ measure files is 4
+ measure coverage is 38.1
+verify org.codehaus.sonar:javascript-sonar-runner-lcov:Car.js
+ measure lines is 50
+ measure ncloc is 42
+ measure coverage is 58.3
+stop server
View
2 projects/languages/javascript/javascript-sonar-runner/validation.txt
@@ -1,5 +1,5 @@
start server
- with plugin javascript 1.4
+ with plugin javascript 1.5
sonar-runner
verify org.codehaus.sonar:javascript-sonar-runner
measure lines is 14

0 comments on commit 5e85cc1

Please sign in to comment.
Something went wrong with that request. Please try again.