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.
Community moderators have prevented the ability to post new answers.
Two things that might help you:
com.atlassian.bamboo.build.test
to ALL
download Bamboo source code and check JUnitResultParserTask
class for most up to date example
"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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.