Getting last test names + duration on the agent
I would like to write my agent to access the tests of the last build.
The thing I would like to do is proving the agent a list with test names and duration. Can I use this:
I thought about using a ParametersPreprocessor and do it that way:
public void fixRunBuildParameters(@NotNull SRunningBuild runningBuild, @NotNull Map<String, String> runParameters, @NotNull Map<String, String> buildParameters) {
SBuildType buildType = runningBuild.getBuildType();
List<SFinishedBuild> lastBuilds = buildType.getHistory(null, true, false);
...
_WriteListToFile(...);
buildParameters.put(TEST_LIST_FILE, filePath);
}
Where will this extension be execeted, on the server or agent side?
Could I do the same in the agent plugin itself? Can the agent access the Build- Server that way?
Best Regards,
Oliver Klemencic
Please sign in to leave a comment.
Oliver,
Sorry for the delay in replying.
Could you please detail what is your final intent? Do you need to pass a string to the agent as a build property to later process it in your build script?
How do you plan to get the text to pass?
As to ParametersPreprocessor - it is executed on the server before the build is sent to the agent.
--
Best regards,
Yegor Yarko
Project Manager (TeamCity)
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
You can pass file path via the build properties but this will only work if agent and server are working on the same PC.