[
https://jira.codehaus.org/browse/SUREFIRE-745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=354433#comment-354433
]
Jianfeng Sun edited comment on SUREFIRE-745 at 10/15/14 6:03 PM:
-----------------------------------------------------------------
@Tibor
Thanks for the response.
By using 2.18-SNAPSHOT for both surefire and failsafe,
1) if I use -Dit.test=class1#method1,class2#method2
I got this:
main:
[INFO] Executed tasks
[INFO]
[INFO] --- maven-surefire-plugin:2.18-SNAPSHOT:test (default-test) @ selenium
---
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ selenium ---
[INFO]
[INFO] --- maven-failsafe-plugin:2.18-SNAPSHOT:integration-test (run-test) @
selenium ---
[INFO] Failsafe report directory: C:\Automation testing
tool\workspace\fox.emf.selenium.Oct5\target\surefire-reports\10-15-2014-03-55-PM
[INFO] Using configured provider
org.apache.maven.surefire.junitcore.JUnitCoreProvider
[INFO] parallel='none', perCoreThreadCount=true, threadCount=0,
useUnlimitedThreads=false, threadCountSuites=0, threadCountClasses=0,
threadCountMethods=0, parallelOptimized=true
-------------------------------------------------------
T E S T S
-------------------------------------------------------
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e.
build is platform dependent!
[INFO]
[INFO] --- properties-maven-plugin:1.0-alpha-2:read-project-properties
(default) @ selenium ---
[INFO]
[INFO] --- maven-postman-plugin:0.1.6:send-mail (send_email) @ selenium ---
2) if I use -Dtest=class1#method1,class2#method2
I got Failed tests:
class1.method1:21 ? NullPointer
class1.method2:16 ? NullPointer
class2.method1:21 ? NullPointer
class2.method2:17 ? NullPointer
the java code for NullPointer is
"System.getProperty("user.dir")+"/testflow/Spot_TC07_Export Functionality.xls""
I guess the NullPorinter is from system property user dir.
I'm sure it will work when we only run one test at a time.
was (Author: wind19862006):
@Tibor
Thanks for the response.
By using 2.18-SNAPSHOT for both surefire and failsafe,
1) if I use -Dit.test=class1#method1,class2#method2
I got this:
main:
[INFO] Executed tasks
[INFO]
[INFO] --- maven-surefire-plugin:2.18-SNAPSHOT:test (default-test) @ selenium
---
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ selenium ---
[INFO]
[INFO] --- maven-failsafe-plugin:2.18-SNAPSHOT:integration-test (run-test) @
selenium ---
[INFO] Failsafe report directory: C:\Automation testing
tool\workspace\fox.emf.selenium.Oct5\target\surefire-reports\10-15-2014-03-55-PM
[INFO] Using configured provider
org.apache.maven.surefire.junitcore.JUnitCoreProvider
[INFO] parallel='none', perCoreThreadCount=true, threadCount=0,
useUnlimitedThreads=false, threadCountSuites=0, threadCountClasses=0,
threadCountMethods=0, parallelOptimized=true
-------------------------------------------------------
T E S T S
-------------------------------------------------------
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e.
build is platform dependent!
[INFO]
[INFO] --- properties-maven-plugin:1.0-alpha-2:read-project-properties
(default) @ selenium ---
[INFO]
[INFO] --- maven-postman-plugin:0.1.6:send-mail (send_email) @ selenium ---
2) if I use -Dtest=class1#method1,class2#method2
I got Failed tests:
class1.method1:21 ? NullPointer
class1.method2:16 ? NullPointer
class1.method1:21 ? NullPointer
class1.method2:17 ? NullPointer
the java code for NullPointer is
"System.getProperty("user.dir")+"/testflow/Spot_TC07_Export Functionality.xls""
I guess the NullPorinter is from system property user dir.
I'm sure it will work when we only run one test at a time.
> -Dtest supports multiple test classes but not multiple test methods
> -------------------------------------------------------------------
>
> Key: SUREFIRE-745
> URL: https://jira.codehaus.org/browse/SUREFIRE-745
> Project: Maven Surefire
> Issue Type: Improvement
> Environment: Apache Maven 3.0.2 (r1056850; 2011-01-08 19:58:10-0500)
> Java version: 1.6.0_24, vendor: Apple Inc.
> Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
> Default locale: en_CA, platform encoding: MacRoman
> OS name: "mac os x", version: "10.6.7", arch: "x86_64", family: "mac"
> Reporter: reid holmes
> Assignee: Olivier Lamy
> Priority: Minor
> Fix For: 2.12.1
>
> Attachments: multipleMethods.patch, multipleMethods-v2.patch,
> multipleMethods-v3.patch, multipleMethods-v4.patch, SUREFIRE-745.patch,
> SUREFIRE-745-v2.patch
>
>
> The -Dtest parameter is very handy for running a specific test class or test
> method. It also supports running multiple test classes. Unfortunately, it
> does not permit specifying running multiple test methods. It would be great
> if this were possible.
> The examples below are from the Apache Commons project.
> WORKS: Run multiple test classes:
> mvn test -Dtest=ImmutablePairTest,StopWatchTest
> WORKS: Run a specific test method:
> mvn test -Dtest=ImmutablePairTest#testBasic
> DOES NOT WORK:
> mvn test
> -Dtest=StopWatchTest#testStopWatchSimple,StopWatchTest#testStopWatchSimpleGet
> mvn test -Dtest=ImmutablePairTest#testBasic,StopWatchTest#testLang315
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)