[GitHub] Tibor17 commented on a change in pull request #184: Donate current sources from junit-platform-surefire-provider

2018-06-07 Thread GitBox
Tibor17 commented on a change in pull request #184: Donate current sources from 
junit-platform-surefire-provider
URL: https://github.com/apache/maven-surefire/pull/184#discussion_r193794997
 
 

 ##
 File path: 
surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/RunListenerAdapter.java
 ##
 @@ -0,0 +1,272 @@
+package org.apache.maven.surefire.junitplatform;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import static org.apache.maven.surefire.report.SimpleReportEntry.ignored;
+import static org.junit.platform.engine.TestExecutionResult.Status.ABORTED;
+import static org.junit.platform.engine.TestExecutionResult.Status.FAILED;
+
+import java.util.Optional;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.apache.maven.surefire.report.PojoStackTraceWriter;
+import org.apache.maven.surefire.report.RunListener;
+import org.apache.maven.surefire.report.SimpleReportEntry;
+import org.apache.maven.surefire.report.StackTraceWriter;
+import org.junit.platform.engine.TestExecutionResult;
+import org.junit.platform.engine.TestSource;
+import org.junit.platform.engine.support.descriptor.ClassSource;
+import org.junit.platform.engine.support.descriptor.MethodSource;
+import org.junit.platform.launcher.TestExecutionListener;
+import org.junit.platform.launcher.TestIdentifier;
+import org.junit.platform.launcher.TestPlan;
+import org.junit.platform.launcher.listeners.LegacyReportingUtils;
+
+/**
+ * @since 2.22.0
+ */
+final class RunListenerAdapter
+implements TestExecutionListener
+{
+
+private final RunListener runListener;
+
+private TestPlan testPlan;
+
+private Set testSetNodes = ConcurrentHashMap.newKeySet();
+
+RunListenerAdapter( RunListener runListener )
+{
+this.runListener = runListener;
+}
+
+@Override
+public void testPlanExecutionStarted( TestPlan testPlan )
+{
+updateTestPlan( testPlan );
+}
+
+@Override
+public void testPlanExecutionFinished( TestPlan testPlan )
+{
+updateTestPlan( null );
+}
+
+@Override
+public void executionStarted( TestIdentifier testIdentifier )
+{
+if ( testIdentifier.isContainer()
+&& testIdentifier.getSource().filter( 
ClassSource.class::isInstance ).isPresent() )
+{
+startTestSetIfPossible( testIdentifier );
+}
+if ( testIdentifier.isTest() )
+{
+ensureTestSetStarted( testIdentifier );
+runListener.testStarting( createReportEntry( testIdentifier ) );
+}
+}
+
+@Override
+public void executionSkipped( TestIdentifier testIdentifier, String reason 
)
+{
+ensureTestSetStarted( testIdentifier );
+String source = getLegacyReportingClassName( testIdentifier );
+runListener.testSkipped( ignored( source, getLegacyReportingName( 
testIdentifier ), reason ) );
+completeTestSetIfNecessary( testIdentifier );
+}
+
+@Override
+public void executionFinished(
+TestIdentifier testIdentifier, TestExecutionResult 
testExecutionResult )
+{
+if ( testExecutionResult.getStatus() == ABORTED )
+{
+runListener.testAssumptionFailure( createReportEntry( 
testIdentifier, testExecutionResult ) );
+}
+else if ( testExecutionResult.getStatus() == FAILED )
+{
+reportFailedTest( testIdentifier, testExecutionResult );
+}
+else if ( testIdentifier.isTest() )
+{
+runListener.testSucceeded( createReportEntry( testIdentifier ) );
+}
+completeTestSetIfNecessary( testIdentifier );
+}
+
+private void updateTestPlan( TestPlan testPlan )
+{
+this.testPlan = testPlan;
+testSetNodes.clear();
+}
+
+private void ensureTestSetStarted( TestIdentifier testIdentifier )
+{
+if ( isTestSetStarted( testIdentifier ) )
+{
+return;
+}
+if ( testIdentifier.isTest() )
+{
+startTestSet( testPlan.getParent( testIdentifier ).orElse( 
testIdentifier ) );
+}
+els

[GitHub] Tibor17 commented on a change in pull request #184: Donate current sources from junit-platform-surefire-provider

2018-06-07 Thread GitBox
Tibor17 commented on a change in pull request #184: Donate current sources from 
junit-platform-surefire-provider
URL: https://github.com/apache/maven-surefire/pull/184#discussion_r193794997
 
 

 ##
 File path: 
surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/RunListenerAdapter.java
 ##
 @@ -0,0 +1,272 @@
+package org.apache.maven.surefire.junitplatform;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import static org.apache.maven.surefire.report.SimpleReportEntry.ignored;
+import static org.junit.platform.engine.TestExecutionResult.Status.ABORTED;
+import static org.junit.platform.engine.TestExecutionResult.Status.FAILED;
+
+import java.util.Optional;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.apache.maven.surefire.report.PojoStackTraceWriter;
+import org.apache.maven.surefire.report.RunListener;
+import org.apache.maven.surefire.report.SimpleReportEntry;
+import org.apache.maven.surefire.report.StackTraceWriter;
+import org.junit.platform.engine.TestExecutionResult;
+import org.junit.platform.engine.TestSource;
+import org.junit.platform.engine.support.descriptor.ClassSource;
+import org.junit.platform.engine.support.descriptor.MethodSource;
+import org.junit.platform.launcher.TestExecutionListener;
+import org.junit.platform.launcher.TestIdentifier;
+import org.junit.platform.launcher.TestPlan;
+import org.junit.platform.launcher.listeners.LegacyReportingUtils;
+
+/**
+ * @since 2.22.0
+ */
+final class RunListenerAdapter
+implements TestExecutionListener
+{
+
+private final RunListener runListener;
+
+private TestPlan testPlan;
+
+private Set testSetNodes = ConcurrentHashMap.newKeySet();
+
+RunListenerAdapter( RunListener runListener )
+{
+this.runListener = runListener;
+}
+
+@Override
+public void testPlanExecutionStarted( TestPlan testPlan )
+{
+updateTestPlan( testPlan );
+}
+
+@Override
+public void testPlanExecutionFinished( TestPlan testPlan )
+{
+updateTestPlan( null );
+}
+
+@Override
+public void executionStarted( TestIdentifier testIdentifier )
+{
+if ( testIdentifier.isContainer()
+&& testIdentifier.getSource().filter( 
ClassSource.class::isInstance ).isPresent() )
+{
+startTestSetIfPossible( testIdentifier );
+}
+if ( testIdentifier.isTest() )
+{
+ensureTestSetStarted( testIdentifier );
+runListener.testStarting( createReportEntry( testIdentifier ) );
+}
+}
+
+@Override
+public void executionSkipped( TestIdentifier testIdentifier, String reason 
)
+{
+ensureTestSetStarted( testIdentifier );
+String source = getLegacyReportingClassName( testIdentifier );
+runListener.testSkipped( ignored( source, getLegacyReportingName( 
testIdentifier ), reason ) );
+completeTestSetIfNecessary( testIdentifier );
+}
+
+@Override
+public void executionFinished(
+TestIdentifier testIdentifier, TestExecutionResult 
testExecutionResult )
+{
+if ( testExecutionResult.getStatus() == ABORTED )
+{
+runListener.testAssumptionFailure( createReportEntry( 
testIdentifier, testExecutionResult ) );
+}
+else if ( testExecutionResult.getStatus() == FAILED )
+{
+reportFailedTest( testIdentifier, testExecutionResult );
+}
+else if ( testIdentifier.isTest() )
+{
+runListener.testSucceeded( createReportEntry( testIdentifier ) );
+}
+completeTestSetIfNecessary( testIdentifier );
+}
+
+private void updateTestPlan( TestPlan testPlan )
+{
+this.testPlan = testPlan;
+testSetNodes.clear();
+}
+
+private void ensureTestSetStarted( TestIdentifier testIdentifier )
+{
+if ( isTestSetStarted( testIdentifier ) )
+{
+return;
+}
+if ( testIdentifier.isTest() )
+{
+startTestSet( testPlan.getParent( testIdentifier ).orElse( 
testIdentifier ) );
+}
+els

[GitHub] Tibor17 commented on a change in pull request #184: Donate current sources from junit-platform-surefire-provider

2018-05-29 Thread GitBox
Tibor17 commented on a change in pull request #184: Donate current sources from 
junit-platform-surefire-provider
URL: https://github.com/apache/maven-surefire/pull/184#discussion_r191559606
 
 

 ##
 File path: maven-surefire-plugin/src/site/apt/examples/junit-platform.apt.vm
 ##
 @@ -0,0 +1,206 @@
+ --
+ Using JUnit Platform
+ --
+ JUnit Lambda Team 
+ --
+ 2018-05-14
+ --
+ 
+ ~~ Licensed to the Apache Software Foundation (ASF) under one
+ ~~ or more contributor license agreements.  See the NOTICE file
+ ~~ distributed with this work for additional information
+ ~~ regarding copyright ownership.  The ASF licenses this file
+ ~~ to you under the Apache License, Version 2.0 (the
+ ~~ "License"); you may not use this file except in compliance
+ ~~ with the License.  You may obtain a copy of the License at
+ ~~
+ ~~   http://www.apache.org/licenses/LICENSE-2.0
+ ~~
+ ~~ Unless required by applicable law or agreed to in writing,
+ ~~ software distributed under the License is distributed on an
+ ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~~ KIND, either express or implied.  See the License for the
+ ~~ specific language governing permissions and limitations
+ ~~ under the License.
+
+ ~~ NOTE: For help with the syntax of this file, see:
+ ~~ http://maven.apache.org/doxia/references/apt-format.html 
+
+Using JUnit Platform
+
+* Configuring JUnit Platform
+
+  To get started with JUnit Platform, you need to add at least a single 
<<>> implementation
+  to your project. For example, if you want to write tests with Jupiter, you 
must add the
+  <<>> to the dependencies like:
+
++---+
+
+  [...]
+
+  org.junit.jupiter
+  junit-jupiter-engine
+  5.2.0
+  test
+
+  [...]
+
++---+
+
+  This will pull in all required dependencies. Among those dependencies is 
<<>> which contains
+  the classes and interfaces your test source requires to compile. 
<<>> is also resolved and
+  added.
+
+  This is the only step that is required to get started - you can now create 
tests in your test source directory
+  (e.g., <<>>).
+
+  If you want to write and execute JUnit 3 or 4 tests via the JUnit Platform 
add the Vintage Engine to your projects'
+  dependencies:
+
++---+
+
+  [...]
+
+  org.junit.vintage
+  junit-vintage-engine
+  5.2.0
+  test
+
+  [...]
+
++---+
+
+* Provider Selection
+
+   If nothing is configured, Surefire detects which JUnit version to use by 
the following algorithm:
+
++---+
+if the JUnit Platform Engine is present in the project
+use junit-platform
+if the JUnit version in the project >= 4.7 and the parallel attribute has ANY 
value
+use junit47 provider
+if JUnit >= 4.0 is present
+use junit4 provider
+else
+use junit3.8.1
++---+
+
+  When using this technique there is no check that the proper test-frameworks 
are present on your project's
+  classpath. Failing to add the proper test-frameworks will result in a build 
failure.
+
+* Running Tests in Parallel
+
+  From JUnit Platform does not support running tests in parallel.
+
+* Running a Single Test Class
+
+   The JUnit Platform Provider supports the <<>> JVM system property 
supported by
+   the Maven Surefire Plugin. For example, to run only test methods in the 
<<>> test class
+   you can execute <<>> from the command 
line.
+
+
+* Filtering by Test Class Names
+
+   The Maven Surefire Plugin will scan for test classes whose fully qualified 
names match
+   the following patterns.
+
+   * <<<**/Test*.java>>>
+
+   * <<<**/*Test.java>>>
+
+   * <<<**/*Tests.java>>>
+
+   * <<<**/*TestCase.java>>>
+
+Moreover, it will exclude all nested classes (including static member classes) 
by default.
+
+Note, however, that you can override this default behavior by configuring 
explicit
+`include` and `exclude` rules in your `pom.xml` file. For example, to keep 
Maven Surefire
+from excluding static member classes, you can override its exclude rules.
+
+Overriding exclude rules of Maven Surefire
+
++---+
+...
+
+
+...
+
+maven-surefire-plugin
+{surefire-version}
+
+
+
+
+
+...
+
+
+
+...
++---+
+
+
+* Filtering by Tags
+
+You can filter tests by tags or tag expressions using the following 
configuration properties.
+
+* to include <<>> or <<>>, use either <<>> 
or <<>>.
+
+* to exclude <<>> or <<>>, use either 
<<>> or <<>>.
+
++---+
+...
+
+
+...
+
+maven-surefire-plugin
+{surefire-version}
+
+
+acceptance | !feature-a
 
 Review comment:
   @sormuras 
   Let's go to the IRC chat.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For que

[GitHub] Tibor17 commented on a change in pull request #184: Donate current sources from junit-platform-surefire-provider

2018-05-29 Thread GitBox
Tibor17 commented on a change in pull request #184: Donate current sources from 
junit-platform-surefire-provider
URL: https://github.com/apache/maven-surefire/pull/184#discussion_r191524942
 
 

 ##
 File path: maven-surefire-plugin/src/site/apt/examples/junit-platform.apt.vm
 ##
 @@ -0,0 +1,206 @@
+ --
+ Using JUnit Platform
+ --
+ JUnit Lambda Team 
+ --
+ 2018-05-14
+ --
+ 
+ ~~ Licensed to the Apache Software Foundation (ASF) under one
+ ~~ or more contributor license agreements.  See the NOTICE file
+ ~~ distributed with this work for additional information
+ ~~ regarding copyright ownership.  The ASF licenses this file
+ ~~ to you under the Apache License, Version 2.0 (the
+ ~~ "License"); you may not use this file except in compliance
+ ~~ with the License.  You may obtain a copy of the License at
+ ~~
+ ~~   http://www.apache.org/licenses/LICENSE-2.0
+ ~~
+ ~~ Unless required by applicable law or agreed to in writing,
+ ~~ software distributed under the License is distributed on an
+ ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~~ KIND, either express or implied.  See the License for the
+ ~~ specific language governing permissions and limitations
+ ~~ under the License.
+
+ ~~ NOTE: For help with the syntax of this file, see:
+ ~~ http://maven.apache.org/doxia/references/apt-format.html 
+
+Using JUnit Platform
+
+* Configuring JUnit Platform
+
+  To get started with JUnit Platform, you need to add at least a single 
<<>> implementation
+  to your project. For example, if you want to write tests with Jupiter, you 
must add the
+  <<>> to the dependencies like:
+
++---+
+
+  [...]
+
+  org.junit.jupiter
+  junit-jupiter-engine
+  5.2.0
+  test
+
+  [...]
+
++---+
+
+  This will pull in all required dependencies. Among those dependencies is 
<<>> which contains
+  the classes and interfaces your test source requires to compile. 
<<>> is also resolved and
+  added.
+
+  This is the only step that is required to get started - you can now create 
tests in your test source directory
+  (e.g., <<>>).
+
+  If you want to write and execute JUnit 3 or 4 tests via the JUnit Platform 
add the Vintage Engine to your projects'
+  dependencies:
+
++---+
+
+  [...]
+
+  org.junit.vintage
+  junit-vintage-engine
+  5.2.0
+  test
+
+  [...]
+
++---+
+
+* Provider Selection
+
+   If nothing is configured, Surefire detects which JUnit version to use by 
the following algorithm:
+
++---+
+if the JUnit Platform Engine is present in the project
+use junit-platform
+if the JUnit version in the project >= 4.7 and the parallel attribute has ANY 
value
+use junit47 provider
+if JUnit >= 4.0 is present
+use junit4 provider
+else
+use junit3.8.1
++---+
+
+  When using this technique there is no check that the proper test-frameworks 
are present on your project's
+  classpath. Failing to add the proper test-frameworks will result in a build 
failure.
+
+* Running Tests in Parallel
+
+  From JUnit Platform does not support running tests in parallel.
+
+* Running a Single Test Class
+
+   The JUnit Platform Provider supports the <<>> JVM system property 
supported by
+   the Maven Surefire Plugin. For example, to run only test methods in the 
<<>> test class
+   you can execute <<>> from the command 
line.
+
+
+* Filtering by Test Class Names
+
+   The Maven Surefire Plugin will scan for test classes whose fully qualified 
names match
+   the following patterns.
+
+   * <<<**/Test*.java>>>
+
+   * <<<**/*Test.java>>>
+
+   * <<<**/*Tests.java>>>
+
+   * <<<**/*TestCase.java>>>
+
+Moreover, it will exclude all nested classes (including static member classes) 
by default.
+
+Note, however, that you can override this default behavior by configuring 
explicit
+`include` and `exclude` rules in your `pom.xml` file. For example, to keep 
Maven Surefire
+from excluding static member classes, you can override its exclude rules.
+
+Overriding exclude rules of Maven Surefire
+
++---+
+...
+
+
+...
+
+maven-surefire-plugin
+{surefire-version}
+
+
+
+
+
+...
+
+
+
+...
++---+
+
+
+* Filtering by Tags
+
+You can filter tests by tags or tag expressions using the following 
configuration properties.
+
+* to include <<>> or <<>>, use either <<>> 
or <<>>.
+
+* to exclude <<>> or <<>>, use either 
<<>> or <<>>.
+
++---+
+...
+
+
+...
+
+maven-surefire-plugin
+{surefire-version}
+
+
+acceptance | !feature-a
 
 Review comment:
   Yes we have to use `groups` and `excludegroups`. I think this can be solved 
fast. The `includeTags` looks like system property. The provider observes these 
properties in constructor.
   
   The only missing information is the mechanism how you can set `includeTags` 
via J

[GitHub] Tibor17 commented on a change in pull request #184: Donate current sources from junit-platform-surefire-provider

2018-05-28 Thread GitBox
Tibor17 commented on a change in pull request #184: Donate current sources from 
junit-platform-surefire-provider
URL: https://github.com/apache/maven-surefire/pull/184#discussion_r191281375
 
 

 ##
 File path: maven-surefire-plugin/src/site/apt/examples/junit-platform.apt.vm
 ##
 @@ -0,0 +1,206 @@
+ --
+ Using JUnit Platform
+ --
+ JUnit Lambda Team 
+ --
+ 2018-05-14
+ --
+ 
+ ~~ Licensed to the Apache Software Foundation (ASF) under one
+ ~~ or more contributor license agreements.  See the NOTICE file
+ ~~ distributed with this work for additional information
+ ~~ regarding copyright ownership.  The ASF licenses this file
+ ~~ to you under the Apache License, Version 2.0 (the
+ ~~ "License"); you may not use this file except in compliance
+ ~~ with the License.  You may obtain a copy of the License at
+ ~~
+ ~~   http://www.apache.org/licenses/LICENSE-2.0
+ ~~
+ ~~ Unless required by applicable law or agreed to in writing,
+ ~~ software distributed under the License is distributed on an
+ ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~~ KIND, either express or implied.  See the License for the
+ ~~ specific language governing permissions and limitations
+ ~~ under the License.
+
+ ~~ NOTE: For help with the syntax of this file, see:
+ ~~ http://maven.apache.org/doxia/references/apt-format.html 
+
+Using JUnit Platform
+
+* Configuring JUnit Platform
+
+  To get started with JUnit Platform, you need to add at least a single 
<<>> implementation
+  to your project. For example, if you want to write tests with Jupiter, you 
must add the
+  <<>> to the dependencies like:
+
++---+
+
+  [...]
+
+  org.junit.jupiter
+  junit-jupiter-engine
+  5.2.0
+  test
+
+  [...]
+
++---+
+
+  This will pull in all required dependencies. Among those dependencies is 
<<>> which contains
+  the classes and interfaces your test source requires to compile. 
<<>> is also resolved and
+  added.
+
+  This is the only step that is required to get started - you can now create 
tests in your test source directory
+  (e.g., <<>>).
+
+  If you want to write and execute JUnit 3 or 4 tests via the JUnit Platform 
add the Vintage Engine to your projects'
+  dependencies:
+
++---+
+
+  [...]
+
+  org.junit.vintage
+  junit-vintage-engine
+  5.2.0
+  test
+
+  [...]
+
++---+
+
+* Provider Selection
+
+   If nothing is configured, Surefire detects which JUnit version to use by 
the following algorithm:
+
++---+
+if the JUnit Platform Engine is present in the project
+use junit-platform
+if the JUnit version in the project >= 4.7 and the parallel attribute has ANY 
value
+use junit47 provider
+if JUnit >= 4.0 is present
+use junit4 provider
+else
+use junit3.8.1
++---+
+
+  When using this technique there is no check that the proper test-frameworks 
are present on your project's
+  classpath. Failing to add the proper test-frameworks will result in a build 
failure.
+
+* Running Tests in Parallel
+
+  From JUnit Platform does not support running tests in parallel.
+
+* Running a Single Test Class
+
+   The JUnit Platform Provider supports the <<>> JVM system property 
supported by
+   the Maven Surefire Plugin. For example, to run only test methods in the 
<<>> test class
+   you can execute <<>> from the command 
line.
+
+
+* Filtering by Test Class Names
+
+   The Maven Surefire Plugin will scan for test classes whose fully qualified 
names match
+   the following patterns.
+
+   * <<<**/Test*.java>>>
+
+   * <<<**/*Test.java>>>
+
+   * <<<**/*Tests.java>>>
+
+   * <<<**/*TestCase.java>>>
+
+Moreover, it will exclude all nested classes (including static member classes) 
by default.
+
+Note, however, that you can override this default behavior by configuring 
explicit
+`include` and `exclude` rules in your `pom.xml` file. For example, to keep 
Maven Surefire
+from excluding static member classes, you can override its exclude rules.
+
+Overriding exclude rules of Maven Surefire
+
++---+
+...
+
+
+...
+
+maven-surefire-plugin
+{surefire-version}
+
+
+
+
+
+...
+
+
+
+...
++---+
+
+
+* Filtering by Tags
+
+You can filter tests by tags or tag expressions using the following 
configuration properties.
+
+* to include <<>> or <<>>, use either <<>> 
or <<>>.
+
+* to exclude <<>> or <<>>, use either 
<<>> or <<>>.
+
++---+
+...
+
+
+...
+
+maven-surefire-plugin
+{surefire-version}
+
+
+acceptance | !feature-a
+integration, regression
+
+
+
+...
+
+
+
+
+...
++---+
+
+
+* Configuration Parameters
+
+   You can set JUnit Platform configuration parameters to influence test 
discovery and execution by
+   

[GitHub] Tibor17 commented on a change in pull request #184: Donate current sources from junit-platform-surefire-provider

2018-05-22 Thread GitBox
Tibor17 commented on a change in pull request #184: Donate current sources from 
junit-platform-surefire-provider
URL: https://github.com/apache/maven-surefire/pull/184#discussion_r190059956
 
 

 ##
 File path: maven-surefire-plugin/src/site/apt/featurematrix.apt.vm
 ##
 @@ -27,19 +27,19 @@ Feature Matrix
 Not all features are supported for all test frameworks, and the following 
table gives a brief overview
 of support status:
 
-*-+---+---++---+--+
-|| <>
||<>||<>||<>||<>||<> |
-*-++--++---+--+
-| groups/category support | N  |N |  Y 
|Y  |  N   |
-*-++--++---+--+
-| security manager support| Y  |N |  N 
|N  |  N   |
-*-++--++---+--+
-| runOrder support| Y  |Y |  Y 
|?  |  Y   |
-*-++--++---+--+
-| run >1 individual test method in a class| N  |Y |  Y 
|Y  |  N   |
-*-++--++---+--+
-| parallel support| N  |N |  Y 
|Y  |  N   |
-*-++--++---+--+
+*-+---+---++---+--++
+|| <>
||<>||<>||<>||<>||<> ||<> |
+*-++--++---+--++
+| groups/category/tags support| N  |N |  Y 
|Y  |  N   |  Y |
+*-++--++---+--++
+| security manager support| Y  |N |  N 
|N  |  N   |  N |
+*-++--++---+--++
+| runOrder support| Y  |Y |  Y 
|?  |  Y   |  N |
+*-++--++---+--++
+| run >1 individual test method in a class| N  |Y |  Y 
|Y  |  N   |  ? |
+*-++--++---+--++
+| parallel support| N  |N |  Y 
|Y  |  N   |  N |
 
 Review comment:
   @marcphilipp 
   It's better if we implement PC in surefire. We know what configuration we 
need. Is there something like `Scheduler` as it was in previous JUnit4? Is 
there a difference between runner and suite?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] Tibor17 commented on a change in pull request #184: Donate current sources from junit-platform-surefire-provider

2018-05-21 Thread GitBox
Tibor17 commented on a change in pull request #184: Donate current sources from 
junit-platform-surefire-provider
URL: https://github.com/apache/maven-surefire/pull/184#discussion_r189634127
 
 

 ##
 File path: maven-surefire-plugin/src/site/apt/examples/junit-platform.apt.vm
 ##
 @@ -0,0 +1,206 @@
+ --
+ Using JUnit Platform
+ --
+ JUnit Lambda Team 
+ --
+ 2018-05-14
+ --
+ 
+ ~~ Licensed to the Apache Software Foundation (ASF) under one
+ ~~ or more contributor license agreements.  See the NOTICE file
+ ~~ distributed with this work for additional information
+ ~~ regarding copyright ownership.  The ASF licenses this file
+ ~~ to you under the Apache License, Version 2.0 (the
+ ~~ "License"); you may not use this file except in compliance
+ ~~ with the License.  You may obtain a copy of the License at
+ ~~
+ ~~   http://www.apache.org/licenses/LICENSE-2.0
+ ~~
+ ~~ Unless required by applicable law or agreed to in writing,
+ ~~ software distributed under the License is distributed on an
+ ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~~ KIND, either express or implied.  See the License for the
+ ~~ specific language governing permissions and limitations
+ ~~ under the License.
+
+ ~~ NOTE: For help with the syntax of this file, see:
+ ~~ http://maven.apache.org/doxia/references/apt-format.html 
+
+Using JUnit Platform
+
+* Configuring JUnit Platform
+
+  To get started with JUnit Platform, you need to add at least a single 
<<>> implementation
+  to your project. For example, if you want to write tests with Jupiter, you 
must add the
+  <<>> to the dependencies like:
+
++---+
+
+  [...]
+
+  org.junit.jupiter
+  junit-jupiter-engine
+  5.2.0
+  test
+
+  [...]
+
++---+
+
+  This will pull in all required dependencies. Among those dependencies is 
<<>> which contains
+  the classes and interfaces your test source requires to compile. 
<<>> is also resolved and
+  added.
+
+  This is the only step that is required to get started - you can now create 
tests in your test source directory
+  (e.g., <<>>).
+
+  If you want to write and execute JUnit 3 or 4 tests via the JUnit Platform 
add the Vintage Engine to your projects'
+  dependencies:
+
++---+
+
+  [...]
+
+  org.junit.vintage
+  junit-vintage-engine
+  5.2.0
+  test
+
+  [...]
+
++---+
+
+* Provider Selection
+
+   If nothing is configured, Surefire detects which JUnit version to use by 
the following algorithm:
+
++---+
+if the JUnit Platform Engine is present in the project
+use junit-platform
+if the JUnit version in the project >= 4.7 and the parallel attribute has ANY 
value
+use junit47 provider
+if JUnit >= 4.0 is present
+use junit4 provider
+else
+use junit3.8.1
++---+
+
+  When using this technique there is no check that the proper test-frameworks 
are present on your project's
+  classpath. Failing to add the proper test-frameworks will result in a build 
failure.
+
+* Running Tests in Parallel
+
+  From JUnit Platform does not support running tests in parallel.
+
+* Running a Single Test Class
+
+   The JUnit Platform Provider supports the <<>> JVM system property 
supported by
+   the Maven Surefire Plugin. For example, to run only test methods in the 
<<>> test class
+   you can execute <<>> from the command 
line.
+
+
+* Filtering by Test Class Names
+
+   The Maven Surefire Plugin will scan for test classes whose fully qualified 
names match
+   the following patterns.
+
+   * <<<**/Test*.java>>>
+
+   * <<<**/*Test.java>>>
+
+   * <<<**/*Tests.java>>>
+
+   * <<<**/*TestCase.java>>>
+
+Moreover, it will exclude all nested classes (including static member classes) 
by default.
+
+Note, however, that you can override this default behavior by configuring 
explicit
+`include` and `exclude` rules in your `pom.xml` file. For example, to keep 
Maven Surefire
+from excluding static member classes, you can override its exclude rules.
+
+Overriding exclude rules of Maven Surefire
+
++---+
+...
+
+
+...
+
+maven-surefire-plugin
+{surefire-version}
+
+
+
+
+
+...
+
+
+
+...
++---+
+
+
+* Filtering by Tags
+
+You can filter tests by tags or tag expressions using the following 
configuration properties.
+
+* to include <<>> or <<>>, use either <<>> 
or <<>>.
+
+* to exclude <<>> or <<>>, use either 
<<>> or <<>>.
+
++---+
+...
+
+
+...
+
+maven-surefire-plugin
+{surefire-version}
+
+
+acceptance | !feature-a
+integration, regression
+
+
+
+...
+
+
+
+
+...
++---+
+
+
+* Configuration Parameters
+
+   You can set JUnit Platform configuration parameters to influence test 
discovery and execution by
+   

[GitHub] Tibor17 commented on a change in pull request #184: Donate current sources from junit-platform-surefire-provider

2018-05-21 Thread GitBox
Tibor17 commented on a change in pull request #184: Donate current sources from 
junit-platform-surefire-provider
URL: https://github.com/apache/maven-surefire/pull/184#discussion_r189519348
 
 

 ##
 File path: maven-surefire-plugin/src/site/apt/examples/junit-platform.apt.vm
 ##
 @@ -0,0 +1,206 @@
+ --
+ Using JUnit Platform
+ --
+ JUnit Lambda Team 
+ --
+ 2018-05-14
+ --
+ 
+ ~~ Licensed to the Apache Software Foundation (ASF) under one
+ ~~ or more contributor license agreements.  See the NOTICE file
+ ~~ distributed with this work for additional information
+ ~~ regarding copyright ownership.  The ASF licenses this file
+ ~~ to you under the Apache License, Version 2.0 (the
+ ~~ "License"); you may not use this file except in compliance
+ ~~ with the License.  You may obtain a copy of the License at
+ ~~
+ ~~   http://www.apache.org/licenses/LICENSE-2.0
+ ~~
+ ~~ Unless required by applicable law or agreed to in writing,
+ ~~ software distributed under the License is distributed on an
+ ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~~ KIND, either express or implied.  See the License for the
+ ~~ specific language governing permissions and limitations
+ ~~ under the License.
+
+ ~~ NOTE: For help with the syntax of this file, see:
+ ~~ http://maven.apache.org/doxia/references/apt-format.html 
+
+Using JUnit Platform
+
+* Configuring JUnit Platform
+
+  To get started with JUnit Platform, you need to add at least a single 
<<>> implementation
+  to your project. For example, if you want to write tests with Jupiter, you 
must add the
+  <<>> to the dependencies like:
+
++---+
+
+  [...]
+
+  org.junit.jupiter
+  junit-jupiter-engine
+  5.2.0
+  test
+
+  [...]
+
++---+
+
+  This will pull in all required dependencies. Among those dependencies is 
<<>> which contains
+  the classes and interfaces your test source requires to compile. 
<<>> is also resolved and
+  added.
+
+  This is the only step that is required to get started - you can now create 
tests in your test source directory
+  (e.g., <<>>).
+
+  If you want to write and execute JUnit 3 or 4 tests via the JUnit Platform 
add the Vintage Engine to your projects'
+  dependencies:
+
++---+
+
+  [...]
+
+  org.junit.vintage
+  junit-vintage-engine
+  5.2.0
+  test
+
+  [...]
+
++---+
+
+* Provider Selection
+
+   If nothing is configured, Surefire detects which JUnit version to use by 
the following algorithm:
+
++---+
+if the JUnit Platform Engine is present in the project
+use junit-platform
+if the JUnit version in the project >= 4.7 and the parallel attribute has ANY 
value
+use junit47 provider
+if JUnit >= 4.0 is present
+use junit4 provider
+else
+use junit3.8.1
++---+
+
+  When using this technique there is no check that the proper test-frameworks 
are present on your project's
+  classpath. Failing to add the proper test-frameworks will result in a build 
failure.
+
+* Running Tests in Parallel
+
+  From JUnit Platform does not support running tests in parallel.
+
+* Running a Single Test Class
+
+   The JUnit Platform Provider supports the <<>> JVM system property 
supported by
+   the Maven Surefire Plugin. For example, to run only test methods in the 
<<>> test class
+   you can execute <<>> from the command 
line.
+
+
+* Filtering by Test Class Names
+
+   The Maven Surefire Plugin will scan for test classes whose fully qualified 
names match
+   the following patterns.
+
+   * <<<**/Test*.java>>>
+
+   * <<<**/*Test.java>>>
+
+   * <<<**/*Tests.java>>>
+
+   * <<<**/*TestCase.java>>>
+
+Moreover, it will exclude all nested classes (including static member classes) 
by default.
+
+Note, however, that you can override this default behavior by configuring 
explicit
+`include` and `exclude` rules in your `pom.xml` file. For example, to keep 
Maven Surefire
+from excluding static member classes, you can override its exclude rules.
+
+Overriding exclude rules of Maven Surefire
+
++---+
+...
+
+
+...
+
+maven-surefire-plugin
+{surefire-version}
+
+
+
+
+
+...
+
+
+
+...
++---+
+
+
+* Filtering by Tags
+
+You can filter tests by tags or tag expressions using the following 
configuration properties.
+
+* to include <<>> or <<>>, use either <<>> 
or <<>>.
+
+* to exclude <<>> or <<>>, use either 
<<>> or <<>>.
+
++---+
+...
+
+
+...
+
+maven-surefire-plugin
+{surefire-version}
+
+
+acceptance | !feature-a
+integration, regression
+
+
+
+...
+
+
+
+
+...
++---+
+
+
+* Configuration Parameters
+
+   You can set JUnit Platform configuration parameters to influence test 
discovery and execution by
+   

[GitHub] Tibor17 commented on a change in pull request #184: Donate current sources from junit-platform-surefire-provider

2018-05-20 Thread GitBox
Tibor17 commented on a change in pull request #184: Donate current sources from 
junit-platform-surefire-provider
URL: https://github.com/apache/maven-surefire/pull/184#discussion_r189471302
 
 

 ##
 File path: maven-surefire-plugin/src/site/apt/examples/junit-platform.apt.vm
 ##
 @@ -0,0 +1,206 @@
+ --
+ Using JUnit Platform
+ --
+ JUnit Lambda Team 
+ --
+ 2018-05-14
+ --
+ 
+ ~~ Licensed to the Apache Software Foundation (ASF) under one
+ ~~ or more contributor license agreements.  See the NOTICE file
+ ~~ distributed with this work for additional information
+ ~~ regarding copyright ownership.  The ASF licenses this file
+ ~~ to you under the Apache License, Version 2.0 (the
+ ~~ "License"); you may not use this file except in compliance
+ ~~ with the License.  You may obtain a copy of the License at
+ ~~
+ ~~   http://www.apache.org/licenses/LICENSE-2.0
+ ~~
+ ~~ Unless required by applicable law or agreed to in writing,
+ ~~ software distributed under the License is distributed on an
+ ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~~ KIND, either express or implied.  See the License for the
+ ~~ specific language governing permissions and limitations
+ ~~ under the License.
+
+ ~~ NOTE: For help with the syntax of this file, see:
+ ~~ http://maven.apache.org/doxia/references/apt-format.html 
+
+Using JUnit Platform
+
+* Configuring JUnit Platform
+
+  To get started with JUnit Platform, you need to add at least a single 
<<>> implementation
+  to your project. For example, if you want to write tests with Jupiter, you 
must add the
+  <<>> to the dependencies like:
+
++---+
+
+  [...]
+
+  org.junit.jupiter
+  junit-jupiter-engine
+  5.2.0
+  test
+
+  [...]
+
++---+
+
+  This will pull in all required dependencies. Among those dependencies is 
<<>> which contains
+  the classes and interfaces your test source requires to compile. 
<<>> is also resolved and
+  added.
+
+  This is the only step that is required to get started - you can now create 
tests in your test source directory
+  (e.g., <<>>).
+
+  If you want to write and execute JUnit 3 or 4 tests via the JUnit Platform 
add the Vintage Engine to your projects'
+  dependencies:
+
++---+
+
+  [...]
+
+  org.junit.vintage
+  junit-vintage-engine
+  5.2.0
+  test
+
+  [...]
+
++---+
+
+* Provider Selection
+
+   If nothing is configured, Surefire detects which JUnit version to use by 
the following algorithm:
+
++---+
+if the JUnit Platform Engine is present in the project
+use junit-platform
+if the JUnit version in the project >= 4.7 and the parallel attribute has ANY 
value
+use junit47 provider
+if JUnit >= 4.0 is present
+use junit4 provider
+else
+use junit3.8.1
++---+
+
+  When using this technique there is no check that the proper test-frameworks 
are present on your project's
+  classpath. Failing to add the proper test-frameworks will result in a build 
failure.
+
+* Running Tests in Parallel
+
+  From JUnit Platform does not support running tests in parallel.
+
+* Running a Single Test Class
+
+   The JUnit Platform Provider supports the <<>> JVM system property 
supported by
+   the Maven Surefire Plugin. For example, to run only test methods in the 
<<>> test class
+   you can execute <<>> from the command 
line.
+
+
+* Filtering by Test Class Names
+
+   The Maven Surefire Plugin will scan for test classes whose fully qualified 
names match
+   the following patterns.
+
+   * <<<**/Test*.java>>>
+
+   * <<<**/*Test.java>>>
+
+   * <<<**/*Tests.java>>>
+
+   * <<<**/*TestCase.java>>>
+
+Moreover, it will exclude all nested classes (including static member classes) 
by default.
+
+Note, however, that you can override this default behavior by configuring 
explicit
+`include` and `exclude` rules in your `pom.xml` file. For example, to keep 
Maven Surefire
+from excluding static member classes, you can override its exclude rules.
+
+Overriding exclude rules of Maven Surefire
+
++---+
+...
+
+
+...
+
+maven-surefire-plugin
+{surefire-version}
+
+
+
+
+
+...
+
+
+
+...
++---+
+
+
+* Filtering by Tags
+
+You can filter tests by tags or tag expressions using the following 
configuration properties.
+
+* to include <<>> or <<>>, use either <<>> 
or <<>>.
+
+* to exclude <<>> or <<>>, use either 
<<>> or <<>>.
+
++---+
+...
+
+
+...
+
+maven-surefire-plugin
+{surefire-version}
+
+
+acceptance | !feature-a
+integration, regression
+
+
+
+...
+
+
+
+
+...
++---+
+
+
+* Configuration Parameters
+
+   You can set JUnit Platform configuration parameters to influence test 
discovery and execution by
+   

[GitHub] Tibor17 commented on a change in pull request #184: Donate current sources from junit-platform-surefire-provider

2018-05-16 Thread GitBox
Tibor17 commented on a change in pull request #184: Donate current sources from 
junit-platform-surefire-provider
URL: https://github.com/apache/maven-surefire/pull/184#discussion_r188747241
 
 

 ##
 File path: maven-surefire-plugin/src/site/apt/index.apt.vm
 ##
 @@ -141,6 +141,8 @@ mvn verify
 
   * {{{./examples/testng.html}Using TestNG}}
 
+  * {{{./examples/junit-platform.html}Using JUnit Platform}}
 
 Review comment:
   Can we just mention `Using JUnit5 Platform` - added `5`.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] Tibor17 commented on a change in pull request #184: Donate current sources from junit-platform-surefire-provider

2018-05-16 Thread GitBox
Tibor17 commented on a change in pull request #184: Donate current sources from 
junit-platform-surefire-provider
URL: https://github.com/apache/maven-surefire/pull/184#discussion_r188745820
 
 

 ##
 File path: maven-surefire-plugin/src/site/apt/examples/junit-platform.apt.vm
 ##
 @@ -0,0 +1,206 @@
+ --
+ Using JUnit Platform
+ --
+ JUnit Lambda Team 
+ --
+ 2018-05-14
+ --
+ 
+ ~~ Licensed to the Apache Software Foundation (ASF) under one
+ ~~ or more contributor license agreements.  See the NOTICE file
+ ~~ distributed with this work for additional information
+ ~~ regarding copyright ownership.  The ASF licenses this file
+ ~~ to you under the Apache License, Version 2.0 (the
+ ~~ "License"); you may not use this file except in compliance
+ ~~ with the License.  You may obtain a copy of the License at
+ ~~
+ ~~   http://www.apache.org/licenses/LICENSE-2.0
+ ~~
+ ~~ Unless required by applicable law or agreed to in writing,
+ ~~ software distributed under the License is distributed on an
+ ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~~ KIND, either express or implied.  See the License for the
+ ~~ specific language governing permissions and limitations
+ ~~ under the License.
+
+ ~~ NOTE: For help with the syntax of this file, see:
+ ~~ http://maven.apache.org/doxia/references/apt-format.html 
+
+Using JUnit Platform
+
+* Configuring JUnit Platform
+
+  To get started with JUnit Platform, you need to add at least a single 
<<>> implementation
+  to your project. For example, if you want to write tests with Jupiter, you 
must add the
+  <<>> to the dependencies like:
+
++---+
+
+  [...]
+
+  org.junit.jupiter
+  junit-jupiter-engine
+  5.2.0
+  test
+
+  [...]
+
++---+
+
+  This will pull in all required dependencies. Among those dependencies is 
<<>> which contains
+  the classes and interfaces your test source requires to compile. 
<<>> is also resolved and
+  added.
+
+  This is the only step that is required to get started - you can now create 
tests in your test source directory
+  (e.g., <<>>).
+
+  If you want to write and execute JUnit 3 or 4 tests via the JUnit Platform 
add the Vintage Engine to your projects'
+  dependencies:
+
++---+
+
+  [...]
+
+  org.junit.vintage
+  junit-vintage-engine
+  5.2.0
+  test
+
+  [...]
+
++---+
+
+* Provider Selection
+
+   If nothing is configured, Surefire detects which JUnit version to use by 
the following algorithm:
+
++---+
+if the JUnit Platform Engine is present in the project
+use junit-platform
+if the JUnit version in the project >= 4.7 and the parallel attribute has ANY 
value
 
 Review comment:
   Pls emphase with `<<>>` but the attribute should be rewritten to 
`configuration parameter`.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] Tibor17 commented on a change in pull request #184: Donate current sources from junit-platform-surefire-provider

2018-05-16 Thread GitBox
Tibor17 commented on a change in pull request #184: Donate current sources from 
junit-platform-surefire-provider
URL: https://github.com/apache/maven-surefire/pull/184#discussion_r188745820
 
 

 ##
 File path: maven-surefire-plugin/src/site/apt/examples/junit-platform.apt.vm
 ##
 @@ -0,0 +1,206 @@
+ --
+ Using JUnit Platform
+ --
+ JUnit Lambda Team 
+ --
+ 2018-05-14
+ --
+ 
+ ~~ Licensed to the Apache Software Foundation (ASF) under one
+ ~~ or more contributor license agreements.  See the NOTICE file
+ ~~ distributed with this work for additional information
+ ~~ regarding copyright ownership.  The ASF licenses this file
+ ~~ to you under the Apache License, Version 2.0 (the
+ ~~ "License"); you may not use this file except in compliance
+ ~~ with the License.  You may obtain a copy of the License at
+ ~~
+ ~~   http://www.apache.org/licenses/LICENSE-2.0
+ ~~
+ ~~ Unless required by applicable law or agreed to in writing,
+ ~~ software distributed under the License is distributed on an
+ ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~~ KIND, either express or implied.  See the License for the
+ ~~ specific language governing permissions and limitations
+ ~~ under the License.
+
+ ~~ NOTE: For help with the syntax of this file, see:
+ ~~ http://maven.apache.org/doxia/references/apt-format.html 
+
+Using JUnit Platform
+
+* Configuring JUnit Platform
+
+  To get started with JUnit Platform, you need to add at least a single 
<<>> implementation
+  to your project. For example, if you want to write tests with Jupiter, you 
must add the
+  <<>> to the dependencies like:
+
++---+
+
+  [...]
+
+  org.junit.jupiter
+  junit-jupiter-engine
+  5.2.0
+  test
+
+  [...]
+
++---+
+
+  This will pull in all required dependencies. Among those dependencies is 
<<>> which contains
+  the classes and interfaces your test source requires to compile. 
<<>> is also resolved and
+  added.
+
+  This is the only step that is required to get started - you can now create 
tests in your test source directory
+  (e.g., <<>>).
+
+  If you want to write and execute JUnit 3 or 4 tests via the JUnit Platform 
add the Vintage Engine to your projects'
+  dependencies:
+
++---+
+
+  [...]
+
+  org.junit.vintage
+  junit-vintage-engine
+  5.2.0
+  test
+
+  [...]
+
++---+
+
+* Provider Selection
+
+   If nothing is configured, Surefire detects which JUnit version to use by 
the following algorithm:
+
++---+
+if the JUnit Platform Engine is present in the project
+use junit-platform
+if the JUnit version in the project >= 4.7 and the parallel attribute has ANY 
value
 
 Review comment:
   Pls emphase with `<<>` but the attribute should be rewritten to 
`configuration parameter`.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] Tibor17 commented on a change in pull request #184: Donate current sources from junit-platform-surefire-provider

2018-05-16 Thread GitBox
Tibor17 commented on a change in pull request #184: Donate current sources from 
junit-platform-surefire-provider
URL: https://github.com/apache/maven-surefire/pull/184#discussion_r188744366
 
 

 ##
 File path: maven-surefire-plugin/src/site/apt/examples/junit-platform.apt.vm
 ##
 @@ -0,0 +1,206 @@
+ --
+ Using JUnit Platform
+ --
+ JUnit Lambda Team 
+ --
+ 2018-05-14
+ --
+ 
+ ~~ Licensed to the Apache Software Foundation (ASF) under one
+ ~~ or more contributor license agreements.  See the NOTICE file
+ ~~ distributed with this work for additional information
+ ~~ regarding copyright ownership.  The ASF licenses this file
+ ~~ to you under the Apache License, Version 2.0 (the
+ ~~ "License"); you may not use this file except in compliance
+ ~~ with the License.  You may obtain a copy of the License at
+ ~~
+ ~~   http://www.apache.org/licenses/LICENSE-2.0
+ ~~
+ ~~ Unless required by applicable law or agreed to in writing,
+ ~~ software distributed under the License is distributed on an
+ ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~~ KIND, either express or implied.  See the License for the
+ ~~ specific language governing permissions and limitations
+ ~~ under the License.
+
+ ~~ NOTE: For help with the syntax of this file, see:
+ ~~ http://maven.apache.org/doxia/references/apt-format.html 
+
+Using JUnit Platform
+
+* Configuring JUnit Platform
+
+  To get started with JUnit Platform, you need to add at least a single 
<<>> implementation
+  to your project. For example, if you want to write tests with Jupiter, you 
must add the
+  <<>> to the dependencies like:
+
++---+
+
+  [...]
+
+  org.junit.jupiter
+  junit-jupiter-engine
+  5.2.0
+  test
+
+  [...]
+
++---+
+
+  This will pull in all required dependencies. Among those dependencies is 
<<>> which contains
+  the classes and interfaces your test source requires to compile. 
<<>> is also resolved and
+  added.
+
+  This is the only step that is required to get started - you can now create 
tests in your test source directory
+  (e.g., <<>>).
+
+  If you want to write and execute JUnit 3 or 4 tests via the JUnit Platform 
add the Vintage Engine to your projects'
+  dependencies:
+
++---+
+
+  [...]
+
+  org.junit.vintage
+  junit-vintage-engine
+  5.2.0
+  test
+
+  [...]
+
++---+
+
+* Provider Selection
+
+   If nothing is configured, Surefire detects which JUnit version to use by 
the following algorithm:
+
++---+
+if the JUnit Platform Engine is present in the project
+use junit-platform
+if the JUnit version in the project >= 4.7 and the parallel attribute has ANY 
value
+use junit47 provider
+if JUnit >= 4.0 is present
+use junit4 provider
+else
+use junit3.8.1
++---+
+
+  When using this technique there is no check that the proper test-frameworks 
are present on your project's
+  classpath. Failing to add the proper test-frameworks will result in a build 
failure.
+
+* Running Tests in Parallel
+
+  From JUnit Platform does not support running tests in parallel.
+
+* Running a Single Test Class
+
+   The JUnit Platform Provider supports the <<>> JVM system property 
supported by
+   the Maven Surefire Plugin. For example, to run only test methods in the 
<<>> test class
+   you can execute <<>> from the command 
line.
+
+
+* Filtering by Test Class Names
+
+   The Maven Surefire Plugin will scan for test classes whose fully qualified 
names match
+   the following patterns.
+
+   * <<<**/Test*.java>>>
+
+   * <<<**/*Test.java>>>
+
+   * <<<**/*Tests.java>>>
+
+   * <<<**/*TestCase.java>>>
+
+Moreover, it will exclude all nested classes (including static member classes) 
by default.
+
+Note, however, that you can override this default behavior by configuring 
explicit
+`include` and `exclude` rules in your `pom.xml` file. For example, to keep 
Maven Surefire
+from excluding static member classes, you can override its exclude rules.
+
+Overriding exclude rules of Maven Surefire
+
++---+
+...
+
+
+...
+
+maven-surefire-plugin
+{surefire-version}
+
+
+
+
+
+...
+
+
+
+...
++---+
+
+
+* Filtering by Tags
+
+You can filter tests by tags or tag expressions using the following 
configuration properties.
+
+* to include <<>> or <<>>, use either <<>> 
or <<>>.
+
+* to exclude <<>> or <<>>, use either 
<<>> or <<>>.
+
++---+
+...
+
+
+...
+
+maven-surefire-plugin
+{surefire-version}
+
+
+acceptance | !feature-a
 
 Review comment:
   Why we did not utilize Surefire's parameters `groups` and `excludedGroups`?
   The same is in TestNG.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub 

[GitHub] Tibor17 commented on a change in pull request #184: Donate current sources from junit-platform-surefire-provider

2018-05-16 Thread GitBox
Tibor17 commented on a change in pull request #184: Donate current sources from 
junit-platform-surefire-provider
URL: https://github.com/apache/maven-surefire/pull/184#discussion_r188743849
 
 

 ##
 File path: maven-surefire-plugin/src/site/apt/examples/junit-platform.apt.vm
 ##
 @@ -0,0 +1,206 @@
+ --
+ Using JUnit Platform
+ --
+ JUnit Lambda Team 
+ --
+ 2018-05-14
+ --
+ 
+ ~~ Licensed to the Apache Software Foundation (ASF) under one
+ ~~ or more contributor license agreements.  See the NOTICE file
+ ~~ distributed with this work for additional information
+ ~~ regarding copyright ownership.  The ASF licenses this file
+ ~~ to you under the Apache License, Version 2.0 (the
+ ~~ "License"); you may not use this file except in compliance
+ ~~ with the License.  You may obtain a copy of the License at
+ ~~
+ ~~   http://www.apache.org/licenses/LICENSE-2.0
+ ~~
+ ~~ Unless required by applicable law or agreed to in writing,
+ ~~ software distributed under the License is distributed on an
+ ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~~ KIND, either express or implied.  See the License for the
+ ~~ specific language governing permissions and limitations
+ ~~ under the License.
+
+ ~~ NOTE: For help with the syntax of this file, see:
+ ~~ http://maven.apache.org/doxia/references/apt-format.html 
+
+Using JUnit Platform
+
+* Configuring JUnit Platform
+
+  To get started with JUnit Platform, you need to add at least a single 
<<>> implementation
+  to your project. For example, if you want to write tests with Jupiter, you 
must add the
+  <<>> to the dependencies like:
+
++---+
+
+  [...]
+
+  org.junit.jupiter
+  junit-jupiter-engine
+  5.2.0
+  test
+
+  [...]
+
++---+
+
+  This will pull in all required dependencies. Among those dependencies is 
<<>> which contains
+  the classes and interfaces your test source requires to compile. 
<<>> is also resolved and
+  added.
+
+  This is the only step that is required to get started - you can now create 
tests in your test source directory
+  (e.g., <<>>).
+
+  If you want to write and execute JUnit 3 or 4 tests via the JUnit Platform 
add the Vintage Engine to your projects'
+  dependencies:
+
++---+
+
+  [...]
+
+  org.junit.vintage
+  junit-vintage-engine
+  5.2.0
+  test
+
+  [...]
+
++---+
+
+* Provider Selection
+
+   If nothing is configured, Surefire detects which JUnit version to use by 
the following algorithm:
+
++---+
+if the JUnit Platform Engine is present in the project
+use junit-platform
+if the JUnit version in the project >= 4.7 and the parallel attribute has ANY 
value
+use junit47 provider
+if JUnit >= 4.0 is present
+use junit4 provider
+else
+use junit3.8.1
++---+
+
+  When using this technique there is no check that the proper test-frameworks 
are present on your project's
+  classpath. Failing to add the proper test-frameworks will result in a build 
failure.
+
+* Running Tests in Parallel
+
+  From JUnit Platform does not support running tests in parallel.
+
+* Running a Single Test Class
+
+   The JUnit Platform Provider supports the <<>> JVM system property 
supported by
+   the Maven Surefire Plugin. For example, to run only test methods in the 
<<>> test class
+   you can execute <<>> from the command 
line.
+
+
+* Filtering by Test Class Names
+
+   The Maven Surefire Plugin will scan for test classes whose fully qualified 
names match
+   the following patterns.
+
+   * <<<**/Test*.java>>>
+
+   * <<<**/*Test.java>>>
+
+   * <<<**/*Tests.java>>>
+
+   * <<<**/*TestCase.java>>>
+
+Moreover, it will exclude all nested classes (including static member classes) 
by default.
+
+Note, however, that you can override this default behavior by configuring 
explicit
+`include` and `exclude` rules in your `pom.xml` file. For example, to keep 
Maven Surefire
+from excluding static member classes, you can override its exclude rules.
+
+Overriding exclude rules of Maven Surefire
+
++---+
+...
+
+
+...
+
+maven-surefire-plugin
+{surefire-version}
+
+
+
+
+
+...
+
+
+
+...
++---+
+
+
+* Filtering by Tags
+
+You can filter tests by tags or tag expressions using the following 
configuration properties.
+
+* to include <<>> or <<>>, use either <<>> 
or <<>>.
+
+* to exclude <<>> or <<>>, use either 
<<>> or <<>>.
+
++---+
+...
+
+
+...
+
+maven-surefire-plugin
+{surefire-version}
+
+
+acceptance | !feature-a
+integration, regression
+
+
+
+...
+
+
+
+
+...
++---+
+
+
+* Configuration Parameters
+
+   You can set JUnit Platform configuration parameters to influence test 
discovery and execution by
+   

[GitHub] Tibor17 commented on a change in pull request #184: Donate current sources from junit-platform-surefire-provider

2018-05-16 Thread GitBox
Tibor17 commented on a change in pull request #184: Donate current sources from 
junit-platform-surefire-provider
URL: https://github.com/apache/maven-surefire/pull/184#discussion_r188742697
 
 

 ##
 File path: maven-surefire-plugin/src/site/site.xml
 ##
 @@ -40,6 +40,7 @@
 
   
   
+  
 
 Review comment:
   Perhaps here as well.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] Tibor17 commented on a change in pull request #184: Donate current sources from junit-platform-surefire-provider

2018-05-16 Thread GitBox
Tibor17 commented on a change in pull request #184: Donate current sources from 
junit-platform-surefire-provider
URL: https://github.com/apache/maven-surefire/pull/184#discussion_r188742534
 
 

 ##
 File path: maven-surefire-plugin/src/site/apt/index.apt.vm
 ##
 @@ -141,6 +141,8 @@ mvn verify
 
   * {{{./examples/testng.html}Using TestNG}}
 
+  * {{{./examples/junit-platform.html}Using JUnit Platform}}
 
 Review comment:
   Not sure if users would realize this is JUnit5 provider.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] Tibor17 commented on a change in pull request #184: Donate current sources from junit-platform-surefire-provider

2018-05-16 Thread GitBox
Tibor17 commented on a change in pull request #184: Donate current sources from 
junit-platform-surefire-provider
URL: https://github.com/apache/maven-surefire/pull/184#discussion_r188742279
 
 

 ##
 File path: maven-surefire-plugin/src/site/apt/featurematrix.apt.vm
 ##
 @@ -27,19 +27,19 @@ Feature Matrix
 Not all features are supported for all test frameworks, and the following 
table gives a brief overview
 of support status:
 
-*-+---+---++---+--+
-|| <>
||<>||<>||<>||<>||<> |
-*-++--++---+--+
-| groups/category support | N  |N |  Y 
|Y  |  N   |
-*-++--++---+--+
-| security manager support| Y  |N |  N 
|N  |  N   |
-*-++--++---+--+
-| runOrder support| Y  |Y |  Y 
|?  |  Y   |
-*-++--++---+--+
-| run >1 individual test method in a class| N  |Y |  Y 
|Y  |  N   |
-*-++--++---+--+
-| parallel support| N  |N |  Y 
|Y  |  N   |
-*-++--++---+--+
+*-+---+---++---+--++
+|| <>
||<>||<>||<>||<>||<> ||<> |
+*-++--++---+--++
+| groups/category/tags support| N  |N |  Y 
|Y  |  N   |  Y |
+*-++--++---+--++
+| security manager support| Y  |N |  N 
|N  |  N   |  N |
+*-++--++---+--++
+| runOrder support| Y  |Y |  Y 
|?  |  Y   |  N |
+*-++--++---+--++
+| run >1 individual test method in a class| N  |Y |  Y 
|Y  |  N   |  ? |
+*-++--++---+--++
+| parallel support| N  |N |  Y 
|Y  |  N   |  N |
 
 Review comment:
   In parallel support we have `N`. Can we utilize ParallelComputer from JUnit4?
   The PC covers parallelism. I would like to utilize it because it has a 
complex possibilities with configuration and I do not want to develop it again.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] Tibor17 commented on a change in pull request #184: Donate current sources from junit-platform-surefire-provider

2018-05-16 Thread GitBox
Tibor17 commented on a change in pull request #184: Donate current sources from 
junit-platform-surefire-provider
URL: https://github.com/apache/maven-surefire/pull/184#discussion_r188741696
 
 

 ##
 File path: maven-surefire-plugin/src/site/apt/featurematrix.apt.vm
 ##
 @@ -27,19 +27,19 @@ Feature Matrix
 Not all features are supported for all test frameworks, and the following 
table gives a brief overview
 of support status:
 
-*-+---+---++---+--+
-|| <>
||<>||<>||<>||<>||<> |
-*-++--++---+--+
-| groups/category support | N  |N |  Y 
|Y  |  N   |
-*-++--++---+--+
-| security manager support| Y  |N |  N 
|N  |  N   |
-*-++--++---+--+
-| runOrder support| Y  |Y |  Y 
|?  |  Y   |
-*-++--++---+--+
-| run >1 individual test method in a class| N  |Y |  Y 
|Y  |  N   |
-*-++--++---+--+
-| parallel support| N  |N |  Y 
|Y  |  N   |
-*-++--++---+--+
+*-+---+---++---+--++
+|| <>
||<>||<>||<>||<>||<> ||<> |
+*-++--++---+--++
+| groups/category/tags support| N  |N |  Y 
|Y  |  N   |  Y |
+*-++--++---+--++
+| security manager support| Y  |N |  N 
|N  |  N   |  N |
+*-++--++---+--++
+| runOrder support| Y  |Y |  Y 
|?  |  Y   |  N |
+*-++--++---+--++
+| run >1 individual test method in a class| N  |Y |  Y 
|Y  |  N   |  ? |
 
 Review comment:
   Here we have question mark for `run >1 individual test method in a class`. I 
think this should be `Y`. WDYT?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] Tibor17 commented on a change in pull request #184: Donate current sources from junit-platform-surefire-provider

2018-05-05 Thread GitBox
Tibor17 commented on a change in pull request #184: Donate current sources from 
junit-platform-surefire-provider
URL: https://github.com/apache/maven-surefire/pull/184#discussion_r186267506
 
 

 ##
 File path: 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
 ##
 @@ -1022,9 +1029,9 @@ private void createDependencyResolver()
 Artifact junitDepArtifact = getJunitDepArtifact();
 return new ProviderList( new DynamicProviderInfo( null ),
   new TestNgProviderInfo( getTestNgArtifact() ),
+  new JUnitPlatformProviderInfo( 
getJunitPlatformArtifact() ),
 
 Review comment:
   AFAIK the found providers are run separately in a loop, see 
`AbstractSurefireMojo.java` in method `execute`.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] Tibor17 commented on a change in pull request #184: Donate current sources from junit-platform-surefire-provider

2018-05-05 Thread GitBox
Tibor17 commented on a change in pull request #184: Donate current sources from 
junit-platform-surefire-provider
URL: https://github.com/apache/maven-surefire/pull/184#discussion_r186258276
 
 

 ##
 File path: 
surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/JUnitPlatformProvider.java
 ##
 @@ -58,6 +58,11 @@
 import org.junit.platform.launcher.core.LauncherDiscoveryRequestBuilder;
 import org.junit.platform.launcher.core.LauncherFactory;
 
+/**
+ * JUnitPlatformProvider.
+ *
+ * @since 1.0
 
 Review comment:
   Pls put here another version. We can make release of the provider in e.g. 
2.22.0.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] Tibor17 commented on a change in pull request #184: Donate current sources from junit-platform-surefire-provider

2018-05-05 Thread GitBox
Tibor17 commented on a change in pull request #184: Donate current sources from 
junit-platform-surefire-provider
URL: https://github.com/apache/maven-surefire/pull/184#discussion_r186258477
 
 

 ##
 File path: 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
 ##
 @@ -1022,9 +1029,9 @@ private void createDependencyResolver()
 Artifact junitDepArtifact = getJunitDepArtifact();
 return new ProviderList( new DynamicProviderInfo( null ),
   new TestNgProviderInfo( getTestNgArtifact() ),
+  new JUnitPlatformProviderInfo( 
getJunitPlatformArtifact() ),
 
 Review comment:
   Here the order of provider-info was changed. Does it mean something 
important for functionality?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] Tibor17 commented on a change in pull request #184: Donate current sources from junit-platform-surefire-provider

2018-05-05 Thread GitBox
Tibor17 commented on a change in pull request #184: Donate current sources from 
junit-platform-surefire-provider
URL: https://github.com/apache/maven-surefire/pull/184#discussion_r186258276
 
 

 ##
 File path: 
surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/JUnitPlatformProvider.java
 ##
 @@ -58,6 +58,11 @@
 import org.junit.platform.launcher.core.LauncherDiscoveryRequestBuilder;
 import org.junit.platform.launcher.core.LauncherFactory;
 
+/**
+ * JUnitPlatformProvider.
+ *
+ * @since 1.0
 
 Review comment:
   Pls put here another version. We can make release the provider in e.g. 
2.22.0.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services