From 9ddf6fda885838c8a3a12b5ade1cf9a32df95763 Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Wed, 19 Oct 2016 16:50:16 +0200 Subject: SONAR-8310, SONAR-8314 Make generic coverage plugin a core feature --- .../sonar-project.properties | 6 ++++ .../src/main/xoo/sample/Sample.xoo | 12 ++++++++ .../src/test/xoo/sample/SampleTest.xoo | 32 ++++++++++++++++++++++ .../src/test/xoo/sample/SampleTest.xoo.test | 4 +++ .../sonar-project.properties | 6 ++++ .../src/main/xoo/sample/Sample.xoo | 12 ++++++++ .../src/test/xoo/sample/SampleTest.xoo | 32 ++++++++++++++++++++++ .../src/test/xoo/sample/SampleTest.xoo.measures | 5 ++++ .../sonar-project.properties | 6 ---- .../src/main/xoo/sample/Sample.xoo | 12 -------- .../src/test/xoo/sample/SampleTest.xoo | 32 ---------------------- .../src/test/xoo/sample/SampleTest.xoo.measures | 5 ---- .../src/test/xoo/sample/SampleTest.xoo.test | 4 --- 13 files changed, 109 insertions(+), 59 deletions(-) create mode 100644 it/it-projects/testing/xoo-sample-with-tests-execution-details/sonar-project.properties create mode 100644 it/it-projects/testing/xoo-sample-with-tests-execution-details/src/main/xoo/sample/Sample.xoo create mode 100644 it/it-projects/testing/xoo-sample-with-tests-execution-details/src/test/xoo/sample/SampleTest.xoo create mode 100644 it/it-projects/testing/xoo-sample-with-tests-execution-details/src/test/xoo/sample/SampleTest.xoo.test create mode 100644 it/it-projects/testing/xoo-sample-with-tests-execution-measures/sonar-project.properties create mode 100644 it/it-projects/testing/xoo-sample-with-tests-execution-measures/src/main/xoo/sample/Sample.xoo create mode 100644 it/it-projects/testing/xoo-sample-with-tests-execution-measures/src/test/xoo/sample/SampleTest.xoo create mode 100644 it/it-projects/testing/xoo-sample-with-tests-execution-measures/src/test/xoo/sample/SampleTest.xoo.measures delete mode 100644 it/it-projects/testing/xoo-sample-with-tests-execution/sonar-project.properties delete mode 100644 it/it-projects/testing/xoo-sample-with-tests-execution/src/main/xoo/sample/Sample.xoo delete mode 100644 it/it-projects/testing/xoo-sample-with-tests-execution/src/test/xoo/sample/SampleTest.xoo delete mode 100644 it/it-projects/testing/xoo-sample-with-tests-execution/src/test/xoo/sample/SampleTest.xoo.measures delete mode 100644 it/it-projects/testing/xoo-sample-with-tests-execution/src/test/xoo/sample/SampleTest.xoo.test (limited to 'it/it-projects') diff --git a/it/it-projects/testing/xoo-sample-with-tests-execution-details/sonar-project.properties b/it/it-projects/testing/xoo-sample-with-tests-execution-details/sonar-project.properties new file mode 100644 index 00000000000..0f2415d0320 --- /dev/null +++ b/it/it-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/it/it-projects/testing/xoo-sample-with-tests-execution-details/src/main/xoo/sample/Sample.xoo b/it/it-projects/testing/xoo-sample-with-tests-execution-details/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-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/it/it-projects/testing/xoo-sample-with-tests-execution-details/src/test/xoo/sample/SampleTest.xoo b/it/it-projects/testing/xoo-sample-with-tests-execution-details/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-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/it/it-projects/testing/xoo-sample-with-tests-execution-details/src/test/xoo/sample/SampleTest.xoo.test b/it/it-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/it/it-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/it/it-projects/testing/xoo-sample-with-tests-execution-measures/sonar-project.properties b/it/it-projects/testing/xoo-sample-with-tests-execution-measures/sonar-project.properties new file mode 100644 index 00000000000..0f2415d0320 --- /dev/null +++ b/it/it-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/it/it-projects/testing/xoo-sample-with-tests-execution-measures/src/main/xoo/sample/Sample.xoo b/it/it-projects/testing/xoo-sample-with-tests-execution-measures/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-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/it/it-projects/testing/xoo-sample-with-tests-execution-measures/src/test/xoo/sample/SampleTest.xoo b/it/it-projects/testing/xoo-sample-with-tests-execution-measures/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-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/it/it-projects/testing/xoo-sample-with-tests-execution-measures/src/test/xoo/sample/SampleTest.xoo.measures b/it/it-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/it/it-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 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 deleted file mode 100644 index 0f2415d0320..00000000000 --- a/it/it-projects/testing/xoo-sample-with-tests-execution/sonar-project.properties +++ /dev/null @@ -1,6 +0,0 @@ -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 deleted file mode 100644 index b1210973dd9..00000000000 --- a/it/it-projects/testing/xoo-sample-with-tests-execution/src/main/xoo/sample/Sample.xoo +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index fe2368fefaa..00000000000 --- a/it/it-projects/testing/xoo-sample-with-tests-execution/src/test/xoo/sample/SampleTest.xoo +++ /dev/null @@ -1,32 +0,0 @@ -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 deleted file mode 100644 index 095af4b5e7b..00000000000 --- a/it/it-projects/testing/xoo-sample-with-tests-execution/src/test/xoo/sample/SampleTest.xoo.measures +++ /dev/null @@ -1,5 +0,0 @@ -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 deleted file mode 100644 index b0259693199..00000000000 --- a/it/it-projects/testing/xoo-sample-with-tests-execution/src/test/xoo/sample/SampleTest.xoo.test +++ /dev/null @@ -1,4 +0,0 @@ -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 -- cgit v1.2.3