• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Home
  • Programming Languages
    • Java Tutorials
    • Python Tutorials
    • JavaScript Tutorials
  • Automation Tools and Different Tools
    • Web Automation
      • Selenium with Java
        • Selenium Basic
        • Selenium Advance
        • Selenium Realtime
        • Framework
        • Selenium Interview
        • Selenium Videos
        • Selenium with Docker
      • Selenium with Python
      • WebdriverIO
        • Selenium Webdriver C# Tutorial
      • Cypress
      • Playwright
    • TestNG
    • Cucumber
    • Mobile Automation
      • Appium
    • API Testing
      • Postman
      • Rest Assured
      • SOAPUI
    • testRigor
    • Katalon
    • TestProject
    • Serenity BDD
    • Gradle- Build Tool
    • RPA-UiPath
    • Protractor
    • Windows Automation
  • Automation For Manual Testers
  • Services
  • Online Training
  • Contact us
  • About me
  • Follow us
    • Linkedin
    • Facebook Group
    • Facebook Page
    • Instagram

Automation

Selenium WebDriver tutorial Step by Step

You are here: Home / Build Tool / Selenium maven build for Continuous Integration-CI

Selenium maven build for Continuous Integration-CI

April 7, 2015 by Mukesh Otwani 46 Comments

In previous post we have discussed Maven Integration with Selenium through Eclipse , Today we will discuss integrate selenium maven build and how to create maven build for continuous integration . Check Jenkins section to know more about CI.

To create maven build we should have maven installed in our machine  so let us start setting up maven.

 

Note- You can check Youtube video for the which we are going to cover now

 

Youtube video for the same

 

Steps for selenium maven build creation

 

Module 1- Install Maven in local machine.

1- Navigate to Maven official site and download stable version of Maven.

Maven Download- https://maven.apache.org/download.cgi

selenium maven build
integrate selenium with maven

2 –  Unzip the download file and Check unzip folder – in our case folder name- apache-maven-3.3.1

 

selenium maven build
integrate selenium with maven

3-  This is maven home directory and now we have to set path for the same

selenium maven build
integrate selenium with maven

4-     To set path variable- Right Click on my computer and Select property.

 

selenium maven build
integrate selenium with maven

5-   Now we need to set path variable also for System variable.

Note- Please do not touch other variable, Go to last point use ; and then enter path till bin folder.

 

selenium maven build

6-  Click on save and apply.  You can verify now that Maven is installed or not.

Open command prompt and type

mvn -version

7-  If Maven is installed properly then you will get Maven version and Java version on Console.

selenium maven build

 

Module 2- Create a maven project and create at least one test case.

Please refer below post to create Maven project  for Selenium in Eclipse.

https://learn-automation.com/maven-integration-with-selenium/

In my case I have created 1 sample test case and created testng.xml file to execute test case.

Click on POM.xml file and make the below changes

 

POM.XML for Selenium maven build

 

<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.automation.maven</groupId>
<artifactId>com.automation.maven</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>Create Maven build</name>
<description>Create Maven build</description>

<!-- Change from here -->

<packaging>jar</packaging>

<properties>
<suiteXmlFile>src/main/resources/testng.xml</suiteXmlFile>

</properties>

<dependencies>

<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.1.1</version>
</dependency>
<!-- Adding Selenium dependency -->
<dependency>
 <groupId>org.seleniumhq.selenium</groupId>
 <artifactId>selenium-java</artifactId>
 <version>2.47.1</version>
</dependency> 

</dependencies>

<build>

<plugins>
 
<plugin>

<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<compilerVersion>1.8</compilerVersion>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
 
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.17</version>
<configuration>
 
<suiteXmlFiles>
<suiteXmlFile>${suiteXmlFile}</suiteXmlFile>
</suiteXmlFiles>
 
</configuration>
</plugin>
 
</plugins>
 
</build>


</project>

 

My project structure after all the changes.

create POMxml file

 

 

 

 

 

 

 

 

Once all set you can execute pom.xml. Right click on pom.xml and run as maven test.

integrate selenium with maven

Now its time to enjoy because our build is success. Check below screenshot

integrate selenium with maven

Reports- You can check default reports which is created and you can see another surfire reports as well.

You can also create XSLT Reports with Maven.

integrate selenium with maven

We can also configure Maven with Jenkins and we can run our build periodically.

Hope you like above post. Please comment below if you are getting any issue.

Please share with your friends if you found this article is useful.

Keep visiting. Have a nice day 🙂

Like Facebook Page for more updates-Learn-Automation facebook page

Join Selenium Group for discussion and queries- Learn-Automation group

 

Filed Under: Build Tool Tagged With: Maven build, POM.xml file

Reader Interactions

Comments

  1. Joseph Mondal says

    October 1, 2019 at 8:59 AM

    Mukesh you are awesome. You are the most expert for the automaton. How can you remember all these. it is astounded. I am proud of you, God bless you……….

    Reply
    • Mukesh Otwani says

      October 1, 2019 at 10:03 AM

      Thanks buddy…:)

      People like you are inspiration behind all my efforts…Hope to keep all of you with latest informations…

      Reply
  2. chiranjeevi says

    February 14, 2017 at 8:22 AM

    Hello good morning mukesh…thanks for your selenium knowledge sharing…really great work

    I integrate maven with eclipse and running fine..but unable to show surefire

    Reply
    • Mukesh Otwani says

      February 16, 2017 at 11:37 AM

      Hi Chiranjeevi,

      I would suggest you to use http://learn-automation.com/advance-selenium-reporting-with-screenshots-2/

      Reply
  3. prashant says

    February 11, 2017 at 12:33 PM

    Hi mukesh
    I am getting this Error

    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:testCompile (default-testCompile) on project LearnMevenAutomation: Compilation failure
    [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
    [ERROR] -> [Help 1]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

    Reply
    • Mukesh Otwani says

      February 11, 2017 at 1:59 PM

      Hi Prashant,

      Please go to your Execution environment and check whether it is pointing to jdk or jre in local machine

      Reply
      • prashant says

        February 12, 2017 at 8:13 PM

        Thanks,
        Its resolved nw
        actually the problem was some path related
        Thanks u for your help and ur helpful blogs.

        Reply
        • Mukesh Otwani says

          February 13, 2017 at 9:29 PM

          Hi Prashant,

          I am glad to see your reply.

          Reply
  4. Aadesh Raj says

    January 19, 2017 at 4:22 PM

    Can we run two different TestNG.xml in one POM.xml ?

    Reply
    • Mukesh Otwani says

      January 24, 2017 at 5:03 PM

      Yes you can run n number of xml from pom.xml

      Reply
  5. sheshukumar says

    November 3, 2016 at 10:26 AM

    Hi Mukesh,

    I am getting below error in POM file in Jankin. Plugins showing an error in my xml file.

    org.apache.maven.plugins
    maven-compiler-plugin
    3.0

    1.8
    1.6
    1.6

    org.apache.maven.plugins
    maven-surefire-plugin
    2.17

    ${suiteXmlFile}

    Reply
    • Mukesh Otwani says

      November 4, 2016 at 1:49 AM

      Hey Sheshu,

      You can pass testng.xml path in ${suiteXmlFile}

      Reply
  6. Amit says

    October 17, 2016 at 8:52 PM

    Hello Mukesh,

    I Appreciate your work 🙂

    This is nice information

    I have one problem

    I have done as per your instructions but I am getting error

    MAVEN_HOME is set to an invalid directory

    Reply
    • Mukesh Otwani says

      October 18, 2016 at 2:26 PM

      can you send screenshot ?

      Reply
  7. Priyabrata Samal says

    October 14, 2016 at 2:28 PM

    localhost:8080 unable to connect.

    Reply
    • Mukesh Otwani says

      October 14, 2016 at 6:22 PM

      Kindly run on another port

      Reply
  8. Ashwini says

    October 8, 2016 at 10:23 AM

    Hi Mukesh,
    Am facing issue when i import existing maven project . Getting error in POM.xml. Am using Neon 4.6.1 version. Below is the error messgae .

    CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:3.1: ArtifactResolutionException: Failure to transfer org.apache.maven.plugins:maven-compiler-plugin:pom:3.1 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:3.1 from/to central (https://repo.maven.apache.org/maven2): connect timed out

    and maven dependency problem , maven configuration problem, maven problem.

    Please help me what needs to be done.

    Reply
    • Mukesh Otwani says

      October 10, 2016 at 12:36 AM

      Ashwini, it seems you are running behind proxy.

      Reply
  9. Raghavendra says

    October 7, 2016 at 11:09 PM

    Hi Mukesh,

    when i run the TestNg.xml file i am getting the below error “parameter is required by @configuration on method but not has been marked optional or defined error in selenium”, i tried every suggestions given in google, but still none of them are working, can you please help me in this regard.

    Now, with i am writing a class and using the browser value

    public class Test1{
    @Test
    @parameters(“Browser”)
    public void setUp(String browser){
    syso();
    }

    Now if i run the program, i get the above error, please help me ASAP.

    Reply
    • Mukesh Otwani says

      October 10, 2016 at 12:35 AM

      Make sure parameter is passed correctly from xml and you have to execute all programs from xml file only.

      Reply
    • Raghavendra says

      October 14, 2016 at 10:40 AM

      Hi Mukesh,

      i am passing the parameters in the TestNG.xml file correctly, but still i am getting the error

      i am not able to paste the TestNG.xml file here, as i am getting error while trying to paste it.

      Thanks
      Raghavendra.B.K.

      Reply
      • Mukesh Otwani says

        October 14, 2016 at 6:23 PM

        please check xml syntax.

        Reply
  10. sudhr says

    August 23, 2016 at 6:56 PM

    IN maven.From where the updated jar files are downloaded. Do we have to do manually intervention or it updated automatically without manual interventio

    Reply
    • Mukesh Otwani says

      August 27, 2016 at 11:12 PM

      Its downloaded from central maven repository

      Reply
  11. satish says

    July 16, 2016 at 7:46 PM

    Hi Mukesh

    Please solve my error, First i got the error
    [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

    Then i changed the path from JRE to JDK . Then i am getting the below error

    [INFO] Scanning for projects…
    [INFO]
    [INFO] ————————————————————————
    [INFO] Building com.automation.hybrid 0.0.1-SNAPSHOT
    [INFO] ————————————————————————
    [INFO]
    [INFO] — maven-resources-plugin:2.6:resources (default-resources) @ com.automation.hybrid —
    [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
    [INFO] Copying 0 resource
    [INFO]
    [INFO] — maven-compiler-plugin:3.0:compile (default-compile) @ com.automation.hybrid —
    [INFO] Nothing to compile – all classes are up to date
    [INFO]
    [INFO] — maven-resources-plugin:2.6:testResources (default-testResources) @ com.automation.hybrid —
    [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
    [INFO] Copying 0 resource
    [INFO]
    [INFO] — maven-compiler-plugin:3.0:testCompile (default-testCompile) @ com.automation.hybrid —
    [INFO] Changes detected – recompiling the module!
    [WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
    [INFO] Compiling 10 source files to F:\TESTING\PROJECTS\HybridFramework\target\test-classes
    [INFO] ————————————————————-
    [ERROR] COMPILATION ERROR :
    [INFO] ————————————————————-
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPage.java:[10,39] package com.relevantcodes.extentreports does not exist
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPage.java:[11,39] package com.relevantcodes.extentreports does not exist
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPage.java:[12,39] package com.relevantcodes.extentreports does not exist
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPage.java:[21,9] cannot find symbol
    symbol: class ExtentReports
    location: class testcases.VerifyLoginPage
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPage.java:[22,9] cannot find symbol
    symbol: class ExtentTest
    location: class testcases.VerifyLoginPage
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPageWithReports.java:[11,39] package com.relevantcodes.extentreports does not exist
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPageWithReports.java:[12,39] package com.relevantcodes.extentreports does not exist
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPageWithReports.java:[13,39] package com.relevantcodes.extentreports does not exist
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPageWithReports.java:[23,9] cannot find symbol
    symbol: class ExtentReports
    location: class testcases.VerifyLoginPageWithReports
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPageWithReports.java:[24,9] cannot find symbol
    symbol: class ExtentTest
    location: class testcases.VerifyLoginPageWithReports
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPage.java:[27,30] cannot find symbol
    symbol: class ExtentReports
    location: class testcases.VerifyLoginPage
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPage.java:[31,28] cannot find symbol
    symbol: variable LogStatus
    location: class testcases.VerifyLoginPage
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPage.java:[41,28] cannot find symbol
    symbol: variable LogStatus
    location: class testcases.VerifyLoginPage
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPage.java:[43,28] cannot find symbol
    symbol: variable LogStatus
    location: class testcases.VerifyLoginPage
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPage.java:[47,28] cannot find symbol
    symbol: variable LogStatus
    location: class testcases.VerifyLoginPage
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPage.java:[49,28] cannot find symbol
    symbol: variable LogStatus
    location: class testcases.VerifyLoginPage
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPageWithReports.java:[29,30] cannot find symbol
    symbol: class ExtentReports
    location: class testcases.VerifyLoginPageWithReports
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPageWithReports.java:[33,28] cannot find symbol
    symbol: variable LogStatus
    location: class testcases.VerifyLoginPageWithReports
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPageWithReports.java:[43,28] cannot find symbol
    symbol: variable LogStatus
    location: class testcases.VerifyLoginPageWithReports
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPageWithReports.java:[45,28] cannot find symbol
    symbol: variable LogStatus
    location: class testcases.VerifyLoginPageWithReports
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPageWithReports.java:[49,28] cannot find symbol
    symbol: variable LogStatus
    location: class testcases.VerifyLoginPageWithReports
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPageWithReports.java:[51,28] cannot find symbol
    symbol: variable LogStatus
    location: class testcases.VerifyLoginPageWithReports
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPageWithReports.java:[52,28] cannot find symbol
    symbol: variable LogStatus
    location: class testcases.VerifyLoginPageWithReports
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPageWithReports.java:[62,36] cannot find symbol
    symbol: variable LogStatus
    location: class testcases.VerifyLoginPageWithReports
    [INFO] 24 errors
    [INFO] ————————————————————-
    [INFO] ————————————————————————
    [INFO] BUILD FAILURE
    [INFO] ————————————————————————
    [INFO] Total time: 12.530 s
    [INFO] Finished at: 2016-07-16T19:39:41+05:30
    [INFO] Final Memory: 21M/296M
    [INFO] ————————————————————————
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:testCompile (default-testCompile) on project com.automation.hybrid: Compilation failure: Compilation failure:
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPage.java:[10,39] package com.relevantcodes.extentreports does not exist
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPage.java:[11,39] package com.relevantcodes.extentreports does not exist
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPage.java:[12,39] package com.relevantcodes.extentreports does not exist
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPage.java:[21,9] cannot find symbol
    [ERROR] symbol: class ExtentReports
    [ERROR] location: class testcases.VerifyLoginPage
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPage.java:[22,9] cannot find symbol
    [ERROR] symbol: class ExtentTest
    [ERROR] location: class testcases.VerifyLoginPage
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPageWithReports.java:[11,39] package com.relevantcodes.extentreports does not exist
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPageWithReports.java:[12,39] package com.relevantcodes.extentreports does not exist
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPageWithReports.java:[13,39] package com.relevantcodes.extentreports does not exist
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPageWithReports.java:[23,9] cannot find symbol
    [ERROR] symbol: class ExtentReports
    [ERROR] location: class testcases.VerifyLoginPageWithReports
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPageWithReports.java:[24,9] cannot find symbol
    [ERROR] symbol: class ExtentTest
    [ERROR] location: class testcases.VerifyLoginPageWithReports
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPage.java:[27,30] cannot find symbol
    [ERROR] symbol: class ExtentReports
    [ERROR] location: class testcases.VerifyLoginPage
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPage.java:[31,28] cannot find symbol
    [ERROR] symbol: variable LogStatus
    [ERROR] location: class testcases.VerifyLoginPage
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPage.java:[41,28] cannot find symbol
    [ERROR] symbol: variable LogStatus
    [ERROR] location: class testcases.VerifyLoginPage
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPage.java:[43,28] cannot find symbol
    [ERROR] symbol: variable LogStatus
    [ERROR] location: class testcases.VerifyLoginPage
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPage.java:[47,28] cannot find symbol
    [ERROR] symbol: variable LogStatus
    [ERROR] location: class testcases.VerifyLoginPage
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPage.java:[49,28] cannot find symbol
    [ERROR] symbol: variable LogStatus
    [ERROR] location: class testcases.VerifyLoginPage
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPageWithReports.java:[29,30] cannot find symbol
    [ERROR] symbol: class ExtentReports
    [ERROR] location: class testcases.VerifyLoginPageWithReports
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPageWithReports.java:[33,28] cannot find symbol
    [ERROR] symbol: variable LogStatus
    [ERROR] location: class testcases.VerifyLoginPageWithReports
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPageWithReports.java:[43,28] cannot find symbol
    [ERROR] symbol: variable LogStatus
    [ERROR] location: class testcases.VerifyLoginPageWithReports
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPageWithReports.java:[45,28] cannot find symbol
    [ERROR] symbol: variable LogStatus
    [ERROR] location: class testcases.VerifyLoginPageWithReports
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPageWithReports.java:[49,28] cannot find symbol
    [ERROR] symbol: variable LogStatus
    [ERROR] location: class testcases.VerifyLoginPageWithReports
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPageWithReports.java:[51,28] cannot find symbol
    [ERROR] symbol: variable LogStatus
    [ERROR] location: class testcases.VerifyLoginPageWithReports
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPageWithReports.java:[52,28] cannot find symbol
    [ERROR] symbol: variable LogStatus
    [ERROR] location: class testcases.VerifyLoginPageWithReports
    [ERROR] /F:/TESTING/PROJECTS/HybridFramework/src/test/java/testcases/VerifyLoginPageWithReports.java:[62,36] cannot find symbol
    [ERROR] symbol: variable LogStatus
    [ERROR] location: class testcases.VerifyLoginPageWithReports
    [ERROR] -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

    Reply
    • Mukesh Otwani says

      July 20, 2016 at 2:07 PM

      Here we go http://learn-automation.com/maven-no-compiler-is-provided-in-this-environment-selenium/

      Reply
      • Ankit saxena says

        August 7, 2016 at 12:49 PM

        It still not working for me after making all the configuration which you documented in the above link..

        Reply
        • Mukesh Otwani says

          August 18, 2016 at 10:44 PM

          Hi Ankit,

          Send me your pom.xml file I will cross check from my side.

          Reply
  12. SOMANATH SAHOO says

    July 14, 2016 at 4:55 PM

    sir i am getting bellow error while configure maven test from pom.xml

    [INFO] BUILD FAILURE
    [INFO] ————————————————————————
    [INFO] Total time: 12.932 s
    [INFO] Finished at: 2016-07-14T16:50:10+05:30
    [INFO] Final Memory: 8M/21M
    [INFO] ————————————————————————
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test (default-test) on project mavenAuto: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test failed: There was an error in the forked process
    [ERROR] org.apache.maven.surefire.testset.TestSetFailedException: Suite file D:\javaselenium\mavenAuto\src\main\resources\test.xml is not a valid file
    [ERROR] at org.apache.maven.surefire.testng.TestNGXmlTestSuite.locateTestSets(TestNGXmlTestSuite.java:116)
    [ERROR] at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:84)
    [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
    [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
    [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
    [ERROR] -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

    Reply
    • Mukesh Otwani says

      July 20, 2016 at 2:16 PM

      Seems xml is not in valid location. Kindly make the changes and run again.

      Reply
  13. sudhr says

    July 13, 2016 at 4:31 PM

    hi,
    how to run maven project from command prompt

    Reply
    • Mukesh Otwani says

      July 14, 2016 at 11:10 AM

      navigate till pom.xml file location and then run mvn clean install test

      Reply
  14. Pritam says

    July 13, 2016 at 1:01 AM

    Hi Mukesh,
    getting below issue .
    “[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test (default-test) on project com.learnAutomation.selenium: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test failed: There was an error in the forked process”

    Please guide

    [INFO] Scanning for projects…
    [INFO]
    [INFO] ————————————————————————
    [INFO] Building Marven project 0.0.1-SNAPSHOT
    [INFO] ————————————————————————
    [INFO]
    [INFO] — maven-resources-plugin:2.6:resources (default-resources) @ com.learnAutomation.selenium —
    [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
    [INFO] Copying 0 resource
    [INFO]
    [INFO] — maven-compiler-plugin:3.0:compile (default-compile) @ com.learnAutomation.selenium —
    [INFO] Nothing to compile – all classes are up to date
    [INFO]
    [INFO] — maven-resources-plugin:2.6:testResources (default-testResources) @ com.learnAutomation.selenium —
    [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
    [INFO] Copying 0 resource
    [INFO]
    [INFO] — maven-compiler-plugin:3.0:testCompile (default-testCompile) @ com.learnAutomation.selenium —
    [INFO] Changes detected – recompiling the module!
    [WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
    [INFO] Compiling 1 source file to C:\Users\IBM_ADMIN\Desktop\Selenium\worksp\com.selenium.maven\target\test-classes
    [INFO]
    [INFO] — maven-surefire-plugin:2.17:test (default-test) @ com.learnAutomation.selenium —
    [INFO] Surefire report directory: C:\Users\IBM_ADMIN\Desktop\Selenium\worksp\com.selenium.maven\target\surefire-reports

    ——————————————————-
    T E S T S
    ——————————————————-

    Results :

    Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

    [INFO] ————————————————————————
    [INFO] BUILD FAILURE
    [INFO] ————————————————————————
    [INFO] Total time: 4.742 s
    [INFO] Finished at: 2016-07-13T00:57:21+05:30
    [INFO] Final Memory: 15M/197M
    [INFO] ————————————————————————
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test (default-test) on project com.learnAutomation.selenium: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test failed: There was an error in the forked process
    [ERROR] org.apache.maven.surefire.testset.TestSetFailedException: Suite file C:\Users\IBM_ADMIN\Desktop\Selenium\worksp\com.selenium.maven\src\main\resources\testng.xml is not a valid file
    [ERROR] at org.apache.maven.surefire.testng.TestNGXmlTestSuite.locateTestSets(TestNGXmlTestSuite.java:116)
    [ERROR] at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:84)
    [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
    [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
    [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
    [ERROR] -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

    Reply
    • Mukesh Otwani says

      July 14, 2016 at 11:12 AM

      Hi,

      Seems like you have not added testng.xml file properly in pom.xml file.

      Reply
  15. Ritesh kumar says

    June 23, 2016 at 9:51 AM

    Hello sir,

    while running my test from pom.xml than getting this error.please review

    COMPILATION ERROR :
    [INFO] ————————————————————-
    [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
    [INFO] 1 error
    [INFO] ————————————————————-
    [INFO] ————————————————————————
    [INFO] BUILD FAILURE
    [INFO] ————————————————————————
    [INFO] Total time: 1.578 s
    [INFO] Finished at: 2016-06-23T09:48:30+05:30
    [INFO] Final Memory: 9M/108M
    [INFO] ————————————————————————
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:testCompile (default-testCompile) on project Next_Maven: Compilation failure
    [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
    [ERROR] -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

    Reply
    • Mukesh Otwani says

      July 2, 2016 at 3:17 PM

      http://learn-automation.com/maven-no-compiler-is-provided-in-this-environment-selenium/

      Reply
  16. Ritesh kumar says

    May 29, 2016 at 4:02 PM

    Hello sir,

    I am getting this error while running my code as pom.xml->run as maven test.

    [INFO] Scanning for projects…
    [INFO]
    [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
    [INFO]
    [INFO] ————————————————————————
    [INFO] Building Demo program for maven 0.0.1-SNAPSHOT
    [INFO] ————————————————————————
    [INFO]
    [INFO] — maven-resources-plugin:2.6:resources (default-resources) @ com.learn_selenium —
    [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:3.0:compile (default-compile) @ com.learn_selenium —
    [INFO] Nothing to compile – all classes are up to date
    [INFO]
    [INFO] — maven-resources-plugin:2.6:testResources (default-testResources) @ com.learn_selenium —
    [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
    [INFO] Copying 0 resource
    [INFO]
    [INFO] — maven-compiler-plugin:3.0:testCompile (default-testCompile) @ com.learn_selenium —
    [INFO] Changes detected – recompiling the module!
    [WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
    [INFO] Compiling 1 source file to C:\Users\Ritesh\workspace\com.learn_selenium\target\test-classes
    [INFO] ————————————————————-
    [ERROR] COMPILATION ERROR :
    [INFO] ————————————————————-
    [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
    [INFO] 1 error
    [INFO] ————————————————————-
    [INFO] ————————————————————————
    [INFO] BUILD FAILURE
    [INFO] ————————————————————————
    [INFO] Total time: 1.585 s
    [INFO] Finished at: 2016-05-29T03:25:26-08:00
    [INFO] Final Memory: 8M/99M
    [INFO] ————————————————————————
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:testCompile (default-testCompile) on project com.learn_selenium: Compilation failure
    [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
    [ERROR] -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

    Reply
    • Mukesh Otwani says

      May 30, 2016 at 12:28 AM

      Hi

      http://learn-automation.com/maven-no-compiler-is-provided-in-this-environment-selenium/

      Reply
  17. Sanjay Mohan says

    March 21, 2016 at 8:29 AM

    Hi Mukesh,

    After setting the System & User variables,when I tried verifying if my setup is correct or not in the Command prompt I was getting the following error message –
    Error: Java_HOME not found in your environment.
    Please set the JAVA_HOME variable in your environment to match the location of your java installation

    This is what I set in the User variable – C:\Users\OM\Downloads\apache-maven-3.3.9-bin\apache-maven-3.3.9(I don’t think this to be wrong)

    This is what I set in the System variable –
    %CommonProgramFiles%\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0;C:\Users\OM\Downloads\apache-maven-3.3.9-bin\apache-maven-3.3.9\bin;

    After seeing the error message in Cmd,I updated the system variable to this – C:\Program Files\Java;C:\Users\OM\Downloads\apache-maven-3.3.9-bin\apache-maven-3.3.9;
    but now I was getting the error message as ‘mvn’ is not recognized as an internal or external command

    Please correct me where my error is.

    Reply
    • Mukesh Otwani says

      March 26, 2016 at 2:10 PM

      PLease Check JAVA_HOME path and it should work after this.

      Reply
  18. Kumar says

    January 19, 2016 at 6:48 PM

    Hi Mukesh

    can you please post how to generate XSLT reports using Maven.it will great help for me.

    Reply
    • Mukesh Otwani says

      January 20, 2016 at 12:56 AM

      Hi Kumar,

      If you are planning with Maven then Try extent report and its awesome. I have updated the video for the same please check in my youtube playlist.

      Reply
  19. Shashank A J says

    December 19, 2015 at 9:47 PM

    Hi Mukesh

    Im getting error after adding Maven compiler plugin in pom.xml. I am using Eclipse Luna JRE 1.7 is the library I have added.Should we add J2SE Jre library or Normal JRE library, Will It make any difference. Im Using Java8 JDK.
    Please help me in getting solution

    Reply
    • Mukesh Otwani says

      December 20, 2015 at 11:54 PM

      Hi Shashank,

      I think you are talking about below issue.

      http://learn-automation.com/maven-no-compiler-is-provided-in-this-environment-selenium/

      Reply
  20. Mrutyunjaya Sahu says

    October 17, 2015 at 9:39 PM

    org.apache.maven.plugins
    maven-compiler-plugin

    1.6
    1.6

    org.apache.maven.plugins
    maven-surefire-plugin
    2.6

    ${suiteXmlFile}

    true

    I am getting below error while configuring my pom.xml file,
    Error resolving version for plugin ‘org.apache.maven.plugins:maven-compliler-plugin’ from the repositories
    [local (C:\Users\sates\.m2\repository), central (https://repo.maven.apache.org/maven2)]: Plugin not found in
    any plugin repository.

    From google I found one link i.e.
    http://stackoverflow.com/questions/10612838/unable-to-download-the-artifact-maven-compiler-plugin-from-repository

    In that link “2.3.2” is there. And i have tried with this below tag and then that pom.xml file error escaped. but after execution “Build Failure” Error is showing in command prompt.

    org.apache.maven.plugins
    maven-compiler-plugin
    2.3.2

    1.6
    1.6

    Reply
    • Mukesh Otwani says

      October 18, 2015 at 1:35 PM

      Hi,

      Please follow below link and try the same.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Free Selenium Videos

https://www.youtube.com/watch?v=w_iPCT1ETO4

Search topic

Top Posts & Pages

  • Selenium Webdriver tutorial for beginners
  • How To Fix Eclipse Autocomplete Or Code Suggestion In Eclipse
  • Selenium Webdriver C# Tutorial
  • WHAT ARE YOUR EXPECTATIONS FROM US?

Stay connected via Facebook

Stay connected via Facebook

Archives

Footer

Categories

Recent Post

  • API Testing Using Postman And RestAssured
  • Disable Personalise Your Web Experience Microsoft Edge Prompt In Selenium
  • How To Fix Error: No tests found In Playwright
  • How To Fix Eclipse Autocomplete Or Code Suggestion In Eclipse
  • Best and easy way to Group test cases in selenium

Top Posts & Pages

  • Selenium Webdriver tutorial for beginners
  • How To Fix Eclipse Autocomplete Or Code Suggestion In Eclipse
  • Selenium Webdriver C# Tutorial
  • WHAT ARE YOUR EXPECTATIONS FROM US?