1

Possible Duplicate:
Custom JUnit Report?

I have quite difficult situation, i am developing automation framework using selenium webdriver. I am using JUNIT 4.0 and ANT 1.8 for reporting and execution purpose.

I have used parameterized runner to run test case with diffrent dataset, and also implemented screencapturing functionality in case of failures. so while generating JUNIT report i am not able to link snapshots with testcase. (I have updated junit-frames.xsl)

I am thinking is there any way to put additional information in Test-Result.xml file?

  <testcase classname="com.example.tests.NormanPrepaidBaseTest" name="testNormanPrepaidBase[0]" time="52.157" />
  <testcase classname="com.example.tests.NormanPrepaidBaseTest" name="testNormanPrepaidBase[1]" time="45.735" />
  <testcase classname="com.example.tests.NormanPrepaidBaseTest" name="testNormanPrepaidBase[2]" time="26.157">
  <failure message="Invalid personal Details" type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: Invalid personal Details
    at normancommon.NormanCommon.fillPersonalDetails(Unknown Source)
    at com.example.tests.NormanPrepaidBaseTest.testNormanPrepaidBase(Unknown Source)
    at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
    at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:423)
    at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:137)
</failure>
<Screenshot>screenshot location</Screenshot> // i want to add something like that in Test-Result.xml
  </testcase>

That way i can read the value using XSL file,

Guys, help me how to do this, as well please suggest best approach to make this possible?

Community
  • 1
  • 1
Priyank Shah
  • 609
  • 3
  • 9
  • 25

0 Answers0