TestNG Ant (change JUnit Report dir)

69 views
Skip to first unread message

André Abe Vicente

unread,
Aug 9, 2011, 1:59:55 PM8/9/11
to testng...@googlegroups.com
I´m executing TestNG Tests using a ant script.

How can I change the output XML dir in JUnit format (TEST-*.xml)?
The standard directory is junitreports.

  <target name="runDBUnitTests">  
      <testng classpathref="xxxxx.classpath" 
        outputDir="${teste.relatorios.dir}" 
        haltOnfailure="false"
        useDefaultListeners="true">
      <classfileset dir="${teste.classesBin.dir}" includes="**/*DBIT.class" />
        <jvmarg value="-Xms512m"/> 
        <jvmarg value="-Xmx1024m"/>
        <jvmarg value="-XX:MaxPermSize=400m"/>
      </testng>
      <echo message="Finished running tests." />  
  </target>

 

Cédric Beust ♔

unread,
Aug 9, 2011, 2:02:18 PM8/9/11
to testng...@googlegroups.com
Isn't this just a matter of using outputDir, like you are already doing below?

-- 
Cédric




 

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to testng...@googlegroups.com.
To unsubscribe from this group, send email to testng-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.

André Abe Vicente

unread,
Aug 9, 2011, 2:12:32 PM8/9/11
to testng...@googlegroups.com
Inside the "output dir" it automatically creates a directory "junitreports"
I´d like to configure the this dir (junitreports).

Or I´ll have to do this manualy, using ant after the execution of testng tests.

2011/8/9 Cédric Beust ♔ <ced...@beust.com>

Cédric Beust ♔

unread,
Aug 9, 2011, 2:26:07 PM8/9/11
to testng...@googlegroups.com
On Tue, Aug 9, 2011 at 11:12 AM, André Abe Vicente <andvi...@gmail.com> wrote:
Inside the "output dir" it automatically creates a directory "junitreports"
I´d like to configure the this dir (junitreports).

Or I´ll have to do this manualy, using ant after the execution of testng tests.

Yes, that's probably the easiest way.

-- 
Cédric





André Abe Vicente

unread,
Aug 9, 2011, 2:51:53 PM8/9/11
to testng...@googlegroups.com
Cédric, I copy the xmls to the dir and after I call junitreport task

But it trows a exception: 
"Error while accessing file E:\xxxxxx\junit-report\TEST-xxxx.xml: Invalid byte 2 of 3-byte UTF-8 sequence."


2011/8/9 Cédric Beust ♔ <ced...@beust.com>

André Abe Vicente

unread,
Aug 9, 2011, 3:49:10 PM8/9/11
to testng...@googlegroups.com
The ant testng task are generating TEST-xxxxx with invalid UTF-8 characters.

Cédric Beust ♔

unread,
Aug 9, 2011, 4:06:21 PM8/9/11
to testng...@googlegroups.com
That seems unlikely but I'm happy to take a look at the file in question.

-- 
Cédric

Reply all
Reply to author
Forward
0 new messages