Problems calling the TPTP publication service via Java [message #89121] |
Thu, 30 November 2006 06:21  |
Eclipse User |
|
|
|
Originally posted by: thomas.spiessens.gmail.com
Hi everyone,
Im trying to call the publication service from a Java class, but it just won't succeed completely. The code that I use
for calling the service can be found at the bottom of the post.
The method gatherAllTestResults() will return a list of absolute pathnames of all the files with an .testsuite extension
that have been found in the workspace.
eclipseDir is the location where Eclipse has been installed.
When this code is executed, it generates a report in the requested file, but the report contains no test results. It
just contains a table where it says that zero tests have been found. If I open the testsuites in that workspace in
Eclipse itself, it does show test results. So it seems that this piece of code somehow can not find the results of the
tests. Have I forgotten any property or are some properties badly used ?
Thanks a lot,
Thomas.
Code that generates the report
================================
public void generateTestReports(String eclipseDir) throws ParseException {
Properties properties = new Properties();
List<String> testResults = gatherAllTestResults();
properties.put("results", testResults);
properties.setProperty("report", "d:\\temp\\report\\result.html");
properties.setProperty("reportTemplateLocation",
" C:\\java\\ide\\321_tptp\\locations\\jboss-ide\\eclipse\\plug ins\\org.eclipse.tptp.test.report.birt_4.2.0.v200606131519\\ templates\\TestExecution.rptdesign ");
GregorianCalendar startDate = new GregorianCalendar();
GregorianCalendar endDate = new GregorianCalendar();
startDate.add(Calendar.YEAR, -1);
endDate.add(Calendar.YEAR, +1);
properties.setProperty("startDate", Long.toString(startDate.getTimeInMillis()));
properties.setProperty("endDate", Long.toString(endDate.getTimeInMillis()));
AutomationClientAdapter automation = new AutomationClientAdapter(eclipseDir);
automation.execute("org.eclipse.tptp.test.report.birt.publish-testsuites ", properties);
}
|
|
|
Re: Problems calling the TPTP publication service via Java [message #103696 is a reply to message #89121] |
Mon, 09 July 2007 10:56  |
Eclipse User |
|
|
|
Hi Thomas,
Are you able to generate BIRT report manually in the TPTP UI? If so,
please move up to the latest TPTP release:
http://www.eclipse.org/tptp/home/downloads/?ver=4.4.0
If the problem still persists, please open a defect under the
ASF.Runtime component:
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=TPTP%20A SF
Paul
"Thomas Spiessens" <thomas.spiessens@gmail.com> wrote in message
news:ekmes9$qua$1@utils.eclipse.org...
> Hi everyone,
> Im trying to call the publication service from a Java class, but it just
> won't succeed completely. The code that I use for calling the service can
> be found at the bottom of the post.
>
> The method gatherAllTestResults() will return a list of absolute pathnames
> of all the files with an .testsuite extension that have been found in the
> workspace.
> eclipseDir is the location where Eclipse has been installed.
>
> When this code is executed, it generates a report in the requested file,
> but the report contains no test results. It just contains a table where it
> says that zero tests have been found. If I open the testsuites in that
> workspace in Eclipse itself, it does show test results. So it seems that
> this piece of code somehow can not find the results of the tests. Have I
> forgotten any property or are some properties badly used ?
>
> Thanks a lot,
> Thomas.
>
>
>
>
>
> Code that generates the report
> ================================
>
> public void generateTestReports(String eclipseDir) throws ParseException {
> Properties properties = new Properties();
> List<String> testResults = gatherAllTestResults();
> properties.put("results", testResults);
> properties.setProperty("report", "d:\\temp\\report\\result.html");
> properties.setProperty("reportTemplateLocation",
> " C:\\java\\ide\\321_tptp\\locations\\jboss-ide\\eclipse\\plug ins\\org.eclipse.tptp.test.report.birt_4.2.0.v200606131519\\ templates\\TestExecution.rptdesign ");
> GregorianCalendar startDate = new GregorianCalendar();
> GregorianCalendar endDate = new GregorianCalendar();
> startDate.add(Calendar.YEAR, -1);
> endDate.add(Calendar.YEAR, +1);
> properties.setProperty("startDate",
> Long.toString(startDate.getTimeInMillis()));
> properties.setProperty("endDate",
> Long.toString(endDate.getTimeInMillis()));
> AutomationClientAdapter automation = new
> AutomationClientAdapter(eclipseDir);
> automation.execute("org.eclipse.tptp.test.report.birt.publish-testsuites ",
> properties);
> }
|
|
|
Powered by
FUDForum. Page generated in 0.38889 seconds