From 75b7b8905d81a5c54235ca432f12dffb40cd091e Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Fri, 26 Jun 2015 20:17:54 +0200 Subject: [PATCH] Add missing directory in integration tests --- it/it-projects/testing/README.txt | 2 + .../testing/xoo-half-covered/pom.xml | 47 +++++++++++++++++++ .../xoo-half-covered/sonar-project.properties | 5 ++ .../org/sonar/tests/halfcovered/Covered.xoo | 8 ++++ .../tests/halfcovered/Covered.xoo.coverage | 1 + .../org/sonar/tests/halfcovered/UnCovered.xoo | 8 ++++ .../tests/halfcovered/UnCovered.xoo.coverage | 1 + .../sonar-project.properties | 5 ++ .../src/main/xoo/sample/Sample.xoo | 16 +++++++ .../src/main/xoo/sample/Sample.xoo.itcoverage | 4 ++ .../sonar-project.properties | 5 ++ .../src/main/xoo/sample/Sample.xoo | 16 +++++++ .../src/main/xoo/sample/Sample.xoo.coverage | 4 ++ .../src/main/xoo/sample/Sample.xoo.itcoverage | 4 ++ .../xoo/sample/Sample.xoo.overallcoverage | 4 ++ .../sonar-project.properties | 5 ++ .../src/main/xoo/sample/Sample.xoo | 16 +++++++ .../src/main/xoo/sample/Sample.xoo.coverage | 4 ++ .../sonar-project.properties | 5 ++ .../src/main/xoo/sample/Sample.xoo | 16 +++++++ .../src/main/xoo/sample/Sample.xoo.coverage | 4 ++ .../sonar-project.properties | 6 +++ .../src/main/xoo/sample/Sample.xoo | 12 +++++ .../src/main/xoo/sample/Sample2.xoo | 12 +++++ .../src/test/xoo/sample/Sample2Test.xoo | 32 +++++++++++++ .../src/test/xoo/sample/Sample2Test.xoo.test | 1 + .../xoo/sample/Sample2Test.xoo.testcoverage | 1 + .../src/test/xoo/sample/SampleTest.xoo | 32 +++++++++++++ .../src/test/xoo/sample/SampleTest.xoo.test | 4 ++ .../xoo/sample/SampleTest.xoo.testcoverage | 2 + .../sonar-project.properties | 6 +++ .../src/main/xoo/sample/Sample.xoo | 12 +++++ .../src/test/xoo/sample/SampleTest.xoo | 32 +++++++++++++ .../test/xoo/sample/SampleTest.xoo.measures | 5 ++ .../src/test/xoo/sample/SampleTest.xoo.test | 4 ++ 35 files changed, 341 insertions(+) create mode 100644 it/it-projects/testing/README.txt create mode 100644 it/it-projects/testing/xoo-half-covered/pom.xml create mode 100644 it/it-projects/testing/xoo-half-covered/sonar-project.properties create mode 100644 it/it-projects/testing/xoo-half-covered/src/main/xoo/org/sonar/tests/halfcovered/Covered.xoo create mode 100644 it/it-projects/testing/xoo-half-covered/src/main/xoo/org/sonar/tests/halfcovered/Covered.xoo.coverage create mode 100644 it/it-projects/testing/xoo-half-covered/src/main/xoo/org/sonar/tests/halfcovered/UnCovered.xoo create mode 100644 it/it-projects/testing/xoo-half-covered/src/main/xoo/org/sonar/tests/halfcovered/UnCovered.xoo.coverage create mode 100644 it/it-projects/testing/xoo-sample-it-coverage/sonar-project.properties create mode 100644 it/it-projects/testing/xoo-sample-it-coverage/src/main/xoo/sample/Sample.xoo create mode 100644 it/it-projects/testing/xoo-sample-it-coverage/src/main/xoo/sample/Sample.xoo.itcoverage create mode 100644 it/it-projects/testing/xoo-sample-overall-coverage/sonar-project.properties create mode 100644 it/it-projects/testing/xoo-sample-overall-coverage/src/main/xoo/sample/Sample.xoo create mode 100644 it/it-projects/testing/xoo-sample-overall-coverage/src/main/xoo/sample/Sample.xoo.coverage create mode 100644 it/it-projects/testing/xoo-sample-overall-coverage/src/main/xoo/sample/Sample.xoo.itcoverage create mode 100644 it/it-projects/testing/xoo-sample-overall-coverage/src/main/xoo/sample/Sample.xoo.overallcoverage create mode 100644 it/it-projects/testing/xoo-sample-ut-coverage-no-condition/sonar-project.properties create mode 100644 it/it-projects/testing/xoo-sample-ut-coverage-no-condition/src/main/xoo/sample/Sample.xoo create mode 100644 it/it-projects/testing/xoo-sample-ut-coverage-no-condition/src/main/xoo/sample/Sample.xoo.coverage create mode 100644 it/it-projects/testing/xoo-sample-ut-coverage/sonar-project.properties create mode 100644 it/it-projects/testing/xoo-sample-ut-coverage/src/main/xoo/sample/Sample.xoo create mode 100644 it/it-projects/testing/xoo-sample-ut-coverage/src/main/xoo/sample/Sample.xoo.coverage create mode 100644 it/it-projects/testing/xoo-sample-with-coverage-per-test/sonar-project.properties create mode 100644 it/it-projects/testing/xoo-sample-with-coverage-per-test/src/main/xoo/sample/Sample.xoo create mode 100644 it/it-projects/testing/xoo-sample-with-coverage-per-test/src/main/xoo/sample/Sample2.xoo create mode 100644 it/it-projects/testing/xoo-sample-with-coverage-per-test/src/test/xoo/sample/Sample2Test.xoo create mode 100644 it/it-projects/testing/xoo-sample-with-coverage-per-test/src/test/xoo/sample/Sample2Test.xoo.test create mode 100644 it/it-projects/testing/xoo-sample-with-coverage-per-test/src/test/xoo/sample/Sample2Test.xoo.testcoverage create mode 100644 it/it-projects/testing/xoo-sample-with-coverage-per-test/src/test/xoo/sample/SampleTest.xoo create mode 100644 it/it-projects/testing/xoo-sample-with-coverage-per-test/src/test/xoo/sample/SampleTest.xoo.test create mode 100644 it/it-projects/testing/xoo-sample-with-coverage-per-test/src/test/xoo/sample/SampleTest.xoo.testcoverage create mode 100644 it/it-projects/testing/xoo-sample-with-tests-execution/sonar-project.properties create mode 100644 it/it-projects/testing/xoo-sample-with-tests-execution/src/main/xoo/sample/Sample.xoo create mode 100644 it/it-projects/testing/xoo-sample-with-tests-execution/src/test/xoo/sample/SampleTest.xoo create mode 100644 it/it-projects/testing/xoo-sample-with-tests-execution/src/test/xoo/sample/SampleTest.xoo.measures create mode 100644 it/it-projects/testing/xoo-sample-with-tests-execution/src/test/xoo/sample/SampleTest.xoo.test diff --git a/it/it-projects/testing/README.txt b/it/it-projects/testing/README.txt new file mode 100644 index 00000000000..c21c5ec3452 --- /dev/null +++ b/it/it-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/it/it-projects/testing/xoo-half-covered/pom.xml b/it/it-projects/testing/xoo-half-covered/pom.xml new file mode 100644 index 00000000000..25b230c7864 --- /dev/null +++ b/it/it-projects/testing/xoo-half-covered/pom.xml @@ -0,0 +1,47 @@ + + + 4.0.0 + com.sonarsource.it.exclusions + java-half-covered + 1.0-SNAPSHOT + Sonar :: Integration Tests :: Java Half Covered + + http://www.javahalfcovered.org + + + jira + http://jira.codehaus.org/browse/JAVAHALFCOVERED + + + + scm:git:git@github.com:SonarSource/javahalfcovered.git + scm:git:git@github.com:SonarSource/javahalfcovered.git + https://github.com/SonarSource/javahalfcovered + + + + true + + + + bamboo + http://bamboo.ci.codehaus.org/browse/JAVAHALFCOVERED + + + + + junit + junit + 4.8.2 + test + + + org.easytesting + fest-assert + 1.4 + test + + + + diff --git a/it/it-projects/testing/xoo-half-covered/sonar-project.properties b/it/it-projects/testing/xoo-half-covered/sonar-project.properties new file mode 100644 index 00000000000..ea64e84c3a0 --- /dev/null +++ b/it/it-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/it/it-projects/testing/xoo-half-covered/src/main/xoo/org/sonar/tests/halfcovered/Covered.xoo b/it/it-projects/testing/xoo-half-covered/src/main/xoo/org/sonar/tests/halfcovered/Covered.xoo new file mode 100644 index 00000000000..fc6abc4a88e --- /dev/null +++ b/it/it-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/it/it-projects/testing/xoo-half-covered/src/main/xoo/org/sonar/tests/halfcovered/Covered.xoo.coverage b/it/it-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/it/it-projects/testing/xoo-half-covered/src/main/xoo/org/sonar/tests/halfcovered/Covered.xoo.coverage @@ -0,0 +1 @@ +6:1 diff --git a/it/it-projects/testing/xoo-half-covered/src/main/xoo/org/sonar/tests/halfcovered/UnCovered.xoo b/it/it-projects/testing/xoo-half-covered/src/main/xoo/org/sonar/tests/halfcovered/UnCovered.xoo new file mode 100644 index 00000000000..25f413c7c5a --- /dev/null +++ b/it/it-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/it/it-projects/testing/xoo-half-covered/src/main/xoo/org/sonar/tests/halfcovered/UnCovered.xoo.coverage b/it/it-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/it/it-projects/testing/xoo-half-covered/src/main/xoo/org/sonar/tests/halfcovered/UnCovered.xoo.coverage @@ -0,0 +1 @@ +6:0 diff --git a/it/it-projects/testing/xoo-sample-it-coverage/sonar-project.properties b/it/it-projects/testing/xoo-sample-it-coverage/sonar-project.properties new file mode 100644 index 00000000000..18e56c6eb75 --- /dev/null +++ b/it/it-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/it/it-projects/testing/xoo-sample-it-coverage/src/main/xoo/sample/Sample.xoo b/it/it-projects/testing/xoo-sample-it-coverage/src/main/xoo/sample/Sample.xoo new file mode 100644 index 00000000000..41871e123a3 --- /dev/null +++ b/it/it-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/it/it-projects/testing/xoo-sample-it-coverage/src/main/xoo/sample/Sample.xoo.itcoverage b/it/it-projects/testing/xoo-sample-it-coverage/src/main/xoo/sample/Sample.xoo.itcoverage new file mode 100644 index 00000000000..36860af51ff --- /dev/null +++ b/it/it-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/it/it-projects/testing/xoo-sample-overall-coverage/sonar-project.properties b/it/it-projects/testing/xoo-sample-overall-coverage/sonar-project.properties new file mode 100644 index 00000000000..65fb9b6ed33 --- /dev/null +++ b/it/it-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/it/it-projects/testing/xoo-sample-overall-coverage/src/main/xoo/sample/Sample.xoo b/it/it-projects/testing/xoo-sample-overall-coverage/src/main/xoo/sample/Sample.xoo new file mode 100644 index 00000000000..1674d4578dc --- /dev/null +++ b/it/it-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/it/it-projects/testing/xoo-sample-overall-coverage/src/main/xoo/sample/Sample.xoo.coverage b/it/it-projects/testing/xoo-sample-overall-coverage/src/main/xoo/sample/Sample.xoo.coverage new file mode 100644 index 00000000000..1c244dbc697 --- /dev/null +++ b/it/it-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/it/it-projects/testing/xoo-sample-overall-coverage/src/main/xoo/sample/Sample.xoo.itcoverage b/it/it-projects/testing/xoo-sample-overall-coverage/src/main/xoo/sample/Sample.xoo.itcoverage new file mode 100644 index 00000000000..808d5b37e98 --- /dev/null +++ b/it/it-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/it/it-projects/testing/xoo-sample-overall-coverage/src/main/xoo/sample/Sample.xoo.overallcoverage b/it/it-projects/testing/xoo-sample-overall-coverage/src/main/xoo/sample/Sample.xoo.overallcoverage new file mode 100644 index 00000000000..82024035bff --- /dev/null +++ b/it/it-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/it/it-projects/testing/xoo-sample-ut-coverage-no-condition/sonar-project.properties b/it/it-projects/testing/xoo-sample-ut-coverage-no-condition/sonar-project.properties new file mode 100644 index 00000000000..a931c4c7093 --- /dev/null +++ b/it/it-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/it/it-projects/testing/xoo-sample-ut-coverage-no-condition/src/main/xoo/sample/Sample.xoo b/it/it-projects/testing/xoo-sample-ut-coverage-no-condition/src/main/xoo/sample/Sample.xoo new file mode 100644 index 00000000000..41871e123a3 --- /dev/null +++ b/it/it-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/it/it-projects/testing/xoo-sample-ut-coverage-no-condition/src/main/xoo/sample/Sample.xoo.coverage b/it/it-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/it/it-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/it/it-projects/testing/xoo-sample-ut-coverage/sonar-project.properties b/it/it-projects/testing/xoo-sample-ut-coverage/sonar-project.properties new file mode 100644 index 00000000000..a931c4c7093 --- /dev/null +++ b/it/it-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/it/it-projects/testing/xoo-sample-ut-coverage/src/main/xoo/sample/Sample.xoo b/it/it-projects/testing/xoo-sample-ut-coverage/src/main/xoo/sample/Sample.xoo new file mode 100644 index 00000000000..41871e123a3 --- /dev/null +++ b/it/it-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/it/it-projects/testing/xoo-sample-ut-coverage/src/main/xoo/sample/Sample.xoo.coverage b/it/it-projects/testing/xoo-sample-ut-coverage/src/main/xoo/sample/Sample.xoo.coverage new file mode 100644 index 00000000000..36860af51ff --- /dev/null +++ b/it/it-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/it/it-projects/testing/xoo-sample-with-coverage-per-test/sonar-project.properties b/it/it-projects/testing/xoo-sample-with-coverage-per-test/sonar-project.properties new file mode 100644 index 00000000000..0f2415d0320 --- /dev/null +++ b/it/it-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/it/it-projects/testing/xoo-sample-with-coverage-per-test/src/main/xoo/sample/Sample.xoo b/it/it-projects/testing/xoo-sample-with-coverage-per-test/src/main/xoo/sample/Sample.xoo new file mode 100644 index 00000000000..b1210973dd9 --- /dev/null +++ b/it/it-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/it/it-projects/testing/xoo-sample-with-coverage-per-test/src/main/xoo/sample/Sample2.xoo b/it/it-projects/testing/xoo-sample-with-coverage-per-test/src/main/xoo/sample/Sample2.xoo new file mode 100644 index 00000000000..ed097595590 --- /dev/null +++ b/it/it-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/it/it-projects/testing/xoo-sample-with-coverage-per-test/src/test/xoo/sample/Sample2Test.xoo b/it/it-projects/testing/xoo-sample-with-coverage-per-test/src/test/xoo/sample/Sample2Test.xoo new file mode 100644 index 00000000000..fe2368fefaa --- /dev/null +++ b/it/it-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/it/it-projects/testing/xoo-sample-with-coverage-per-test/src/test/xoo/sample/Sample2Test.xoo.test b/it/it-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/it/it-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/it/it-projects/testing/xoo-sample-with-coverage-per-test/src/test/xoo/sample/Sample2Test.xoo.testcoverage b/it/it-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/it/it-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/it/it-projects/testing/xoo-sample-with-coverage-per-test/src/test/xoo/sample/SampleTest.xoo b/it/it-projects/testing/xoo-sample-with-coverage-per-test/src/test/xoo/sample/SampleTest.xoo new file mode 100644 index 00000000000..fe2368fefaa --- /dev/null +++ b/it/it-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/it/it-projects/testing/xoo-sample-with-coverage-per-test/src/test/xoo/sample/SampleTest.xoo.test b/it/it-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/it/it-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/it/it-projects/testing/xoo-sample-with-coverage-per-test/src/test/xoo/sample/SampleTest.xoo.testcoverage b/it/it-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/it/it-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/it/it-projects/testing/xoo-sample-with-tests-execution/sonar-project.properties b/it/it-projects/testing/xoo-sample-with-tests-execution/sonar-project.properties new file mode 100644 index 00000000000..0f2415d0320 --- /dev/null +++ b/it/it-projects/testing/xoo-sample-with-tests-execution/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/it/it-projects/testing/xoo-sample-with-tests-execution/src/main/xoo/sample/Sample.xoo b/it/it-projects/testing/xoo-sample-with-tests-execution/src/main/xoo/sample/Sample.xoo new file mode 100644 index 00000000000..b1210973dd9 --- /dev/null +++ b/it/it-projects/testing/xoo-sample-with-tests-execution/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/it/it-projects/testing/xoo-sample-with-tests-execution/src/test/xoo/sample/SampleTest.xoo b/it/it-projects/testing/xoo-sample-with-tests-execution/src/test/xoo/sample/SampleTest.xoo new file mode 100644 index 00000000000..fe2368fefaa --- /dev/null +++ b/it/it-projects/testing/xoo-sample-with-tests-execution/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/it/it-projects/testing/xoo-sample-with-tests-execution/src/test/xoo/sample/SampleTest.xoo.measures b/it/it-projects/testing/xoo-sample-with-tests-execution/src/test/xoo/sample/SampleTest.xoo.measures new file mode 100644 index 00000000000..095af4b5e7b --- /dev/null +++ b/it/it-projects/testing/xoo-sample-with-tests-execution/src/test/xoo/sample/SampleTest.xoo.measures @@ -0,0 +1,5 @@ +tests:4 +test_execution_time:8 +skipped_tests:1 +test_errors:1 +test_failures:1 \ No newline at end of file diff --git a/it/it-projects/testing/xoo-sample-with-tests-execution/src/test/xoo/sample/SampleTest.xoo.test b/it/it-projects/testing/xoo-sample-with-tests-execution/src/test/xoo/sample/SampleTest.xoo.test new file mode 100644 index 00000000000..b0259693199 --- /dev/null +++ b/it/it-projects/testing/xoo-sample-with-tests-execution/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 -- 2.39.5