diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2017-06-23 21:31:56 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2017-06-25 23:42:50 +0200 |
commit | 70b6899988da0d2ba0a39b846e4f1bd3fa27304f (patch) | |
tree | 1ac093a87e0fba6b07c6feb6aceae89bdd9663cf /tests/projects/testing | |
parent | 5dd574819854e9ce7e2f4e181e78153a7ecbf828 (diff) | |
download | sonarqube-70b6899988da0d2ba0a39b846e4f1bd3fa27304f.tar.gz sonarqube-70b6899988da0d2ba0a39b846e4f1bd3fa27304f.zip |
Move integration tests to directory tests/
Diffstat (limited to 'tests/projects/testing')
52 files changed, 489 insertions, 0 deletions
diff --git a/tests/projects/testing/README.txt b/tests/projects/testing/README.txt new file mode 100644 index 00000000000..c21c5ec3452 --- /dev/null +++ b/tests/projects/testing/README.txt @@ -0,0 +1,2 @@ +Note that if you expect "test_execution_time" greater than zero, then you should guarantee execution time at least in 1 second. +So use Thread.sleep in order to have stable test. diff --git a/tests/projects/testing/xoo-half-covered/pom.xml b/tests/projects/testing/xoo-half-covered/pom.xml new file mode 100644 index 00000000000..25b230c7864 --- /dev/null +++ b/tests/projects/testing/xoo-half-covered/pom.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>com.sonarsource.it.exclusions</groupId> + <artifactId>java-half-covered</artifactId> + <version>1.0-SNAPSHOT</version> + <name>Sonar :: Integration Tests :: Java Half Covered</name> + + <url>http://www.javahalfcovered.org</url> + + <issueManagement> + <system>jira</system> + <url>http://jira.codehaus.org/browse/JAVAHALFCOVERED</url> + </issueManagement> + + <scm> + <connection>scm:git:git@github.com:SonarSource/javahalfcovered.git</connection> + <developerConnection>scm:git:git@github.com:SonarSource/javahalfcovered.git</developerConnection> + <url>https://github.com/SonarSource/javahalfcovered</url> + </scm> + + <properties> + <sonar.scm.disabled>true</sonar.scm.disabled> + </properties> + + <ciManagement> + <system>bamboo</system> + <url>http://bamboo.ci.codehaus.org/browse/JAVAHALFCOVERED</url> + </ciManagement> + + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.8.2</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.easytesting</groupId> + <artifactId>fest-assert</artifactId> + <version>1.4</version> + <scope>test</scope> + </dependency> + </dependencies> + +</project> diff --git a/tests/projects/testing/xoo-half-covered/sonar-project.properties b/tests/projects/testing/xoo-half-covered/sonar-project.properties new file mode 100644 index 00000000000..ea64e84c3a0 --- /dev/null +++ b/tests/projects/testing/xoo-half-covered/sonar-project.properties @@ -0,0 +1,5 @@ +sonar.projectKey=xoo-half-covered +sonar.projectName=Sample IT Coverage +sonar.projectVersion=1.0-SNAPSHOT +sonar.sources=src/main/xoo +sonar.language=xoo diff --git a/tests/projects/testing/xoo-half-covered/src/main/xoo/org/sonar/tests/halfcovered/Covered.xoo b/tests/projects/testing/xoo-half-covered/src/main/xoo/org/sonar/tests/halfcovered/Covered.xoo new file mode 100644 index 00000000000..fc6abc4a88e --- /dev/null +++ b/tests/projects/testing/xoo-half-covered/src/main/xoo/org/sonar/tests/halfcovered/Covered.xoo @@ -0,0 +1,8 @@ +package org.sonar.tests.halfcovered; + +public class Covered { + + public int returnOne() { + return 1; + } +} diff --git a/tests/projects/testing/xoo-half-covered/src/main/xoo/org/sonar/tests/halfcovered/Covered.xoo.coverage b/tests/projects/testing/xoo-half-covered/src/main/xoo/org/sonar/tests/halfcovered/Covered.xoo.coverage new file mode 100644 index 00000000000..0f42ea6e2b5 --- /dev/null +++ b/tests/projects/testing/xoo-half-covered/src/main/xoo/org/sonar/tests/halfcovered/Covered.xoo.coverage @@ -0,0 +1 @@ +6:1 diff --git a/tests/projects/testing/xoo-half-covered/src/main/xoo/org/sonar/tests/halfcovered/UnCovered.xoo b/tests/projects/testing/xoo-half-covered/src/main/xoo/org/sonar/tests/halfcovered/UnCovered.xoo new file mode 100644 index 00000000000..25f413c7c5a --- /dev/null +++ b/tests/projects/testing/xoo-half-covered/src/main/xoo/org/sonar/tests/halfcovered/UnCovered.xoo @@ -0,0 +1,8 @@ +package org.sonar.tests.halfcovered; + +public class UnCovered { + + public int returnTwo() { + return 2; + } +} diff --git a/tests/projects/testing/xoo-half-covered/src/main/xoo/org/sonar/tests/halfcovered/UnCovered.xoo.coverage b/tests/projects/testing/xoo-half-covered/src/main/xoo/org/sonar/tests/halfcovered/UnCovered.xoo.coverage new file mode 100644 index 00000000000..126ba135e20 --- /dev/null +++ b/tests/projects/testing/xoo-half-covered/src/main/xoo/org/sonar/tests/halfcovered/UnCovered.xoo.coverage @@ -0,0 +1 @@ +6:0 diff --git a/tests/projects/testing/xoo-sample-it-coverage/sonar-project.properties b/tests/projects/testing/xoo-sample-it-coverage/sonar-project.properties new file mode 100644 index 00000000000..18e56c6eb75 --- /dev/null +++ b/tests/projects/testing/xoo-sample-it-coverage/sonar-project.properties @@ -0,0 +1,5 @@ +sonar.projectKey=sample-it-coverage +sonar.projectName=Sample IT Coverage +sonar.projectVersion=1.0-SNAPSHOT +sonar.sources=src/main/xoo +sonar.language=xoo diff --git a/tests/projects/testing/xoo-sample-it-coverage/src/main/xoo/sample/Sample.xoo b/tests/projects/testing/xoo-sample-it-coverage/src/main/xoo/sample/Sample.xoo new file mode 100644 index 00000000000..41871e123a3 --- /dev/null +++ b/tests/projects/testing/xoo-sample-it-coverage/src/main/xoo/sample/Sample.xoo @@ -0,0 +1,16 @@ +package sample; + +public class Sample { + + public Sample(int i) { + int j = i++; + } + + private String myMethod() { + if (foo == bar) { + return "hello"; + } else { + throw new IllegalStateException(); + } + } +} diff --git a/tests/projects/testing/xoo-sample-it-coverage/src/main/xoo/sample/Sample.xoo.itcoverage b/tests/projects/testing/xoo-sample-it-coverage/src/main/xoo/sample/Sample.xoo.itcoverage new file mode 100644 index 00000000000..36860af51ff --- /dev/null +++ b/tests/projects/testing/xoo-sample-it-coverage/src/main/xoo/sample/Sample.xoo.itcoverage @@ -0,0 +1,4 @@ +6:2 +10:0:2:1 +11:1 +13:0
\ No newline at end of file diff --git a/tests/projects/testing/xoo-sample-new-coverage-v1/sonar-project.properties b/tests/projects/testing/xoo-sample-new-coverage-v1/sonar-project.properties new file mode 100644 index 00000000000..a711b2bd89e --- /dev/null +++ b/tests/projects/testing/xoo-sample-new-coverage-v1/sonar-project.properties @@ -0,0 +1,6 @@ +sonar.projectKey=sample-new-coverage +sonar.projectName=Sample new Coverage +sonar.projectVersion=1.0-SNAPSHOT +sonar.sources=src/main/xoo +sonar.language=xoo +sonar.scm.provider=xoo diff --git a/tests/projects/testing/xoo-sample-new-coverage-v1/src/main/xoo/sample/Sample.xoo b/tests/projects/testing/xoo-sample-new-coverage-v1/src/main/xoo/sample/Sample.xoo new file mode 100644 index 00000000000..41871e123a3 --- /dev/null +++ b/tests/projects/testing/xoo-sample-new-coverage-v1/src/main/xoo/sample/Sample.xoo @@ -0,0 +1,16 @@ +package sample; + +public class Sample { + + public Sample(int i) { + int j = i++; + } + + private String myMethod() { + if (foo == bar) { + return "hello"; + } else { + throw new IllegalStateException(); + } + } +} diff --git a/tests/projects/testing/xoo-sample-new-coverage-v1/src/main/xoo/sample/Sample.xoo.coverage b/tests/projects/testing/xoo-sample-new-coverage-v1/src/main/xoo/sample/Sample.xoo.coverage new file mode 100644 index 00000000000..a2d656d1c9d --- /dev/null +++ b/tests/projects/testing/xoo-sample-new-coverage-v1/src/main/xoo/sample/Sample.xoo.coverage @@ -0,0 +1 @@ +6:2:3:3 diff --git a/tests/projects/testing/xoo-sample-new-coverage-v1/src/main/xoo/sample/Sample.xoo.itcoverage b/tests/projects/testing/xoo-sample-new-coverage-v1/src/main/xoo/sample/Sample.xoo.itcoverage new file mode 100644 index 00000000000..a2d656d1c9d --- /dev/null +++ b/tests/projects/testing/xoo-sample-new-coverage-v1/src/main/xoo/sample/Sample.xoo.itcoverage @@ -0,0 +1 @@ +6:2:3:3 diff --git a/tests/projects/testing/xoo-sample-new-coverage-v1/src/main/xoo/sample/Sample.xoo.measures b/tests/projects/testing/xoo-sample-new-coverage-v1/src/main/xoo/sample/Sample.xoo.measures new file mode 100644 index 00000000000..18b6b8eb944 --- /dev/null +++ b/tests/projects/testing/xoo-sample-new-coverage-v1/src/main/xoo/sample/Sample.xoo.measures @@ -0,0 +1,2 @@ +ncloc:17 + diff --git a/tests/projects/testing/xoo-sample-new-coverage-v1/src/main/xoo/sample/Sample.xoo.overallcoverage b/tests/projects/testing/xoo-sample-new-coverage-v1/src/main/xoo/sample/Sample.xoo.overallcoverage new file mode 100644 index 00000000000..a2d656d1c9d --- /dev/null +++ b/tests/projects/testing/xoo-sample-new-coverage-v1/src/main/xoo/sample/Sample.xoo.overallcoverage @@ -0,0 +1 @@ +6:2:3:3 diff --git a/tests/projects/testing/xoo-sample-new-coverage-v1/src/main/xoo/sample/Sample.xoo.scm b/tests/projects/testing/xoo-sample-new-coverage-v1/src/main/xoo/sample/Sample.xoo.scm new file mode 100644 index 00000000000..e047ea4394e --- /dev/null +++ b/tests/projects/testing/xoo-sample-new-coverage-v1/src/main/xoo/sample/Sample.xoo.scm @@ -0,0 +1,17 @@ +1,user1,2015-01-04 +1,user1,2015-01-04 +1,user1,2015-01-04 +1,user1,2015-01-04 +2,user2,2015-01-05 +2,user2,2015-01-05 +3,user3,2015-01-06 +4,user4,2015-01-07 +4,user4,2015-01-07 +4,user4,2015-01-07 +4,user4,2015-01-07 +4,user4,2015-01-07 +4,user4,2015-01-07 +4,user4,2015-01-07 +4,user4,2015-01-07 +4,user4,2015-01-07 +4,user4,2015-01-07 diff --git a/tests/projects/testing/xoo-sample-new-coverage-v2/sonar-project.properties b/tests/projects/testing/xoo-sample-new-coverage-v2/sonar-project.properties new file mode 100644 index 00000000000..a711b2bd89e --- /dev/null +++ b/tests/projects/testing/xoo-sample-new-coverage-v2/sonar-project.properties @@ -0,0 +1,6 @@ +sonar.projectKey=sample-new-coverage +sonar.projectName=Sample new Coverage +sonar.projectVersion=1.0-SNAPSHOT +sonar.sources=src/main/xoo +sonar.language=xoo +sonar.scm.provider=xoo diff --git a/tests/projects/testing/xoo-sample-new-coverage-v2/src/main/xoo/sample/Sample.xoo b/tests/projects/testing/xoo-sample-new-coverage-v2/src/main/xoo/sample/Sample.xoo new file mode 100644 index 00000000000..83b519b4b1a --- /dev/null +++ b/tests/projects/testing/xoo-sample-new-coverage-v2/src/main/xoo/sample/Sample.xoo @@ -0,0 +1,16 @@ +package sample; + +public class Sample { + + public Sample(int i) { + int j = i++; + } + + private String myMethod() { + if (foo2 == bar2) { + return "hello2"; + } else { + throw new IllegalStateException(); + } + } +} diff --git a/tests/projects/testing/xoo-sample-new-coverage-v2/src/main/xoo/sample/Sample.xoo.coverage b/tests/projects/testing/xoo-sample-new-coverage-v2/src/main/xoo/sample/Sample.xoo.coverage new file mode 100644 index 00000000000..cd6fabd8eec --- /dev/null +++ b/tests/projects/testing/xoo-sample-new-coverage-v2/src/main/xoo/sample/Sample.xoo.coverage @@ -0,0 +1,6 @@ +6:0:3:1 +7:1:3:1 +8:0 +9:1 +10:1 +11:1 diff --git a/tests/projects/testing/xoo-sample-new-coverage-v2/src/main/xoo/sample/Sample.xoo.itcoverage b/tests/projects/testing/xoo-sample-new-coverage-v2/src/main/xoo/sample/Sample.xoo.itcoverage new file mode 100644 index 00000000000..77bdb584a48 --- /dev/null +++ b/tests/projects/testing/xoo-sample-new-coverage-v2/src/main/xoo/sample/Sample.xoo.itcoverage @@ -0,0 +1,5 @@ +6:0:3:1 +7:1:3:2 +8:1 +9:1 +10:1 diff --git a/tests/projects/testing/xoo-sample-new-coverage-v2/src/main/xoo/sample/Sample.xoo.measures b/tests/projects/testing/xoo-sample-new-coverage-v2/src/main/xoo/sample/Sample.xoo.measures new file mode 100644 index 00000000000..e4f33ed58ed --- /dev/null +++ b/tests/projects/testing/xoo-sample-new-coverage-v2/src/main/xoo/sample/Sample.xoo.measures @@ -0,0 +1 @@ +ncloc:17 diff --git a/tests/projects/testing/xoo-sample-new-coverage-v2/src/main/xoo/sample/Sample.xoo.overallcoverage b/tests/projects/testing/xoo-sample-new-coverage-v2/src/main/xoo/sample/Sample.xoo.overallcoverage new file mode 100644 index 00000000000..ab5d844418e --- /dev/null +++ b/tests/projects/testing/xoo-sample-new-coverage-v2/src/main/xoo/sample/Sample.xoo.overallcoverage @@ -0,0 +1,3 @@ +6:0:3:1 +7:1:3:2 +8:0:4:1 diff --git a/tests/projects/testing/xoo-sample-new-coverage-v2/src/main/xoo/sample/Sample.xoo.scm b/tests/projects/testing/xoo-sample-new-coverage-v2/src/main/xoo/sample/Sample.xoo.scm new file mode 100644 index 00000000000..06d9b20756a --- /dev/null +++ b/tests/projects/testing/xoo-sample-new-coverage-v2/src/main/xoo/sample/Sample.xoo.scm @@ -0,0 +1,17 @@ +1,user1,2015-01-04 +1,user1,2015-01-04 +1,user1,2015-01-04 +1,user1,2015-01-04 +2,user2,2015-01-05 +2,user2,2015-01-05 +3,user3,2015-06-06 +4,user4,2015-06-07 +4,user4,2015-06-07 +4,user4,2015-06-07 +4,user4,2015-06-07 +4,user4,2015-01-07 +4,user4,2015-01-07 +4,user4,2015-01-07 +4,user4,2015-01-07 +4,user4,2015-01-07 +4,user4,2015-01-07 diff --git a/tests/projects/testing/xoo-sample-overall-coverage/sonar-project.properties b/tests/projects/testing/xoo-sample-overall-coverage/sonar-project.properties new file mode 100644 index 00000000000..65fb9b6ed33 --- /dev/null +++ b/tests/projects/testing/xoo-sample-overall-coverage/sonar-project.properties @@ -0,0 +1,5 @@ +sonar.projectKey=sample-overall-coverage +sonar.projectName=Sample Overall Coverage +sonar.projectVersion=1.0-SNAPSHOT +sonar.sources=src/main/xoo +sonar.language=xoo diff --git a/tests/projects/testing/xoo-sample-overall-coverage/src/main/xoo/sample/Sample.xoo b/tests/projects/testing/xoo-sample-overall-coverage/src/main/xoo/sample/Sample.xoo new file mode 100644 index 00000000000..1674d4578dc --- /dev/null +++ b/tests/projects/testing/xoo-sample-overall-coverage/src/main/xoo/sample/Sample.xoo @@ -0,0 +1,16 @@ +package sample; + +public class Sample { + + public Sample(int i) { + int j = i++; + } + + private String myMethod() { + if (foo == bar && biz > 1) { + return "hello"; + } else { + throw new IllegalStateException(); + } + } +} diff --git a/tests/projects/testing/xoo-sample-overall-coverage/src/main/xoo/sample/Sample.xoo.coverage b/tests/projects/testing/xoo-sample-overall-coverage/src/main/xoo/sample/Sample.xoo.coverage new file mode 100644 index 00000000000..1c244dbc697 --- /dev/null +++ b/tests/projects/testing/xoo-sample-overall-coverage/src/main/xoo/sample/Sample.xoo.coverage @@ -0,0 +1,4 @@ +6:2 +10:0:4:1 +11:1 +13:0
\ No newline at end of file diff --git a/tests/projects/testing/xoo-sample-overall-coverage/src/main/xoo/sample/Sample.xoo.itcoverage b/tests/projects/testing/xoo-sample-overall-coverage/src/main/xoo/sample/Sample.xoo.itcoverage new file mode 100644 index 00000000000..808d5b37e98 --- /dev/null +++ b/tests/projects/testing/xoo-sample-overall-coverage/src/main/xoo/sample/Sample.xoo.itcoverage @@ -0,0 +1,4 @@ +6:2 +10:0:4:1 +11:0 +13:1
\ No newline at end of file diff --git a/tests/projects/testing/xoo-sample-overall-coverage/src/main/xoo/sample/Sample.xoo.overallcoverage b/tests/projects/testing/xoo-sample-overall-coverage/src/main/xoo/sample/Sample.xoo.overallcoverage new file mode 100644 index 00000000000..82024035bff --- /dev/null +++ b/tests/projects/testing/xoo-sample-overall-coverage/src/main/xoo/sample/Sample.xoo.overallcoverage @@ -0,0 +1,4 @@ +6:2 +10:0:4:2 +11:1 +13:1
\ No newline at end of file diff --git a/tests/projects/testing/xoo-sample-ut-coverage-no-condition/sonar-project.properties b/tests/projects/testing/xoo-sample-ut-coverage-no-condition/sonar-project.properties new file mode 100644 index 00000000000..a931c4c7093 --- /dev/null +++ b/tests/projects/testing/xoo-sample-ut-coverage-no-condition/sonar-project.properties @@ -0,0 +1,5 @@ +sonar.projectKey=sample-ut-coverage +sonar.projectName=Sample UT Coverage +sonar.projectVersion=1.0-SNAPSHOT +sonar.sources=src/main/xoo +sonar.language=xoo diff --git a/tests/projects/testing/xoo-sample-ut-coverage-no-condition/src/main/xoo/sample/Sample.xoo b/tests/projects/testing/xoo-sample-ut-coverage-no-condition/src/main/xoo/sample/Sample.xoo new file mode 100644 index 00000000000..41871e123a3 --- /dev/null +++ b/tests/projects/testing/xoo-sample-ut-coverage-no-condition/src/main/xoo/sample/Sample.xoo @@ -0,0 +1,16 @@ +package sample; + +public class Sample { + + public Sample(int i) { + int j = i++; + } + + private String myMethod() { + if (foo == bar) { + return "hello"; + } else { + throw new IllegalStateException(); + } + } +} diff --git a/tests/projects/testing/xoo-sample-ut-coverage-no-condition/src/main/xoo/sample/Sample.xoo.coverage b/tests/projects/testing/xoo-sample-ut-coverage-no-condition/src/main/xoo/sample/Sample.xoo.coverage new file mode 100644 index 00000000000..5e59aed012e --- /dev/null +++ b/tests/projects/testing/xoo-sample-ut-coverage-no-condition/src/main/xoo/sample/Sample.xoo.coverage @@ -0,0 +1,4 @@ +6:2 +10:0 +11:1 +13:0
\ No newline at end of file diff --git a/tests/projects/testing/xoo-sample-ut-coverage/sonar-project.properties b/tests/projects/testing/xoo-sample-ut-coverage/sonar-project.properties new file mode 100644 index 00000000000..a931c4c7093 --- /dev/null +++ b/tests/projects/testing/xoo-sample-ut-coverage/sonar-project.properties @@ -0,0 +1,5 @@ +sonar.projectKey=sample-ut-coverage +sonar.projectName=Sample UT Coverage +sonar.projectVersion=1.0-SNAPSHOT +sonar.sources=src/main/xoo +sonar.language=xoo diff --git a/tests/projects/testing/xoo-sample-ut-coverage/src/main/xoo/sample/Sample.xoo b/tests/projects/testing/xoo-sample-ut-coverage/src/main/xoo/sample/Sample.xoo new file mode 100644 index 00000000000..41871e123a3 --- /dev/null +++ b/tests/projects/testing/xoo-sample-ut-coverage/src/main/xoo/sample/Sample.xoo @@ -0,0 +1,16 @@ +package sample; + +public class Sample { + + public Sample(int i) { + int j = i++; + } + + private String myMethod() { + if (foo == bar) { + return "hello"; + } else { + throw new IllegalStateException(); + } + } +} diff --git a/tests/projects/testing/xoo-sample-ut-coverage/src/main/xoo/sample/Sample.xoo.coverage b/tests/projects/testing/xoo-sample-ut-coverage/src/main/xoo/sample/Sample.xoo.coverage new file mode 100644 index 00000000000..36860af51ff --- /dev/null +++ b/tests/projects/testing/xoo-sample-ut-coverage/src/main/xoo/sample/Sample.xoo.coverage @@ -0,0 +1,4 @@ +6:2 +10:0:2:1 +11:1 +13:0
\ No newline at end of file diff --git a/tests/projects/testing/xoo-sample-with-coverage-per-test/sonar-project.properties b/tests/projects/testing/xoo-sample-with-coverage-per-test/sonar-project.properties new file mode 100644 index 00000000000..0f2415d0320 --- /dev/null +++ b/tests/projects/testing/xoo-sample-with-coverage-per-test/sonar-project.properties @@ -0,0 +1,6 @@ +sonar.projectKey=sample-with-tests +sonar.projectName=Sample with tests +sonar.projectVersion=1.0-SNAPSHOT +sonar.sources=src/main/xoo +sonar.tests=src/test/xoo +sonar.language=xoo
\ No newline at end of file diff --git a/tests/projects/testing/xoo-sample-with-coverage-per-test/src/main/xoo/sample/Sample.xoo b/tests/projects/testing/xoo-sample-with-coverage-per-test/src/main/xoo/sample/Sample.xoo new file mode 100644 index 00000000000..b1210973dd9 --- /dev/null +++ b/tests/projects/testing/xoo-sample-with-coverage-per-test/src/main/xoo/sample/Sample.xoo @@ -0,0 +1,12 @@ +package sample; + +public class Sample { + + public Sample(int i) { + int j = i++; + } + + private String myMethod() { + return "hello"; + } +} diff --git a/tests/projects/testing/xoo-sample-with-coverage-per-test/src/main/xoo/sample/Sample2.xoo b/tests/projects/testing/xoo-sample-with-coverage-per-test/src/main/xoo/sample/Sample2.xoo new file mode 100644 index 00000000000..ed097595590 --- /dev/null +++ b/tests/projects/testing/xoo-sample-with-coverage-per-test/src/main/xoo/sample/Sample2.xoo @@ -0,0 +1,12 @@ +package sample; + +public class Sample2 { + + public Sample2(int i) { + int j = i++; + } + + private String myMethod() { + return "hello"; + } +} diff --git a/tests/projects/testing/xoo-sample-with-coverage-per-test/src/test/xoo/sample/Sample2Test.xoo b/tests/projects/testing/xoo-sample-with-coverage-per-test/src/test/xoo/sample/Sample2Test.xoo new file mode 100644 index 00000000000..fe2368fefaa --- /dev/null +++ b/tests/projects/testing/xoo-sample-with-coverage-per-test/src/test/xoo/sample/Sample2Test.xoo @@ -0,0 +1,32 @@ +package sample; + +import org.hamcrest.CoreMatchers; +import org.junit.Test; + +import static org.junit.Assert.assertThat; + +public class SampleTest { + + @Test + @Ignore + public void skipped() { + Sample sample = new Sample(1); + assertThat(sample.getI(), CoreMatchers.is(1)); + } + + @Test + public void failure() { + fail(); + } + + @Test + public void error() { + throw new IllegalStateException("Foo"); + } + + @Test + public void success() { + System.out.println("OK"); + } + +} diff --git a/tests/projects/testing/xoo-sample-with-coverage-per-test/src/test/xoo/sample/Sample2Test.xoo.test b/tests/projects/testing/xoo-sample-with-coverage-per-test/src/test/xoo/sample/Sample2Test.xoo.test new file mode 100644 index 00000000000..9686b58c1d6 --- /dev/null +++ b/tests/projects/testing/xoo-sample-with-coverage-per-test/src/test/xoo/sample/Sample2Test.xoo.test @@ -0,0 +1 @@ +another test:10:::OK:UT
\ No newline at end of file diff --git a/tests/projects/testing/xoo-sample-with-coverage-per-test/src/test/xoo/sample/Sample2Test.xoo.testcoverage b/tests/projects/testing/xoo-sample-with-coverage-per-test/src/test/xoo/sample/Sample2Test.xoo.testcoverage new file mode 100644 index 00000000000..b7f37235ced --- /dev/null +++ b/tests/projects/testing/xoo-sample-with-coverage-per-test/src/test/xoo/sample/Sample2Test.xoo.testcoverage @@ -0,0 +1 @@ +another test;src/main/xoo/sample/Sample.xoo,6 diff --git a/tests/projects/testing/xoo-sample-with-coverage-per-test/src/test/xoo/sample/SampleTest.xoo b/tests/projects/testing/xoo-sample-with-coverage-per-test/src/test/xoo/sample/SampleTest.xoo new file mode 100644 index 00000000000..fe2368fefaa --- /dev/null +++ b/tests/projects/testing/xoo-sample-with-coverage-per-test/src/test/xoo/sample/SampleTest.xoo @@ -0,0 +1,32 @@ +package sample; + +import org.hamcrest.CoreMatchers; +import org.junit.Test; + +import static org.junit.Assert.assertThat; + +public class SampleTest { + + @Test + @Ignore + public void skipped() { + Sample sample = new Sample(1); + assertThat(sample.getI(), CoreMatchers.is(1)); + } + + @Test + public void failure() { + fail(); + } + + @Test + public void error() { + throw new IllegalStateException("Foo"); + } + + @Test + public void success() { + System.out.println("OK"); + } + +} diff --git a/tests/projects/testing/xoo-sample-with-coverage-per-test/src/test/xoo/sample/SampleTest.xoo.test b/tests/projects/testing/xoo-sample-with-coverage-per-test/src/test/xoo/sample/SampleTest.xoo.test new file mode 100644 index 00000000000..b0259693199 --- /dev/null +++ b/tests/projects/testing/xoo-sample-with-coverage-per-test/src/test/xoo/sample/SampleTest.xoo.test @@ -0,0 +1,4 @@ +skipped::::SKIPPED:UNIT +failure:2:Failure::FAILURE:UNIT +error:2:Error:The stack:ERROR:UNIT +success:4:::OK:INTEGRATION
\ No newline at end of file diff --git a/tests/projects/testing/xoo-sample-with-coverage-per-test/src/test/xoo/sample/SampleTest.xoo.testcoverage b/tests/projects/testing/xoo-sample-with-coverage-per-test/src/test/xoo/sample/SampleTest.xoo.testcoverage new file mode 100644 index 00000000000..f6765cf74f0 --- /dev/null +++ b/tests/projects/testing/xoo-sample-with-coverage-per-test/src/test/xoo/sample/SampleTest.xoo.testcoverage @@ -0,0 +1,2 @@ +success;src/main/xoo/sample/Sample.xoo,6,10;src/main/xoo/sample/Sample2.xoo,10 +failure;src/main/xoo/sample/Sample.xoo,6
\ No newline at end of file diff --git a/tests/projects/testing/xoo-sample-with-tests-execution-details/sonar-project.properties b/tests/projects/testing/xoo-sample-with-tests-execution-details/sonar-project.properties new file mode 100644 index 00000000000..0f2415d0320 --- /dev/null +++ b/tests/projects/testing/xoo-sample-with-tests-execution-details/sonar-project.properties @@ -0,0 +1,6 @@ +sonar.projectKey=sample-with-tests +sonar.projectName=Sample with tests +sonar.projectVersion=1.0-SNAPSHOT +sonar.sources=src/main/xoo +sonar.tests=src/test/xoo +sonar.language=xoo
\ No newline at end of file diff --git a/tests/projects/testing/xoo-sample-with-tests-execution-details/src/main/xoo/sample/Sample.xoo b/tests/projects/testing/xoo-sample-with-tests-execution-details/src/main/xoo/sample/Sample.xoo new file mode 100644 index 00000000000..b1210973dd9 --- /dev/null +++ b/tests/projects/testing/xoo-sample-with-tests-execution-details/src/main/xoo/sample/Sample.xoo @@ -0,0 +1,12 @@ +package sample; + +public class Sample { + + public Sample(int i) { + int j = i++; + } + + private String myMethod() { + return "hello"; + } +} diff --git a/tests/projects/testing/xoo-sample-with-tests-execution-details/src/test/xoo/sample/SampleTest.xoo b/tests/projects/testing/xoo-sample-with-tests-execution-details/src/test/xoo/sample/SampleTest.xoo new file mode 100644 index 00000000000..fe2368fefaa --- /dev/null +++ b/tests/projects/testing/xoo-sample-with-tests-execution-details/src/test/xoo/sample/SampleTest.xoo @@ -0,0 +1,32 @@ +package sample; + +import org.hamcrest.CoreMatchers; +import org.junit.Test; + +import static org.junit.Assert.assertThat; + +public class SampleTest { + + @Test + @Ignore + public void skipped() { + Sample sample = new Sample(1); + assertThat(sample.getI(), CoreMatchers.is(1)); + } + + @Test + public void failure() { + fail(); + } + + @Test + public void error() { + throw new IllegalStateException("Foo"); + } + + @Test + public void success() { + System.out.println("OK"); + } + +} diff --git a/tests/projects/testing/xoo-sample-with-tests-execution-details/src/test/xoo/sample/SampleTest.xoo.test b/tests/projects/testing/xoo-sample-with-tests-execution-details/src/test/xoo/sample/SampleTest.xoo.test new file mode 100644 index 00000000000..b0259693199 --- /dev/null +++ b/tests/projects/testing/xoo-sample-with-tests-execution-details/src/test/xoo/sample/SampleTest.xoo.test @@ -0,0 +1,4 @@ +skipped::::SKIPPED:UNIT +failure:2:Failure::FAILURE:UNIT +error:2:Error:The stack:ERROR:UNIT +success:4:::OK:INTEGRATION
\ No newline at end of file diff --git a/tests/projects/testing/xoo-sample-with-tests-execution-measures/sonar-project.properties b/tests/projects/testing/xoo-sample-with-tests-execution-measures/sonar-project.properties new file mode 100644 index 00000000000..0f2415d0320 --- /dev/null +++ b/tests/projects/testing/xoo-sample-with-tests-execution-measures/sonar-project.properties @@ -0,0 +1,6 @@ +sonar.projectKey=sample-with-tests +sonar.projectName=Sample with tests +sonar.projectVersion=1.0-SNAPSHOT +sonar.sources=src/main/xoo +sonar.tests=src/test/xoo +sonar.language=xoo
\ No newline at end of file diff --git a/tests/projects/testing/xoo-sample-with-tests-execution-measures/src/main/xoo/sample/Sample.xoo b/tests/projects/testing/xoo-sample-with-tests-execution-measures/src/main/xoo/sample/Sample.xoo new file mode 100644 index 00000000000..b1210973dd9 --- /dev/null +++ b/tests/projects/testing/xoo-sample-with-tests-execution-measures/src/main/xoo/sample/Sample.xoo @@ -0,0 +1,12 @@ +package sample; + +public class Sample { + + public Sample(int i) { + int j = i++; + } + + private String myMethod() { + return "hello"; + } +} diff --git a/tests/projects/testing/xoo-sample-with-tests-execution-measures/src/test/xoo/sample/SampleTest.xoo b/tests/projects/testing/xoo-sample-with-tests-execution-measures/src/test/xoo/sample/SampleTest.xoo new file mode 100644 index 00000000000..fe2368fefaa --- /dev/null +++ b/tests/projects/testing/xoo-sample-with-tests-execution-measures/src/test/xoo/sample/SampleTest.xoo @@ -0,0 +1,32 @@ +package sample; + +import org.hamcrest.CoreMatchers; +import org.junit.Test; + +import static org.junit.Assert.assertThat; + +public class SampleTest { + + @Test + @Ignore + public void skipped() { + Sample sample = new Sample(1); + assertThat(sample.getI(), CoreMatchers.is(1)); + } + + @Test + public void failure() { + fail(); + } + + @Test + public void error() { + throw new IllegalStateException("Foo"); + } + + @Test + public void success() { + System.out.println("OK"); + } + +} diff --git a/tests/projects/testing/xoo-sample-with-tests-execution-measures/src/test/xoo/sample/SampleTest.xoo.measures b/tests/projects/testing/xoo-sample-with-tests-execution-measures/src/test/xoo/sample/SampleTest.xoo.measures new file mode 100644 index 00000000000..de1549480b5 --- /dev/null +++ b/tests/projects/testing/xoo-sample-with-tests-execution-measures/src/test/xoo/sample/SampleTest.xoo.measures @@ -0,0 +1,5 @@ +tests:3 +test_execution_time:8 +skipped_tests:1 +test_errors:1 +test_failures:1
\ No newline at end of file |