title: Maven doesn't find my test test classes when building
body: <p>I'm running my code from TeamCity and it's having problems compiling by telling me that package does not exist.</p>
  
  <p>I'm thinking that my code is not on the classpath so I need to reconfigure Maven differently. Struggling to find any info on this. </p>
  
  <p>I am pasting my system variables and my POM below:</p>
  
  <pre><code>CLASSPATH = .;%JAVA_HOME%\lib;%JAVA_HOME%\jre\lib
  JAVA_HOME = C:\Program Files\Java\jdk-9.0.4
  JDK_HOME = %JAVA_HOME%
  JRE_HOME = C:\TeamCity\jre
  Path = "C:\Projects\BDD\MDA Online Framework\Maven\apache-maven-3.5.4"\bin;%JAVA_HOME%\bin;other path stuff here
  M2_HOME = "C:\Projects\BDD\MDA Online Framework\Maven\apache-maven-3.5.4"
  MAVEN_HOME = "C:\Projects\BDD\MDA Online Framework\Maven\apache-maven-3.5.4"
  </code></pre>
  
  <p>POM here:</p>
  
  <p><strong>Edit: I have now added a value to <code>&lt;testSourceDirectory&gt;</code> as this was missing. But error still exists.</strong></p>
  
  <pre><code>&lt;project&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;com.mycompany.app&lt;/groupId&gt;
      &lt;artifactId&gt;my-app&lt;/artifactId&gt;
      &lt;version&gt;1&lt;/version&gt;
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;/properties&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;info.cukes&lt;/groupId&gt;
              &lt;artifactId&gt;cucumber-java8&lt;/artifactId&gt;
              &lt;version&gt;1.2.2&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;info.cukes&lt;/groupId&gt;
              &lt;artifactId&gt;cucumber-junit&lt;/artifactId&gt;
              &lt;version&gt;1.2.5&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
              &lt;artifactId&gt;selenium-server&lt;/artifactId&gt;
              &lt;version&gt;3.5.3&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;4.12&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.guava&lt;/groupId&gt;
              &lt;artifactId&gt;guava&lt;/artifactId&gt;
              &lt;version&gt;22.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.poi&lt;/groupId&gt;
              &lt;artifactId&gt;poi&lt;/artifactId&gt;
              &lt;version&gt;3.17&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.poi&lt;/groupId&gt;
              &lt;artifactId&gt;poi-ooxml&lt;/artifactId&gt;
              &lt;version&gt;3.17&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.xmlbeans&lt;/groupId&gt;
              &lt;artifactId&gt;xmlbeans-xpath&lt;/artifactId&gt;
              &lt;version&gt;2.3.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.microsoft.sqlserver&lt;/groupId&gt;
              &lt;artifactId&gt;mssql-jdbc&lt;/artifactId&gt;
              &lt;version&gt;6.5.2.jre9-preview&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-io&lt;/groupId&gt;
              &lt;artifactId&gt;commons-io&lt;/artifactId&gt;
              &lt;version&gt;2.4&lt;/version&gt;
          &lt;/dependency&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.1.0&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-resources-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.3&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;!-- specify UTF-8, ISO-8859-1 or any other file encoding --&gt;
                      &lt;encoding&gt;UTF-8&lt;/encoding&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.3&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.8&lt;/source&gt;
                      &lt;target&gt;1.8&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&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.22.0&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;!-- &lt;testClassesDirectory&gt;s360UIAutomationCC/src/main/java&lt;/testClassesDirectory&gt; --&gt;
                      &lt;testSourceDirectory&gt;src/test/java/&lt;/testSourceDirectory&gt;
                      &lt;includes&gt;
                          &lt;include&gt;**/*MOP_Run_All.java&lt;/include&gt;
                      &lt;/includes&gt;
                      &lt;!-- &lt;excludes&gt; &lt;exclude&gt;**/*RunCukesTest.java&lt;/exclude&gt; &lt;/excludes&gt; --&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;resources&gt;
      &lt;/resources&gt;
      &lt;/build&gt;
      &lt;profiles&gt;
      &lt;/profiles&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>I'm adding the log from TeamCity up to the point where it errors:</p>
  
  <pre><code>[11:59:20]Checking for changes
  [11:59:21]Publishing internal artifacts
  [11:59:21]Clearing temporary directory: C:\TeamCity\buildAgent2nd\temp\buildTmp
  [11:59:21]Checkout directory: C:\TeamCity\buildAgent2nd\work\bf68b71269ca1c06
  [11:59:21]Updating sources: server side checkout
  [11:59:21]Step 1/1: Maven (Maven) (9s)
  [11:59:21][Step 1/1] Using watcher: C:\TeamCity\buildAgent2nd\plugins\mavenPlugin\maven-watcher\maven-watcher-agent.jar
  [11:59:21][Step 1/1] Initial M2_HOME = C:\Projects\BDD\MDA Online Framework\Maven\apache-maven-3.5.4
  [11:59:21][Step 1/1] Current M2_HOME = C:\Projects\BDD\MDA Online Framework\Maven\apache-maven-3.5.4
  [11:59:21][Step 1/1] PATH = C:\Projects\BDD\MDA Online Framework\Maven\apache-maven-3.5.4\bin;C:\Projects\BDD\MDA Online Framework\Maven\apache-maven-3.5.4\bin;C:\Program Files\Java\jdk-9.0.4\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Projects\BDD\MDA Online Framework\Maven\apache-maven-3.5.4\bin;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\TortoiseSVN\bin;c:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files\Microsoft SQL Server\110\DTS\Binn\;c:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;c:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files\nodejs\;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\NTP\bin;C:\Ruby22-x64\bin;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\
  [11:59:21][Step 1/1] Initial MAVEN_OPTS not set
  [11:59:21][Step 1/1] Current MAVEN_OPTS = -Dmaven.multiModuleProjectDirectory="C:\Projects\BDD\MDA Online Framework\Maven\apache-maven-3.5.4"
  [11:59:21][Step 1/1] Starting: "C:\Program Files\Java\jdk-10.0.2\bin\java.exe" "-DDmaven.multiModuleProjectDirectory=C:\Projects\BDD\MDA Online Framework\Maven\apache-maven-3.5.4" -Dagent.home.dir=C:\TeamCity\buildAgent2nd -Dagent.name=WEBDEVVMWFE2nd -Dagent.ownPort=9094 -Dagent.work.dir=C:\TeamCity\buildAgent2nd\work -Dbuild.number=49 -Dbuild.vcs.number=5045 -Dbuild.vcs.number.1=5045 -Dbuild.vcs.number.SitecoreBdd_TfsHttpMdaRs8080tfsMdaWeb20redevelopmentSitecoreBdd=5045 -Dclassworlds.conf=C:\TeamCity\buildAgent2nd\temp\buildTmp\teamcity.m2.conf -Dcom.jetbrains.maven.watcher.report.file=C:\TeamCity\buildAgent2nd\temp\buildTmp\maven-build-info.xml -Djava.io.tmpdir=C:\TeamCity\buildAgent2nd\temp\buildTmp "-Dmaven.home=C:\Projects\BDD\MDA Online Framework\Maven\apache-maven-3.5.4" -Dmaven.repo.local=C:/Users/SVC_DevBuildAgent/.m2/repository -Dmdafeedkey=Password1 -Dmdafeedurl=http://webdevvmwfe:8085/nuget/MDA+Feeds -Dnugetfeedkey=Password1 -Dnugetfeedurl=http://webdevvmwfe:8085/nuget/mdathirdparty -Dpath.macro.MAVEN.REPOSITORY=c:/.m2/repository -Dteamcity.agent.cpuBenchmark=274 -Dteamcity.agent.dotnet.agent_url=http://localhost:9094/RPC2 -Dteamcity.agent.dotnet.build_id=10695 -Dteamcity.auth.password=geVIwqNiAoewJuElFUtwaPT6i0ve9Iru -Dteamcity.auth.userId=TeamCityBuildId=10695 -Dteamcity.build.changedFiles.file=C:\TeamCity\buildAgent2nd\temp\buildTmp\changedFiles2607574113103246204.txt -Dteamcity.build.checkoutDir=C:\TeamCity\buildAgent2nd\work\bf68b71269ca1c06 -Dteamcity.build.id=10695 -Dteamcity.build.properties.file=C:\TeamCity\buildAgent2nd\temp\buildTmp\teamcity.build8254433068643114691.properties -Dteamcity.build.tempDir=C:\TeamCity\buildAgent2nd\temp\buildTmp -Dteamcity.build.workingDir=C:\TeamCity\buildAgent2nd\work\bf68b71269ca1c06 "-Dteamcity.buildConfName=Build Sitecore BDD" -Dteamcity.buildType.id=SitecoreBdd_Test -Dteamcity.configuration.properties.file=C:\TeamCity\buildAgent2nd\temp\buildTmp\teamcity.config6252402284421596652.properties -Dteamcity.dotnet.nunitaddin=C:\TeamCity\buildAgent2nd\plugins\dotnetPlugin\bin\JetBrains.TeamCity.NUnitAddin-NUnit -Dteamcity.dotnet.nunitlauncher=C:\TeamCity\buildAgent2nd\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe -Dteamcity.dotnet.nunitlauncher.msbuild.task=C:\TeamCity\buildAgent2nd\plugins\dotnetPlugin\bin\JetBrains.BuildServer.MSBuildLoggers.dll -Dteamcity.dotnet.nunitlauncher1.1=C:\TeamCity\buildAgent2nd\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher1.1.exe -Dteamcity.dotnet.nunitlauncher2.0=C:\TeamCity\buildAgent2nd\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher2.0.exe -Dteamcity.dotnet.nunitlauncher2.0.vsts=C:\TeamCity\buildAgent2nd\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher2.0.VSTS.exe -Dteamcity.dotnet.platform=C:\TeamCity\buildAgent2nd\plugins\dotnetPlugin\bin\JetBrains.TeamCity.PlatformProcessRunner.1.1.exe -Dteamcity.maven.watcher.home=C:\TeamCity\buildAgent2nd\plugins\mavenPlugin\maven-watcher "-Dteamcity.projectName=Sitecore BDD" -Dteamcity.runner.properties.file=C:\TeamCity\buildAgent2nd\temp\buildTmp\teamcity.runner5425832831152215119.properties -Dteamcity.tests.recentlyFailedTests.file=C:\TeamCity\buildAgent2nd\temp\buildTmp\testsToRunFirst2496520396488952225.txt "-Dteamcity.version=8.0.6 (build 27767)" "-Dmaven.multiModuleProjectDirectory=\"C:\Projects\BDD\MDA Online Framework\Maven\apache-maven-3.5.4\"" -classpath "C:\Projects\BDD\MDA Online Framework\Maven\apache-maven-3.5.4\boot\plexus-classworlds-2.5.2.jar;" org.codehaus.plexus.classworlds.launcher.Launcher -f "C:\TeamCity\buildAgent2nd\work\bf68b71269ca1c06\MDA Online Framework\pom.xml" -B clean test -DtposUrl=https://tpos-dev.mdanational.com.au/ -DmosURL=https://mos-dev.mdanational.com.au -DmopURL=https://mop-dev.mdanational.com.au/ -DadawaURL=https://adawa-dev.mdanational.com.au/ -DdplURL=https://dpl-dev.mdanational.com.au/ -DoaURL=https://oa-dev.mdanational.com.au/ -DdbPivotalDriver=com.microsoft.sqlserver.jdbc.SQLServerDriver -DdbPivotalURL=jdbc:sqlserver://MDAPDCDBS11:1433; -DdbPivotalName=databaseName=MDA-DevelopmentED
  [11:59:21][Step 1/1] in directory: C:\TeamCity\buildAgent2nd\work\bf68b71269ca1c06
  [11:59:25][Step 1/1] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Scanning for projects...
  [11:59:25][Step 1/1] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 
  [11:59:25][Step 1/1] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ----------------------&lt; com.mycompany.app:my-app &gt;----------------------
  [11:59:25][Step 1/1] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Building my-app 1
  [11:59:25][Step 1/1] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --------------------------------[ jar ]---------------------------------
  [11:59:25][Step 1/1] com.mycompany.app:my-app (5s)
  [11:59:25][com.mycompany.app:my-app] Importing data from 'C:/TeamCity/buildAgent2nd/work/bf68b71269ca1c06/MDA Online Framework/target/surefire-reports/TEST-*.xml' (not existing file) with 'surefire' processor
  [11:59:25][com.mycompany.app:my-app] Surefire report watcher
  [11:59:26][com.mycompany.app:my-app] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 
  [11:59:26][com.mycompany.app:my-app] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-clean-plugin:2.5:clean (default-clean) @ my-app ---
  [11:59:26][com.mycompany.app:my-app] [main] INFO org.apache.maven.plugin.clean.CleanMojo - Deleting C:\TeamCity\buildAgent2nd\work\bf68b71269ca1c06\MDA Online Framework\target
  [11:59:26][com.mycompany.app:my-app] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 
  [11:59:26][com.mycompany.app:my-app] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-resources-plugin:2.3:resources (default-resources) @ my-app ---
  [11:59:26][com.mycompany.app:my-app] [main] INFO org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering - Using 'UTF-8' encoding to copy filtered resources.
  [11:59:26][com.mycompany.app:my-app] [main] INFO org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering - Copying 2 resources
  [11:59:26][com.mycompany.app:my-app] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 
  [11:59:26][com.mycompany.app:my-app] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-compiler-plugin:3.3:compile (default-compile) @ my-app ---
  [11:59:27][com.mycompany.app:my-app] [main] INFO org.apache.maven.plugin.compiler.CompilerMojo - Nothing to compile - all classes are up to date
  [11:59:27][com.mycompany.app:my-app] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 
  [11:59:27][com.mycompany.app:my-app] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-resources-plugin:2.3:testResources (default-testResources) @ my-app ---
  [11:59:27][com.mycompany.app:my-app] [main] INFO org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering - Using 'UTF-8' encoding to copy filtered resources.
  [11:59:27][com.mycompany.app:my-app] [main] INFO org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering - Copying 8 resources
  [11:59:27][com.mycompany.app:my-app] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 
  [11:59:27][com.mycompany.app:my-app] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @ my-app ---
  [11:59:27][com.mycompany.app:my-app] [main] INFO org.apache.maven.plugin.compiler.TestCompilerMojo - Changes detected - recompiling the module!
  [11:59:27][com.mycompany.app:my-app] [main] INFO org.codehaus.plexus.compiler.javac.JavacCompiler - Compiling 27 source files to C:\TeamCity\buildAgent2nd\work\bf68b71269ca1c06\MDA Online Framework\target\test-classes
  [11:59:30][com.mycompany.app:my-app] [main] INFO org.apache.maven.plugin.compiler.TestCompilerMojo - -------------------------------------------------------------
  [11:59:30][com.mycompany.app:my-app] [main] ERROR org.apache.maven.plugin.compiler.TestCompilerMojo - COMPILATION ERROR : 
  [11:59:30][com.mycompany.app:my-app] [main] INFO org.apache.maven.plugin.compiler.TestCompilerMojo - -------------------------------------------------------------
  [11:59:30][com.mycompany.app:my-app] [main] ERROR org.apache.maven.plugin.compiler.TestCompilerMojo - /C:/TeamCity/buildAgent2nd/work/bf68b71269ca1c06/MDA Online Framework/src/test/java/stepdefs/MOPStepDefs/MOPStepDefs.java:[5,14] package config does not exist
  [11:59:30][com.mycompany.app:my-app] [main] ERROR org.apache.maven.plugin.compiler.TestCompilerMojo - /C:/TeamCity/buildAgent2nd/work/bf68b71269ca1c06/MDA Online Framework/src/test/java/Database/GetDatabase.java:[3,14] package config does not exist
  [11:59:30][com.mycompany.app:my-app] [main] ERROR org.apache.maven.plugin.compiler.TestCompilerMojo - /C:/TeamCity/buildAgent2nd/work/bf68b71269ca1c06/MDA Online Framework/src/test/java/stepdefs/TPOSStepDefs/TPOStepDefs.java:[5,14] package config does not exist
  [11:59:30][com.mycompany.app:my-app] [main] ERROR org.apache.maven.plugin.compiler.TestCompilerMojo - /C:/TeamCity/buildAgent2nd/work/bf68b71269ca1c06/MDA Online Framework/src/test/java/stepdefs/OAStepDefs/OAStepDefs.java:[7,14] package config does not exist
  [11:59:30][com.mycompany.app:my-app] [main] ERROR org.apache.maven.plugin.compiler.TestCompilerMojo - /C:/TeamCity/buildAgent2nd/work/bf68b71269ca1c06/MDA Online Framework/src/test/java/stepdefs/MOSStepDefs/MOSStepDefs.java:[6,14] package config does not exist
  [11:59:30][com.mycompany.app:my-app] [main] ERROR org.apache.maven.plugin.compiler.TestCompilerMojo - /C:/TeamCity/buildAgent2nd/work/bf68b71269ca1c06/MDA Online Framework/src/test/java/stepdefs/MOPStepDefs/MOPStepDefs.java:[35,24] cannot find symbol
  </code></pre>
  
  <p>And below is the command that TeamCity is running:</p>
  
  <pre><code>"C:\Program Files\Java\jdk-10.0.2\bin\java.exe" "-DDmaven.multiModuleProjectDirectory=C:\Projects\BDD\MDA Online Framework\Maven\apache-maven-3.5.4" -Dagent.home.dir=C:\TeamCity\buildAgent2nd -Dagent.name=WEBDEVVMWFE2nd -Dagent.ownPort=9094 -Dagent.work.dir=C:\TeamCity\buildAgent2nd\work -Dbuild.number=49 -Dbuild.vcs.number=5045 -Dbuild.vcs.number.1=5045 -Dbuild.vcs.number.SitecoreBdd_TfsHttpMdaRs8080tfsMdaWeb20redevelopmentSitecoreBdd=5045 -Dclassworlds.conf=C:\TeamCity\buildAgent2nd\temp\buildTmp\teamcity.m2.conf -Dcom.jetbrains.maven.watcher.report.file=C:\TeamCity\buildAgent2nd\temp\buildTmp\maven-build-info.xml -Djava.io.tmpdir=C:\TeamCity\buildAgent2nd\temp\buildTmp "-Dmaven.home=C:\Projects\BDD\MDA Online Framework\Maven\apache-maven-3.5.4" -Dmaven.repo.local=C:/Users/SVC_DevBuildAgent/.m2/repository -Dmdafeedkey=Password1 -Dmdafeedurl=http://webdevvmwfe:8085/nuget/MDA+Feeds -Dnugetfeedkey=Password1 -Dnugetfeedurl=http://webdevvmwfe:8085/nuget/mdathirdparty -Dpath.macro.MAVEN.REPOSITORY=c:/.m2/repository -Dteamcity.agent.cpuBenchmark=274 -Dteamcity.agent.dotnet.agent_url=http://localhost:9094/RPC2 -Dteamcity.agent.dotnet.build_id=10695 -Dteamcity.auth.password=geVIwqNiAoewJuElFUtwaPT6i0ve9Iru -Dteamcity.auth.userId=TeamCityBuildId=10695 -Dteamcity.build.changedFiles.file=C:\TeamCity\buildAgent2nd\temp\buildTmp\changedFiles2607574113103246204.txt -Dteamcity.build.checkoutDir=C:\TeamCity\buildAgent2nd\work\bf68b71269ca1c06 -Dteamcity.build.id=10695 -Dteamcity.build.properties.file=C:\TeamCity\buildAgent2nd\temp\buildTmp\teamcity.build8254433068643114691.properties -Dteamcity.build.tempDir=C:\TeamCity\buildAgent2nd\temp\buildTmp -Dteamcity.build.workingDir=C:\TeamCity\buildAgent2nd\work\bf68b71269ca1c06 "-Dteamcity.buildConfName=Build Sitecore BDD" -Dteamcity.buildType.id=SitecoreBdd_Test -Dteamcity.configuration.properties.file=C:\TeamCity\buildAgent2nd\temp\buildTmp\teamcity.config6252402284421596652.properties -Dteamcity.dotnet.nunitaddin=C:\TeamCity\buildAgent2nd\plugins\dotnetPlugin\bin\JetBrains.TeamCity.NUnitAddin-NUnit -Dteamcity.dotnet.nunitlauncher=C:\TeamCity\buildAgent2nd\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe -Dteamcity.dotnet.nunitlauncher.msbuild.task=C:\TeamCity\buildAgent2nd\plugins\dotnetPlugin\bin\JetBrains.BuildServer.MSBuildLoggers.dll -Dteamcity.dotnet.nunitlauncher1.1=C:\TeamCity\buildAgent2nd\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher1.1.exe -Dteamcity.dotnet.nunitlauncher2.0=C:\TeamCity\buildAgent2nd\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher2.0.exe -Dteamcity.dotnet.nunitlauncher2.0.vsts=C:\TeamCity\buildAgent2nd\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher2.0.VSTS.exe -Dteamcity.dotnet.platform=C:\TeamCity\buildAgent2nd\plugins\dotnetPlugin\bin\JetBrains.TeamCity.PlatformProcessRunner.1.1.exe -Dteamcity.maven.watcher.home=C:\TeamCity\buildAgent2nd\plugins\mavenPlugin\maven-watcher "-Dteamcity.projectName=Sitecore BDD" -Dteamcity.runner.properties.file=C:\TeamCity\buildAgent2nd\temp\buildTmp\teamcity.runner5425832831152215119.properties -Dteamcity.tests.recentlyFailedTests.file=C:\TeamCity\buildAgent2nd\temp\buildTmp\testsToRunFirst2496520396488952225.txt "-Dteamcity.version=8.0.6 (build 27767)" "-Dmaven.multiModuleProjectDirectory=\"C:\Projects\BDD\MDA Online Framework\Maven\apache-maven-3.5.4\"" -classpath "C:\Projects\BDD\MDA Online Framework\Maven\apache-maven-3.5.4\boot\plexus-classworlds-2.5.2.jar;" org.codehaus.plexus.classworlds.launcher.Launcher -f "C:\TeamCity\buildAgent2nd\work\bf68b71269ca1c06\MDA Online Framework\pom.xml" -B clean test -DtposUrl=https://xxxxxxxx.com.au/ -DmosURL=https://xxxxx.com.au -DmopURL=https://xxxx.com.au/ -DadawaURL=https://xxxx.com.au/ -DdplURL=https://xxxxx.com.au/ -DoaURL=https://xxxxxx.com.au/ -DdbPivotalDriver=com.microsoft.sqlserver.jdbc.SQLServerDriver -DdbPivotalURL=jdbc:sqlserver://xxxx:9999; -DdbPivotalName=databaseName=xxx-xxxxopmentED
  </code></pre>
  
  <p>Also adding in project structure:</p>
  
  <pre><code>MDA Online Framework
  ├───.idea
  │   ├───dictionaries
  │   └───libraries
  ├───Maven
  │   └───apache-maven-3.5.4
  │       ├───bin
  │       ├───boot
  │       ├───conf
  │       │   └───logging
  │       └───lib
  │           ├───ext
  │           └───jansi-native
  │               ├───freebsd32
  │               ├───freebsd64
  │               ├───linux32
  │               ├───linux64
  │               ├───osx
  │               ├───windows32
  │               └───windows64
  ├───Reporting
  │   ├───ADAWA
  │   ├───DPL
  │   ├───MOP
  │   ├───MOS
  │   ├───OA
  │   ├───TPOS
  │   └───wikipedia.html
  ├───run
  ├───Selenium
  │   └───libs
  ├───src
  │   ├───main
  │   │   ├───java
  │   │   └───resources
  │   └───test
  │       ├───java
  │       │   ├───config
  │       │   ├───Database
  │       │   ├───Pages
  │       │   └───stepdefs
  │       │       ├───MOPStepDefs
  │       │       ├───MOSStepDefs
  │       │       ├───OAStepDefs
  │       │       └───TPOSStepDefs
  │       └───Resources
  │           ├───MOP Features
  │           ├───MOS Features
  │           ├───Online Apps
  │           └───TPOS
  └───target
      ├───classes
      ├───generated-sources
      │   └───annotations
      ├───generated-test-sources
      │   └───test-annotations
      ├───maven-status
      │   └───maven-compiler-plugin
      │       ├───compile
      │       │   └───default-compile
      │       └───testCompile
      │           └───default-testCompile
      ├───surefire-reports
      └───test-classes
          ├───config
          ├───Database
          ├───MOP Features
          ├───MOS Features
          ├───Online Apps
          ├───Pages
          ├───stepdefs
          │   ├───MOPStepDefs
          │   ├───MOSStepDefs
          │   ├───OAStepDefs
          │   └───TPOSStepDefs
          └───TPOS
  </code></pre>
  
  <p>My class MDABDDConfig is located under package MDA Online Framework\src\test\java\config and the contents of this class are below:</p>
  
  <pre><code>package config;
  
  public class MDABDDConfig {
  
      public static String getTposUrl() {
          return System.getProperty("tposUrl");
      }
  
      public static String getMosUrl() {
          return System.getProperty("mosURL");
      }
  </code></pre>
  
  <p>My Step def classes (locations mentioned in error log) will call this class such as:</p>
  
  <pre><code>//get URL from properties Class
  String strMOSurl = MDABDDConfig.getMosUrl();
  </code></pre>
  
  <p>I have since noticed that TeamCity is only picking up classes under my src/test/resources folder and is not picking up anything from my src/test/java folder. This is essentially the cause of this issue but I don't know how to fix it.</p>