ファイルを生成するために、JavaScript 単体テストで isparta-loader と一緒に karma-coverage を使用していlcov.info
ます。
しかし、JavaScript プラグインを使用して SonarQube 分析を実行すると、テスト カバレッジ レポートが生成されません。に 1 つのファイルのデータが含まれている場合lcov.info
、カバレッジ レポートは失敗しませんが、lcov.info
に 2 つ以上のファイルのデータが含まれている場合、次の時点で常に失敗します。
13:43:27.635 INFO - 結果をデータベースに保存します 13:43:27.649 DEBUG - org.sonar.batch.phases.GraphPersister を実行します 13:43:27.714 DEBUG - org.sonar.batch.index.SourcePersister を実行します 13:43:29.852 DEBUG - プロジェクトのセマフォを解放します: org.sonar.api.resources.Project@6b1e6f8b[id=7859,key=func.salesorder NG,qualifier=TRK], キー batch-func.salesorderNG INFO: ------ -------------------------------------------------- ---------------- 情報: 実行失敗情報: ---------------------------- -------------------------------------------- 合計時間: 4:14.804ファイナルメモリー: 23M/828M INFO: ----------------------------------------- ---------------------------
エラー: ソナー ランナーの実行中にエラーが発生しました
org.sonar.runner.impl.RunnerException: org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91) で Sonar を実行できません org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher. java:75) で java.security.AccessController.doPrivileged(Native Method) で org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69) で org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher. java:50) org.sonar.runner.api.EmbeddedRunner.doExecute (EmbeddedRunner.java:102) で org.sonar.runner.api.Runner.execute (Runner.java:100) で org.sonar.runner.Main .executeTask(Main.java:70) で org.sonar.runner.Main.execute(Main.java:59) で org.sonar.runner.Main.main(Main.java:53) 原因: java.lang.IllegalStateException: org.sonar.batch.phases.DatabaseModePhaseExecutor.executePersisters(DatabaseModePhaseExecutor.java:165) で org.sonar.batch.index.SourcePersister.persist(SourcePersister.java:84) でファイル ソースを保存できません。 org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java: 92) org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77) で org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:235) で org.sonar.batch.scan.ProjectScanContainer .scanRecursively(ProjectScanContainer.java:230) org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) で org.sonar.api.platform で org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:220) で.ComponentContainer.execute(ComponentContainer.java:77) で org.sonar.batch.scan.ScanTask.scan(ScanTask.java:57) で org.sonar.batch.scan.ScanTask.execute(ScanTask.java:45) でorg.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:135) org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) org.sonar.api.platform.ComponentContainer.execute( ComponentContainer.java:77) org.sonar.batch.bootstrap.GlobalContainer.executeTask (GlobalContainer.java:158) org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:95) で org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67) で org.sonar.runner.batch.IsolatedLauncher .execute(IsolatedLauncher.java:48) で sun.reflect.NativeMethodAccessorImpl.invoke0(ネイティブ メソッド) で sun.reflect.NativeMethodAccessorImpl.invoke(不明なソース) で sun.reflect.DelegatingMethodAccessorImpl.invoke(不明なソース) で java.lang. Reflect.Method.invoke(Unknown Source) at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87) ... 9 より多くの原因: java.lang.ArrayIndexOutOfBoundsException: -1 at java.util. java.util.ArrayList の ArrayList.elementData(不明なソース)。org.sonar.server.source.db.FileSourceDb$Data$Builder.getLinesBuilder(FileSourceDb.java:2911) で com.google.protobuf.RepeatedFieldBuilder.getBuilder(RepeatedFieldBuilder.java:245) で (不明なソース) を取得します。 org.sonar.batch.index.SourceDataFactory.consolidateData(SourceDataFactory. java:76) org.sonar.batch.index.SourcePersister.computeData(SourcePersister.java:152) で org.sonar.batch.index.SourcePersister.persist(SourcePersister.java:93) で org.sonar.batch.index .SourcePersister.persist(SourcePersister.java:81) ... 33 続きを読むorg.sonar.batch.index.SourceDataFactory.applyLineMeasure(SourceDataFactory.applyLineMeasure(SourceDataFactory. java:183) org.sonar.batch.index.SourceDataFactory.applyLineMeasures(SourceDataFactory.java:117) で org.sonar.batch.index.SourceDataFactory.consolidateData(SourceDataFactory.java:76) で org.sonar.batch.index .SourcePersister.computeData(SourcePersister.java:152) at org.sonar.batch.index.SourcePersister.persist(SourcePersister.java:93) at org.sonar.batch.index.SourcePersister.persist(SourcePersister.java:81) . .. 33 以上org.sonar.batch.index.SourceDataFactory.applyLineMeasure(SourceDataFactory.applyLineMeasure(SourceDataFactory. java:183) org.sonar.batch.index.SourceDataFactory.applyLineMeasures(SourceDataFactory.java:117) で org.sonar.batch.index.SourceDataFactory.consolidateData(SourceDataFactory.java:76) で org.sonar.batch.index .SourcePersister.computeData(SourcePersister.java:152) at org.sonar.batch.index.SourcePersister.persist(SourcePersister.java:93) at org.sonar.batch.index.SourcePersister.persist(SourcePersister.java:81) . .. 33 以上server.source.db.FileSourceDb$Data$Builder.getLinesBuilder(FileSourceDb.java:2911) at org.sonar.batch.index.SourceDataFactory.applyLineMeasure(SourceDataFactory.java:183) at org.sonar.batch.index.SourceDataFactory. applyLineMeasures (SourceDataFactory.java:117) で org.sonar.batch.index.SourceDataFactory.consolidateData(SourceDataFactory.java:76) で org.sonar.batch.index.SourcePersister.computeData(SourcePersister.java:152) で org.sonar .batch.index.SourcePersister.persist(SourcePersister.java:93) at org.sonar.batch.index.SourcePersister.persist(SourcePersister.java:81) ... 33 詳細server.source.db.FileSourceDb$Data$Builder.getLinesBuilder(FileSourceDb.java:2911) at org.sonar.batch.index.SourceDataFactory.applyLineMeasure(SourceDataFactory.java:183) at org.sonar.batch.index.SourceDataFactory. applyLineMeasures (SourceDataFactory.java:117) で org.sonar.batch.index.SourceDataFactory.consolidateData(SourceDataFactory.java:76) で org.sonar.batch.index.SourcePersister.computeData(SourcePersister.java:152) で org.sonar .batch.index.SourcePersister.persist(SourcePersister.java:93) at org.sonar.batch.index.SourcePersister.persist(SourcePersister.java:81) ... 33 詳細183) org.sonar.batch.index.SourceDataFactory.applyLineMeasures(SourceDataFactory.java:117) で org.sonar.batch.index.SourceDataFactory.consolidateData(SourceDataFactory.java:76) で org.sonar.batch.index.SourcePersister .computeData(SourcePersister.java:152) で org.sonar.batch.index.SourcePersister.persist(SourcePersister.java:93) で org.sonar.batch.index.SourcePersister.persist(SourcePersister.java:81) ... 33以上183) org.sonar.batch.index.SourceDataFactory.applyLineMeasures(SourceDataFactory.java:117) で org.sonar.batch.index.SourceDataFactory.consolidateData(SourceDataFactory.java:76) で org.sonar.batch.index.SourcePersister .computeData(SourcePersister.java:152) で org.sonar.batch.index.SourcePersister.persist(SourcePersister.java:93) で org.sonar.batch.index.SourcePersister.persist(SourcePersister.java:81) ... 33以上persist(SourcePersister.java:93) at org.sonar.batch.index.SourcePersister.persist(SourcePersister.java:81) ... 33 詳細persist(SourcePersister.java:93) at org.sonar.batch.index.SourcePersister.persist(SourcePersister.java:81) ... 33 詳細
にlcov.info
は、次の情報が表示されます。
SF:D:\SOC\src\UI\UI.ng\js\general\services\tabStateService.js
FN:3,_interopRequireDefault
FN:11,(anonymous_2)
FN:14,tabStateService
FN:17,moveNext
FNF:4
FNH:4
FNDA:1,_interopRequireDefault
FNDA:1,(anonymous_2)
FNDA:21,tabStateService
FNDA:2,moveNext
DA:0,1
DA:1,1
DA:4,1
DA:5,1
DA:8,1
DA:9,21
DA:10,21
DA:12,2
LF:8
LH:8
BRDA:3,1,0,0
BRDA:3,1,1,1
BRDA:3,2,0,1
BRDA:3,2,1,1
BRF:4
BRH:4
end_of_record
TN:
SF:D:\SOC\src\UI\UI.ng\js\general\services\pagingService.js
FN:5,(anonymous_1)
FN:8,pagingService
FN:14,getPagingParams
FN:20,calculateSkip
FNF:4
FNH:4
FNDA:1,(anonymous_1)
FNDA:23,pagingService
FNDA:11,getPagingParams
FNDA:7,calculateSkip
DA:1,1
DA:3,1
DA:4,1
DA:7,1
DA:9,23
DA:13,1
DA:14,11
DA:15,2
DA:16,9
DA:17,7
DA:18,2
DA:21,1
DA:22,7
LF:13
LH:13
BRDA:15,1,0,2
BRDA:15,1,1,9
BRDA:15,2,0,11
BRDA:15,2,1,9
BRDA:16,3,0,7
BRDA:16,3,1,2
BRDA:16,4,0,9
BRDA:16,4,1,7
BRF:8
BRH:8
end_of_record