Results 1 to 3 of 3
  1. #1
    Nissem is offline Member
    Join Date
    Sep 2015
    Rep Power

    Default Maven ignoring new test files

    Hi all,

    I have setup a small project that only contains tests. Everything worked smoothly as long as I only had one test file but when I wanted to add a second one I cannot get Maven to include it during build, it only executes the first file. The new file has a different name but the content is copied from the executed file (except for the class name obviously). I have been unsuccessful in finding an answer in this forum or via google. Going crazy over this so thankful for help!

    I am using Eclipse and when I run as Maven build/install/test it is the same behaviour. When run the project as a JUnit all the tests in all files are executed correctly. So I am suspecting that I somewhere need to define that the new files should be included in the Maven build?

    Using Eclipse Mars on Windows 10. The tests are written using JUnit framework to execute selenium tests. The execution is the same on my local computer as well as on my linux Jenkins build server.

    Except for my POM I have not really done any special configuration in any other settings file:

    Java Code:
    <project xmlns="" xmlns:xsi="" xsi:schemaLocation="">
      <name>My First Selenium Project in Maven for Eclipse</name>
      <description>My First Selenium Project in Maven for Eclipse</description>



  2. #2
    RamyaSivakanth's Avatar
    RamyaSivakanth is offline Senior Member
    Join Date
    Apr 2009
    Rep Power

    Default Re: Maven ignoring new test files

    Please refer this may help you.!

  3. #3
    Nissem is offline Member
    Join Date
    Sep 2015
    Rep Power

    Default Re: Maven ignoring new test files

    Thanks for the link Ramaya, I appreciate it!

    I don´t know what the problem was but after creating a new project and copying the files into that one (just changing class and package names) everything worked as expected and all files were executed. I probably need to learn more about where to find the correct logs to analyse the problem if I would run into it again in the future.

    The link looks like it is about choosing between different sets of tests, not about testfiles being ignored, but it will be useful for me in the next step of what I want to achieve :)

Similar Threads

  1. Replies: 4
    Last Post: 04-17-2015, 10:16 AM
  2. Replies: 3
    Last Post: 12-15-2014, 02:48 PM
  3. Replies: 0
    Last Post: 04-11-2014, 01:15 PM
  4. maven build error for JSP files
    By devip in forum Apache Maven
    Replies: 0
    Last Post: 01-22-2013, 08:59 AM
  5. Error with a JUnit test using maven surefire plugin
    By masijade in forum Apache Maven
    Replies: 0
    Last Post: 03-16-2012, 02:38 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts