4

When I ran clean test or clean test -DsuiteFile=src/main/resources/testng/SmokeTestSuite.xml in eclipse following is the output.No test running but Build is success. I have been struggling for this for quite a few weeks.Would be great if someone can explain me what was the issue and a proper solution.

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building eselenium-ellis-tests 0.0.1
[INFO] ------------------------------------------------------------------------
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Downloading: https://devops-tools.pearson.com/nexus-master/content/repositories/releases/com/pearson/eselenium-pageobjects-ellis/1.0.1-SNAPSHOT/maven-metadata.xml
Downloading: https://devops-tools.pearson.com/nexus-deps/content/groups/all-deps/com/pearson/eselenium-pageobjects-ellis/1.0.1-SNAPSHOT/maven-metadata.xml
Downloaded: https://devops-tools.pearson.com/nexus-deps/content/groups/all-deps/com/pearson/eselenium-pageobjects-ellis/1.0.1-SNAPSHOT/maven-metadata.xml (788 B at 0.2 KB/sec)
Downloading: https://devops-tools.pearson.com/nexus-deps/content/groups/all-deps/com/pearson/eselenium-pageobjects-ellis/1.0.1-SNAPSHOT/maven-metadata.xml
Downloading: https://devops-tools.pearson.com/nexus-master/content/repositories/releases/com/pearson/eselenium-pageobjects-ellis/1.0.1-SNAPSHOT/maven-metadata.xml
Downloaded: https://devops-tools.pearson.com/nexus-deps/content/groups/all-deps/com/pearson/eselenium-pageobjects-ellis/1.0.1-SNAPSHOT/maven-metadata.xml (788 B at 0.2 KB/sec)
[INFO] 
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ eselenium-ellis-tests ---
[INFO] Deleting C:\ATDD\workspace\galaxy-tests\target
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ eselenium-ellis-tests ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 8 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ eselenium-ellis-tests ---
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 19 source files to C:\ATDD\workspace\galaxy-tests\target\classes
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ eselenium-ellis-tests ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ eselenium-ellis-tests ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ eselenium-ellis-tests ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.003s
[INFO] Finished at: Sun Oct 19 09:48:48 IST 2014
[INFO] Final Memory: 20M/153M
[INFO] ------------------------------------------------------------------------

AND My POM file looks like below.

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.pearson</groupId>
    <artifactId>eselenium-ellis-tests</artifactId>
    <version>0.0.1</version>
    <properties>
        <suiteXmlFile>${suiteFile}</suiteXmlFile>
    </properties>
    <dependencies>
        <dependency>
            <groupId>com.pearson</groupId>
            <artifactId>eselenium.framework</artifactId>
            <version>1.2.0</version>
        </dependency>
        <dependency>
            <groupId>com.pearson</groupId>
            <artifactId>eselenium-pageobjects-ellis</artifactId>
            <version>1.0.1-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.16</version>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>6.5.2</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.12.4</version>
                <configuration>
                    <testFailureIgnore>true</testFailureIgnore>
                    <suiteXmlFiles>
                        <suiteXmlFile>${suiteFile}</suiteXmlFile>
                        <!--<suiteXmlFile>src/main/resources/testng/SmokeTestSuite.xml</suiteXmlFile> -->
                    </suiteXmlFiles>
                    <reportsDirectory>test-output</reportsDirectory>
                    <reportsDirectory>test-output\archive\${timestamp}</reportsDirectory>
                    <systemProperties>
                        <property>
                            <name>browser.NAME</name>
                            <value>${browser.NAME}</value>
                        </property>
                    </systemProperties>
                </configuration>
            </plugin>
        </plugins>
    </build>

1 Answers1

-1

Your issue is actually not being able to provide pom.xml value from command prompt. Its a duplicate of

Passing command line arguments from Maven as properties in pom.xml

you will find solution there. You need to double quote your parameter.

Community
  • 1
  • 1
DolphinJava
  • 2,682
  • 1
  • 23
  • 37