title: Tests not running through Maven?
body: <p>When I run my test in Maven I get this:</p>
  
  <pre><code>[INFO] -------------------------------------------------------    
  [INFO]  T E S T S     
  [INFO] -------------------------------------------------------   
  [INFO]   
  [INFO] Results:  
  [INFO]   
  [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
  </code></pre>
  
  <p>My test class, JsonReaderTest.class, is placed in <strong>src/test/java</strong> and follows the correct name convention as far as I know from maven-surefire-plugin.</p>
  
  <p>Tests run fine when run outside of Maven.</p>
  
  <p>I have this plugin included in my pom:</p>
  
  <pre><code>&lt;!-- Executes tests --&gt;
  &lt;plugin&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
      &lt;version&gt;2.20.1&lt;/version&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>and this in my dependencies:</p>
  
  <pre><code>&lt;!-- Test --&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.junit.jupiter&lt;/groupId&gt;
      &lt;artifactId&gt;junit-jupiter-api&lt;/artifactId&gt;
      &lt;version&gt;5.0.0&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;org.junit.jupiter&lt;/groupId&gt;
      &lt;artifactId&gt;junit-jupiter-engine&lt;/artifactId&gt;
      &lt;version&gt;5.0.0&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>and my test class:</p>
  
  <pre><code>package org.avalin.optaplanner.test.java;
  
  import org.avalin.optaplanner.json.JsonReader;
  import org.junit.jupiter.api.*;
  
  import java.io.FileNotFoundException;
  import java.nio.file.Paths;
  
  import static org.junit.jupiter.api.Assertions.*;
  
  public class JsonReaderTest
  {
      @Test
      @DisplayName("Test: No such file at designated path")
      void testloadFromJsonTest() throws Exception
      {
          Throwable exception = assertThrows(FileNotFoundException.class, 
          ()-&gt; JsonReader.loadFromJson(".json"));
          assertEquals(".json (No such file or directory)", 
          exception.getMessage());
      }
  
      @Test
      @DisplayName("Test: Load Shifts from JSON (String instead of number)")
      void testLoadShiftsFromJson3()
      {
          Throwable exception = assertThrows(NumberFormatException.class, ()-&gt; JsonReader.loadFromJson(Paths.get("src/main/resources/org/avalin/optaplanner/json/faultyShift-2.json").toAbsolutePath().toString()));
          assertEquals("\nOne or more of your \"shift\" elements has a number format exception.\n" +
              "Check for errors in your JSON-properties.\n" +
              "(Did you insert a string instead of a number in id?)", 
          exception.getMessage());
      }
  
      @Test
      @DisplayName("Test: JSON is correctly loaded")
      void testJsonIsLoaded()
      {
          assertFalse(JsonReader.jsonIsLoaded());
      }
  
      @AfterEach
      void cleanJsonReader()
      {
          JsonReader.cleanJsonReader();
      }
  }
  </code></pre>
  
  <p>When I tried googling this problem, it seemed the only thing that could be wrong would be naming convention (class had to end with or start with test, I tested both with no change) and that the test class should be put into the appropriate folder.</p>
  
  <p>When I run: <strong>mvn -Dtest=JsonReaderTest test</strong></p>
  
  <p>I get following:</p>
  
  <pre><code>Failed to execute goal org.apache.maven.plugins:maven-surefire-
  plugin:2.20.1:test (default-test) on project optaplanner: No tests were 
  executed!  
  </code></pre>
  
  <p>The JsonReaderTest.class is also correctly generated inside target/test-classes</p>
  
  <p>What could be the culprit here?</p>