title: TestNG test-output folder getting generated on Desktop when expected to be in project folder
body: <p>I have a setup of <strong>Selenium WebDriver + TestNG + Ant framework</strong> in my automation project. Running webdriver + TestNG tests from Ant using build.xml was working absolutely fine a few months ago. TestNG was generating the <code>test-output</code> folder in the project directory as expected. <br><br>Now when I run my testng tests from ANT it's generating the default report folder <code>test-output</code> on my Desktop (home/user/Desktop). I don't know why it is happening. <br>
  <br>This is my build.xml file:<br></p>
  
  <pre><code>&lt;project name="InitialConfigProject" default="start" basedir="."&gt;  
  &lt;!-- ========== Initialize Properties =================================== --&gt;
  &lt;property environment="env"/&gt;
  &lt;property file="./app.properties"/&gt;
  
  &lt;property name="ws.home" value="${basedir}"/&gt;
  &lt;property name="test.dest" value="${ws.home}/build"/&gt;
  &lt;property name="test.src" value="${ws.home}/src"/&gt;
  &lt;property name="browser" value="/usr/bin/google-chrome"/&gt;
  &lt;property name="mail_body_file" value="${basedir}/email_body.txt"/&gt;
  &lt;property name="buildID" value="IND3.2.0"/&gt;
  &lt;property name="sendmailscript_path" value="${basedir}/sendmail.sh"/&gt;
  &lt;property name="mail_subject" value="Automated_test_execution_of_${buildID}"/&gt;
  
  
  &lt;!-- ====== Set the classpath ====  --&gt;
  &lt;target name="setClassPath" unless="test.classpath"&gt;
  
      &lt;path id="classpath_jars"&gt;
          &lt;fileset dir="${ws.home}/lib" includes="*.jar"/&gt;
      &lt;/path&gt;
      &lt;pathconvert pathsep=":" property="test.classpath" refid="classpath_jars"/&gt;
  
  &lt;/target&gt;
  
  
  
  
  &lt;!-- ============ Initializing other stuff ===========  --&gt;
  &lt;target name="init" depends="setClassPath"&gt;
  
      &lt;tstamp&gt;
          &lt;format property="timestamp" pattern="dd/MM/yyyy hh:mm aa" /&gt;
      &lt;/tstamp&gt;
      &lt;!--
      &lt;condition property="ANT" 
          value="${env.ANT_HOME}/bin/ant.bat" 
          else="${env.ANT_HOME}/bin/ant"&gt;
                  &lt;os family="windows" /&gt;
      &lt;/condition&gt; --&gt;
      &lt;property name="build.log.dir" location="${basedir}/buildlogs" /&gt;
      &lt;mkdir dir="${build.log.dir}"/&gt;
      &lt;property name="build.log.filename" value="build_${timestamp}.log"/&gt;
      &lt;record name="${build.log.dir}/${build.log.filename}" loglevel="verbose" append="false"/&gt;
      &lt;echo message="build logged to ${build.log.filename}"/&gt;
      &lt;echo message="Loading TestNG.." /&gt;
      &lt;taskdef name="testng" classpath="${test.classpath}" classname="org.testng.TestNGAntTask" /&gt;
  
  &lt;/target&gt;
  
  
  
  &lt;!-- cleaning the destination folders --&gt;
  &lt;target name="clean"&gt;
      &lt;delete dir="${test.dest}"/&gt;
  &lt;/target&gt;
  
  
  &lt;!-- compiling files --&gt;
  &lt;target name="compile" depends="init, clean" &gt; 
      &lt;delete includeemptydirs="true" quiet="true"&gt;
          &lt;fileset dir="${test.dest}" includes="**/*"/&gt;
      &lt;/delete&gt;
      &lt;echo message="making directory..."/&gt;
      &lt;mkdir dir="${test.dest}"/&gt;
  
      &lt;copy file="${ws.home}/app.properties" todir="${ws.home}/build" /&gt;
      &lt;copy file="${ws.home}/resources/testdata/testDataSet1.properties" todir="${ws.home}/build" /&gt;
      &lt;echo message="compiling source files..."/&gt;
      &lt;javac 
          debug="true" 
          destdir="${test.dest}" 
          srcdir="${test.src}" 
          target="1.6" 
          classpath="${test.classpath}"
          includeantruntime="true"
      &gt;
      &lt;/javac&gt;
    &lt;/target&gt;
  
  
  
  &lt;!-- run --&gt;
  &lt;target name="run" depends="compile"&gt;
      &lt;testng outputdir="${ws.home}/test-output" classpath="${test.classpath}:${test.dest}" suitename="Praxify Sanity Suite"&gt;
         &lt;xmlfileset dir="${ws.home}" includes="testng.xml"/&gt; 
      &lt;/testng&gt;
  &lt;/target&gt;
  
  
  
  &lt;!--  ========== Generating reports using XSLT utility ==============    --&gt;
  &lt;target name="testng-xslt-report"&gt;
          &lt;delete dir="${basedir}/testng-xslt"&gt;
          &lt;/delete&gt;
          &lt;mkdir dir="${basedir}/testng-xslt"&gt;
          &lt;/mkdir&gt;
          &lt;xslt in="${basedir}/test-output/testng-results.xml" style="${basedir}/testng-results.xsl" out="${basedir}/testng-xslt/index.html"
               processor="SaxonLiaison"&gt;
              &lt;param expression="${basedir}/testng-xslt/" name="testNgXslt.outputDir" /&gt;
              &lt;param expression="true" name="testNgXslt.sortTestCaseLinks" /&gt;
              &lt;param expression="FAIL,SKIP,PASS,CONF,BY_CLASS" name="testNgXslt.testDetailsFilter" /&gt;
              &lt;param expression="true" name="testNgXslt.showRuntimeTotals" /&gt;
              &lt;classpath refid="classpath_jars"&gt;&lt;/classpath&gt;
          &lt;/xslt&gt;
  &lt;/target&gt;
  
  
  &lt;!-- Starting point of the execution, should be dependent on target "run".
  
  Target sequence will be:
  start (not_execute) ==&gt; run (not_execute) ==&gt; compile (not_execute) ==&gt; init (execute) ==&gt; clean (execute)
  start (execute) &lt;== testng-xslt-report (execute) &lt;== run (execute) &lt;== compile (execute) &lt;==
  
  Suitable for ANT 1.7. Currently using this ====================== --&gt;
  
  
  &lt;target name="start" depends="run, testng-xslt-report"&gt;
      &lt;tstamp prefix="getTime"&gt;
              &lt;format property="TODAY" pattern="MM-dd-yyyyhhmmaa"/&gt;
      &lt;/tstamp&gt;
      &lt;echo message="sending report as mail...."/&gt;
      &lt;property name="execution_time" value="${buildID}_${getTime.TODAY}"/&gt;
      &lt;property name="dest_file" value="/home/xtremum/Reports/${execution_time}.zip"/&gt;
      &lt;zip destfile="/home/xtremum/Reports/${execution_time}.zip" basedir="${basedir}/testng-xslt"/&gt;
      &lt;property name="report_attachment_file" value="${dest_file}"/&gt;
      &lt;exec executable="${sendmailscript_path}" newenvironment="false"&gt; 
                  &lt;arg value="${mail_subject}"/&gt;
                  &lt;arg value="${mail_recipient}"/&gt;
                  &lt;arg value="${report_attachment_file}"/&gt;
                  &lt;arg value="${mail_body_file}"/&gt; 
      &lt;/exec&gt;
   &lt;/target&gt;
  </code></pre>
  
  <p></p>
  
  <p><br>
  <strong>Just for the record:</strong><br>
  1. I am using Eclipse Juno.<br>
  2. I have installed TestNG plugin on Eclipse so that I can run tests directly from eclipse by right clicking on testng.xml and going for Run.<br>
  3. I have installed ANT 1.7 on my Ubuntu machine and have set my ANT_HOME pointing to /usr/share/ant. And I looked up in Windows -> Preferences -> Ant -> Runtime -> Ant Home Entries (Default) and they seem to have references to ant 1.8.3 libraries (JARS) which are inside the Eclipse package (eclipse/plugins/). Is there anything wrong here? <br>
  4. I am running the tests via ant from eclipse and not from command line.<br></p>
  
  <p>I am not getting any build errors. Tests are getting executed but the <code>test-output</code> folder is getting created on Desktop. Any help?</p>