Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » Problems calling the TPTP publication service via Java
Problems calling the TPTP publication service via Java [message #89121] Thu, 30 November 2006 11:21 Go to next message
Eclipse UserFriend
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 14:56 Go to previous message
Paul Slauenwhite is currently offline Paul SlauenwhiteFriend
Messages: 975
Registered: July 2009
Senior Member
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);
> }
Previous Topic:Test suites on TPTP???
Next Topic:[AGR] Hang problem when running many tests with the ant <tptp:execution> task
Goto Forum:
  


Current Time: Thu Apr 25 04:20:26 GMT 2024

Powered by FUDForum. Page generated in 0.02538 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top