Bamboo TestParserTask: Could not find test result reports
Asked Answered
E

0

6

I wrote a bamboo plugin which is used for custom test results parsing (from a logfile). For the plugin I used this tutorial.

The log/results file is fetched from a previous task via ssh (yes it works, I looked into the folder). But my plugin doesn't find the file:

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

In the mentioned path there is the file:

% 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

The 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 pattern I tried several variants (*.log, **.log, *, /*.log, ...) but without success.

Just for the info: The MyTestReportCollector class has this function:

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

In atlassian ticket I found a possible solution. There was the suggestion to change the timestamp of the file via script to a newer one (+1s). I tried this and the timestamp is set correctly but this change doesn't help.

Engelbert answered 27/3, 2015 at 15:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.