For Builds that never ran the "client" object will be "null" and when we call getTestReport() results in NPE
the issue occurs when using the code as below:
final JenkinsServer server = new JenkinsServer(URI.create(url));
JobWithDetails job = server.getJob(jobName);
job.getLastBuild().getTestReport();
we can avoid that by additional check using job.getLastBuild() != Build.BUILD_HAS_NEVER_RUN to avoid it. but it is upto the developer.
Consider returning null or placeholder Indicator in TestReport.java similar to Build.BUILD_HAS_NEVER_RUN when the build has never ran.
For Builds that never ran the "client" object will be "null" and when we call getTestReport() results in NPE
the issue occurs when using the code as below:
final JenkinsServer server = new JenkinsServer(URI.create(url));
JobWithDetails job = server.getJob(jobName);
job.getLastBuild().getTestReport();
we can avoid that by additional check using job.getLastBuild() != Build.BUILD_HAS_NEVER_RUN to avoid it. but it is upto the developer.
Consider returning null or placeholder Indicator in TestReport.java similar to Build.BUILD_HAS_NEVER_RUN when the build has never ran.