Javatest 4.1.3_b05. Should be reproducible starting from version jt4.0fcs
1. Create an implementation of the com.sun.javatest.report.CustomReport.
2. implement method createReport(File) in such a way that you'll try to access a com.sun.javatest.report.CustomReport.ReportEnviroment.getIp() method. It should return you a valid instance of InterviewParameters, that is associated with the current TestSession. Using this object you can get further access to TestSuite and other objects.
3. Override and implement com.sun.javatest.exec.ContextManager.getCustomReports() method to "activate" yourCustomReport.
4. Launch Javatest Harness. Open TestSuite, Working Directory, Configuration.
5. Run Report/Create Report. Check yourCustomReport exists in the list. Try to create it and check (with System.out.println() or debugger) that com.sun.javatest.report.CustomReport.ReportEnviroment.getIp() method returns you a valid object.
6. Now try to invoke a Tools/Report Converter. Check yourCustomReport is there.
7. Try to create this report. Now com.sun.javatest.report.CustomReport.ReportEnviroment.getIp() returns NULL.
This is a bug. It should return a valid instance of Interview in the same was as Report/Create Report does.
As a result - it's impossible to use a Custom Report if it's relying on the ReportEnvironment#getIp() method.
1. Create an implementation of the com.sun.javatest.report.CustomReport.
2. implement method createReport(File) in such a way that you'll try to access a com.sun.javatest.report.CustomReport.ReportEnviroment.getIp() method. It should return you a valid instance of InterviewParameters, that is associated with the current TestSession. Using this object you can get further access to TestSuite and other objects.
3. Override and implement com.sun.javatest.exec.ContextManager.getCustomReports() method to "activate" yourCustomReport.
4. Launch Javatest Harness. Open TestSuite, Working Directory, Configuration.
5. Run Report/Create Report. Check yourCustomReport exists in the list. Try to create it and check (with System.out.println() or debugger) that com.sun.javatest.report.CustomReport.ReportEnviroment.getIp() method returns you a valid object.
6. Now try to invoke a Tools/Report Converter. Check yourCustomReport is there.
7. Try to create this report. Now com.sun.javatest.report.CustomReport.ReportEnviroment.getIp() returns NULL.
This is a bug. It should return a valid instance of Interview in the same was as Report/Create Report does.
As a result - it's impossible to use a Custom Report if it's relying on the ReportEnvironment#getIp() method.