Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bamboo TestParserTask: Could not find test result reports

Deleted user March 27, 2015

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 cgiesel  staff   136B Mar 27 15:34 ./
drwxr-xr-x  9 cgiesel  staff   306B Mar 27 02:45 ../
-rw-r--r--  1 cgiesel  staff    58K Mar 27 15:34 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.

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Krystian Brazulewicz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 30, 2015

Two things that might help you:

  • set logging on package com.atlassian.bamboo.build.test to ALL
  • download Bamboo source code and check JUnitResultParserTask class for most up to date example

 

Asa Riley May 29, 2018

"download Bamboo source code and check JUnitResultParserTask class for most up to date example" I would love to do this, but I can't seem to find this source anywhere. Can you point me in the right direction? 

TAGS
AUG Leaders

Atlassian Community Events