Bamboo TestParserTask: Could Not Find Test Results Reports

I wrote a bamboo plugin that is used to analyze custom test results (from a log file). For the plugin, I used this tutorial .

The log / results file is extracted from the previous task via ssh (yes, it works, I looked in the folder). But my plugin does not find the file:

Could not find test result reports in the $somewhere/xml-data/build-dir/LEAS-LD-SOT directory. 

There is a file in the specified path:

 % ls -lah $somewhere/xml-data/build-dir/LEAS-LD-SOT total 120 drwxr-xr-x 4 $user $group 136 27 Mรคr 15:27 . drwxr-xr-x 9 $user $group 306 27 Mรคr 02:45 .. -rw-r--r-- 1 $user $group 59043 27 Mรคr 15:27 test.log 

Code part:

 public class MyTestParserTask implements TaskType { private final TestCollationService testCollationService; public MyTestParserTask(TestCollationService testCollationService) { this.testCollationService = testCollationService; } @Override public TaskResult execute(TaskContext taskContext) throws TaskException { TaskResultBuilder taskResultBuilder = TaskResultBuilder.newBuilder(taskContext); testCollationService.collateTestResults(taskContext, "*", new MyTestReportCollector()); return taskResultBuilder.checkTestFailures().build(); } } 

For the template, I tried several options ( *.log , **.log , * , /*.log , ...), but to no avail.

For information only: the MyTestReportCollector class has this function:

 @Override public Set<String> getSupportedFileExtensions() { return Sets.newHashSet("log"); } 

On the atlassian ticket, I found a possible solution. It was proposed to change the timestamp of the file using the script to a newer one (+ 1 s). I tried this and the timestamp is set correctly, but this change does not help.

+6
source share

Source: https://habr.com/ru/post/984322/


All Articles