Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 9th, 2012  |  syntax: None  |  size: 0.65 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Using a JUnit formatter when running within java application
  2. <junit printsummary="true" errorProperty="test.failed" failureProperty="test.failed">
  3.     <classpath refid="test.class.path" />
  4.  
  5.     <!-- use multiple formatters -->
  6.     <formatter type="brief" usefile="false" />
  7.     <!-- console log -->
  8.     <formatter type="xml" classname="x.selenium.output.SeleniumFrameworkFormatter" />
  9.     <!-- file log -->
  10.  
  11.     <test name="x.selenium.SeleniumFramework" haltonfailure="no" outfile="result" todir="${build.temp.dir}" />
  12. <junit>
  13.        
  14. JUnitCore junit = new JUnitCore();
  15. Result result = junit.run(classes);
  16.        
  17. Process p = Runtme.getRuntime.exec("/path/to/ant target");