diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2015-02-19 09:08:26 +0100 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2015-03-04 13:22:52 +0100 |
commit | 2d7eac92dc449592a27826daa5478aec8c9e64fc (patch) | |
tree | e7e2709c1e1d4df817dfa07f52d788728070cba7 /server/sonar-web/src/test/json/coding-rules-page-should-activate-profile | |
parent | 6c41cba0d29e744f90347ae98975f8e4e55c8bd7 (diff) | |
download | sonarqube-2d7eac92dc449592a27826daa5478aec8c9e64fc.tar.gz sonarqube-2d7eac92dc449592a27826daa5478aec8c9e64fc.zip |
generate js coverage report from casperjs tests
Diffstat (limited to 'server/sonar-web/src/test/json/coding-rules-page-should-activate-profile')
4 files changed, 558 insertions, 0 deletions
diff --git a/server/sonar-web/src/test/json/coding-rules-page-should-activate-profile/app.json b/server/sonar-web/src/test/json/coding-rules-page-should-activate-profile/app.json new file mode 100644 index 00000000000..50148bb1b6e --- /dev/null +++ b/server/sonar-web/src/test/json/coding-rules-page-should-activate-profile/app.json @@ -0,0 +1,316 @@ +{ + "canWrite": true, + "qualityprofiles": [ + { + "key": "java-default-with-mojo-conventions-49307", + "name": "Default - Maven Conventions", + "lang": "java", + "parentKey": "java-top-profile-without-formatting-conventions-50037" + }, + { + "key": "java-default-with-sonarsource-conventions-27339", + "name": "Default - SonarSource conventions", + "lang": "java", + "parentKey": "java-top-profile-without-formatting-conventions-50037" + }, + { + "key": "java-top-profile-without-formatting-conventions-50037", + "name": "Default - Top", + "lang": "java" + }, + { + "key": "java-findbugs-14954", + "name": "FindBugs", + "lang": "java" + }, + { + "key": "java-for-sq-java-plugin-only-92289", + "name": "For SQ Java Plugin Only", + "lang": "java", + "parentKey": "java-default-with-sonarsource-conventions-27339" + }, + { + "key": "java-for-sq-only-95381", + "name": "For SQ Only", + "lang": "java", + "parentKey": "java-default-with-sonarsource-conventions-27339" + }, + { + "key": "php-psr-2-06315", + "name": "PSR-2", + "lang": "php" + }, + { + "key": "java-sonar-way-80423", + "name": "Sonar way", + "lang": "java" + }, + { + "key": "js-sonar-way", + "name": "Sonar way", + "lang": "js" + }, + { + "key": "php-sonar-way-05548", + "name": "Sonar way", + "lang": "php" + }, + { + "key": "py-sonar-way-80265", + "name": "Sonar way", + "lang": "py" + }, + { + "key": "java-without-findbugs", + "name": "Without Findbugs", + "lang": "java" + } + ], + "languages": { + "py": "Python", + "js": "JavaScript", + "php": "PHP", + "java": "Java" + }, + "repositories": [ + { + "key": "common-java", + "name": "Common SonarQube", + "language": "java" + }, + { + "key": "common-js", + "name": "Common SonarQube", + "language": "js" + }, + { + "key": "common-php", + "name": "Common SonarQube", + "language": "php" + }, + { + "key": "common-py", + "name": "Common SonarQube", + "language": "py" + }, + { + "key": "Pylint", + "name": "Pylint", + "language": "py" + }, + { + "key": "javascript", + "name": "SonarQube", + "language": "js" + }, + { + "key": "php", + "name": "SonarQube", + "language": "php" + }, + { + "key": "python", + "name": "SonarQube", + "language": "py" + }, + { + "key": "squid", + "name": "SonarQube", + "language": "java" + } + ], + "statuses": { + "BETA": "Beta", + "DEPRECATED": "Deprecated", + "READY": "Ready" + }, + "characteristics": [ + { + "key": "UNDERSTANDABILITY", + "name": "Understandability", + "parent": "MAINTAINABILITY" + }, + { + "key": "MAINTAINABILITY", + "name": "Maintainability" + }, + { + "key": "TIME_ZONE_RELATED_PORTABILITY", + "name": "Time zone related portability", + "parent": "PORTABILITY" + }, + { + "key": "READABILITY", + "name": "Readability", + "parent": "MAINTAINABILITY" + }, + { + "key": "SECURITY_FEATURES", + "name": "Security features", + "parent": "SECURITY" + }, + { + "key": "ARCHITECTURE_RELIABILITY", + "name": "Architecture related reliability", + "parent": "RELIABILITY" + }, + { + "key": "OS_RELATED_PORTABILITY", + "name": "OS related portability", + "parent": "PORTABILITY" + }, + { + "key": "EXCEPTION_HANDLING", + "name": "Exception handling", + "parent": "RELIABILITY" + }, + { + "key": "LOGIC_CHANGEABILITY", + "name": "Logic related changeability", + "parent": "CHANGEABILITY" + }, + { + "key": "SOFTWARE_RELATED_PORTABILITY", + "name": "Software related portability", + "parent": "PORTABILITY" + }, + { + "key": "INPUT_VALIDATION_AND_REPRESENTATION", + "name": "Input validation and representation", + "parent": "SECURITY" + }, + { + "key": "LANGUAGE_RELATED_PORTABILITY", + "name": "Language related portability", + "parent": "PORTABILITY" + }, + { + "key": "ERRORS", + "name": "Errors", + "parent": "SECURITY" + }, + { + "key": "SECURITY", + "name": "Security" + }, + { + "key": "RELIABILITY", + "name": "Reliability" + }, + { + "key": "PORTABILITY", + "name": "Portability" + }, + { + "key": "HARDWARE_RELATED_PORTABILITY", + "name": "Hardware related portability", + "parent": "PORTABILITY" + }, + { + "key": "SYNCHRONIZATION_RELIABILITY", + "name": "Synchronization related reliability", + "parent": "RELIABILITY" + }, + { + "key": "TRANSPORTABILITY", + "name": "Transportability", + "parent": "REUSABILITY" + }, + { + "key": "COMPILER_RELATED_PORTABILITY", + "name": "Compiler related portability", + "parent": "PORTABILITY" + }, + { + "key": "RESOURCE_RELIABILITY", + "name": "Resource", + "parent": "RELIABILITY" + }, + { + "key": "CPU_EFFICIENCY", + "name": "Processor use", + "parent": "EFFICIENCY" + }, + { + "key": "EFFICIENCY", + "name": "Efficiency" + }, + { + "key": "CHANGEABILITY", + "name": "Changeability" + }, + { + "key": "DATA_CHANGEABILITY", + "name": "Data related changeability", + "parent": "CHANGEABILITY" + }, + { + "key": "API_ABUSE", + "name": "API abuse", + "parent": "SECURITY" + }, + { + "key": "ARCHITECTURE_CHANGEABILITY", + "name": "Architecture related changeability", + "parent": "CHANGEABILITY" + }, + { + "key": "UNIT_TESTS", + "name": "Unit tests", + "parent": "RELIABILITY" + }, + { + "key": "INSTRUCTION_RELIABILITY", + "name": "Instruction related reliability", + "parent": "RELIABILITY" + }, + { + "key": "REUSABILITY", + "name": "Reusability" + }, + { + "key": "MODULARITY", + "name": "Modularity", + "parent": "REUSABILITY" + }, + { + "key": "UNIT_TESTABILITY", + "name": "Unit level testability", + "parent": "TESTABILITY" + }, + { + "key": "TESTABILITY", + "name": "Testability" + }, + { + "key": "INTEGRATION_TESTABILITY", + "name": "Integration level testability", + "parent": "TESTABILITY" + }, + { + "key": "NETWORK_USE", + "name": "Network use", + "parent": "EFFICIENCY" + }, + { + "key": "MEMORY_EFFICIENCY", + "name": "Memory use", + "parent": "EFFICIENCY" + }, + { + "key": "DATA_RELIABILITY", + "name": "Data related reliability", + "parent": "RELIABILITY" + }, + { + "key": "FAULT_TOLERANCE", + "name": "Fault tolerance", + "parent": "RELIABILITY" + }, + { + "key": "LOGIC_RELIABILITY", + "name": "Logic related reliability", + "parent": "RELIABILITY" + } + ] +} diff --git a/server/sonar-web/src/test/json/coding-rules-page-should-activate-profile/search.json b/server/sonar-web/src/test/json/coding-rules-page-should-activate-profile/search.json new file mode 100644 index 00000000000..b5a6bc269b9 --- /dev/null +++ b/server/sonar-web/src/test/json/coding-rules-page-should-activate-profile/search.json @@ -0,0 +1,171 @@ +{ + "total": 10, + "p": 1, + "ps": 200, + "rules": [ + { + "key": "squid:S1181", + "name": "Throwable and Error classes should not be caught", + "lang": "java", + "langName": "Java", + "sysTags": [ + "error-handling" + ], + "tags": [] + }, + { + "key": "squid:S1849", + "name": "\"Iterator.hasNext()\" should not call \"Iterator.next()\"", + "lang": "java", + "langName": "Java", + "sysTags": [ + "bug" + ], + "tags": [] + }, + { + "key": "squid:S1844", + "name": "\"Object.wait(...)\" should never be called on objects that implement \"java.util.concurrent.locks.Condition\"", + "lang": "java", + "langName": "Java", + "sysTags": [ + "bug", + "pitfall" + ], + "tags": [] + }, + { + "key": "squid:S2258", + "name": "\"javax.crypto.NullCipher\" should not be used for anything other than testing", + "lang": "java", + "langName": "Java", + "sysTags": [ + "cwe", + "owasp-top10", + "security" + ], + "tags": [] + }, + { + "key": "squid:S2251", + "name": "A \"for\" loop update clause should move the counter in the right direction", + "lang": "java", + "langName": "Java", + "sysTags": [ + "bug" + ], + "tags": [] + }, + { + "key": "squid:ObjectFinalizeOverridenCallsSuperFinalizeCheck", + "name": "super.finalize() should be called at the end of Object.finalize() implementations", + "lang": "java", + "langName": "Java", + "sysTags": [ + "bug" + ], + "tags": [] + }, + { + "key": "squid:S1143", + "name": "Return statements should not occur in finally blocks", + "lang": "java", + "langName": "Java", + "sysTags": [ + "bug" + ], + "tags": [] + }, + { + "key": "squid:S1206", + "name": "\"equals(Object obj)\" and \"hashCode()\" should be overridden in pairs", + "lang": "java", + "langName": "Java", + "sysTags": [ + "bug" + ], + "tags": [] + }, + { + "key": "squid:S1451", + "name": "Copyright and license headers should be defined in all source files", + "lang": "java", + "langName": "Java", + "sysTags": [ + "convention" + ], + "tags": [] + }, + { + "key": "squid:S1697", + "name": "Short-circuit logic should be used to prevent null pointer dereferences in conditionals", + "lang": "java", + "langName": "Java", + "sysTags": [ + "bug" + ], + "tags": [] + } + ], + "facets": [ + { + "property": "tags", + "values": [ + { + "val": "bug", + "count": 7 + }, + { + "val": "convention", + "count": 1 + }, + { + "val": "cwe", + "count": 1 + }, + { + "val": "error-handling", + "count": 1 + }, + { + "val": "owasp-top10", + "count": 1 + }, + { + "val": "pitfall", + "count": 1 + }, + { + "val": "security", + "count": 1 + } + ] + }, + { + "property": "languages", + "values": [ + { + "val": "java", + "count": 10 + }, + { + "val": "js", + "count": 6 + }, + { + "val": "php", + "count": 2 + } + ] + }, + { + "property": "repositories", + "values": [ + { + "val": "squid", + "count": 10 + } + ] + } + ] +} diff --git a/server/sonar-web/src/test/json/coding-rules-page-should-activate-profile/show-with-profile.json b/server/sonar-web/src/test/json/coding-rules-page-should-activate-profile/show-with-profile.json new file mode 100644 index 00000000000..1fddeb6a632 --- /dev/null +++ b/server/sonar-web/src/test/json/coding-rules-page-should-activate-profile/show-with-profile.json @@ -0,0 +1,39 @@ +{ + "rule": { + "key": "squid:S1181", + "repo": "squid", + "name": "Throwable and Error classes should not be caught", + "createdAt": "2013-08-09T14:40:54+0200", + "severity": "BLOCKER", + "status": "READY", + "internalKey": "S1181", + "isTemplate": false, + "tags": [], + "sysTags": [ + "error-handling" + ], + "lang": "java", + "langName": "Java", + "htmlDesc": "<p>\n<code>Throwable</code> is the superclass of all errors and exceptions in Java.\n<code>Error</code> is the superclass of all errors which are not meant to be caught by applications.\n</p>\n\n<p>\nCatching either <code>Throwable</code> or <code>Error</code> will also catch <code>OutOfMemoryError</code> or <code>InternalError</code> from which an application should not attempt to recover.\n</p>\n\n<p>Only <code>Exception</code> and its subclasses should be caught.</p>\n\n<h2>Noncompliant Code Example</h2>\n\n<pre>\ntry { /* ... */ } catch (Throwable t) { /* ... */ }\ntry { /* ... */ } catch (Error e) { /* ... */ } \n</pre>\n\n<h2>Compliant Solution</h2>\n\n<pre>\ntry { /* ... */ } catch (Exception e) { /* ... */ } \ntry { /* ... */ } catch (RuntimeException e) { /* ... */ } \ntry { /* ... */ } catch (MyException e) { /* ... */ } \n</pre>", + "defaultDebtChar": "RELIABILITY", + "defaultDebtSubChar": "EXCEPTION_HANDLING", + "debtChar": "RELIABILITY", + "debtSubChar": "EXCEPTION_HANDLING", + "debtCharName": "Reliability", + "debtSubCharName": "Exception handling", + "defaultDebtRemFnType": "CONSTANT_ISSUE", + "defaultDebtRemFnOffset": "20min", + "debtOverloaded": true, + "debtRemFnType": "LINEAR", + "debtRemFnCoeff": "20min", + "params": [] + }, + "actives": [ + { + "qProfile": "java-default-with-mojo-conventions-49307", + "inherit": "NONE", + "severity": "BLOCKER", + "params": [] + } + ] +} diff --git a/server/sonar-web/src/test/json/coding-rules-page-should-activate-profile/show.json b/server/sonar-web/src/test/json/coding-rules-page-should-activate-profile/show.json new file mode 100644 index 00000000000..cf4b206221e --- /dev/null +++ b/server/sonar-web/src/test/json/coding-rules-page-should-activate-profile/show.json @@ -0,0 +1,32 @@ +{ + "rule": { + "key": "squid:S1181", + "repo": "squid", + "name": "Throwable and Error classes should not be caught", + "createdAt": "2013-08-09T14:40:54+0200", + "severity": "BLOCKER", + "status": "READY", + "internalKey": "S1181", + "isTemplate": false, + "tags": [], + "sysTags": [ + "error-handling" + ], + "lang": "java", + "langName": "Java", + "htmlDesc": "<p>\n<code>Throwable</code> is the superclass of all errors and exceptions in Java.\n<code>Error</code> is the superclass of all errors which are not meant to be caught by applications.\n</p>\n\n<p>\nCatching either <code>Throwable</code> or <code>Error</code> will also catch <code>OutOfMemoryError</code> or <code>InternalError</code> from which an application should not attempt to recover.\n</p>\n\n<p>Only <code>Exception</code> and its subclasses should be caught.</p>\n\n<h2>Noncompliant Code Example</h2>\n\n<pre>\ntry { /* ... */ } catch (Throwable t) { /* ... */ }\ntry { /* ... */ } catch (Error e) { /* ... */ } \n</pre>\n\n<h2>Compliant Solution</h2>\n\n<pre>\ntry { /* ... */ } catch (Exception e) { /* ... */ } \ntry { /* ... */ } catch (RuntimeException e) { /* ... */ } \ntry { /* ... */ } catch (MyException e) { /* ... */ } \n</pre>", + "defaultDebtChar": "RELIABILITY", + "defaultDebtSubChar": "EXCEPTION_HANDLING", + "debtChar": "RELIABILITY", + "debtSubChar": "EXCEPTION_HANDLING", + "debtCharName": "Reliability", + "debtSubCharName": "Exception handling", + "defaultDebtRemFnType": "CONSTANT_ISSUE", + "defaultDebtRemFnOffset": "20min", + "debtOverloaded": true, + "debtRemFnType": "LINEAR", + "debtRemFnCoeff": "20min", + "params": [] + }, + "actives": [] +} |