我試圖從聲納生成定製分析報告。我正在使用sonar-ws-client。我的代碼是:定製聲納Qube分析報告
Sonar sonar = new Sonar(new HttpClient4Connector(new Host(url, login, password)));
Resource JunitTestCaseExample = sonar.find(ResourceQuery.createForMetrics("JunitTestCaseExample:JunitTestCaseExample", "critical_violations",
"major_violations", "minor_violations", "info_violations", "tests", "blocker_violations", "statements","coverage","uncovered_lines","lines",
"skipped_tests","test_failures", "test_errors", "test_success_density", "new_coverage","overall_coverage"));
Measure statements = JunitTestCaseExample.getMeasure("statements");
System.out.println("statements : " + statements.getMetricKey() + " === " + statements.getFormattedValue());
System.out.println(statements.getVariation1());
我能夠得到最值的,但statements.getVariation1()
總是返回null
。 有沒有辦法獲得7天,15天和30天的變化值?
感謝沒有重複的問題:http://sonarqube.15.x6.nabble.com/Customised-Sonar-Qube-Analysis-Report-td5024916.html –