Read test results file directly from Jenkins workspace

341 Views Asked by At

Requirement : From Jenkins workspace, I need to read the test results file (either .TRX or .xml) and further parse it to get the test data to create some analytics.

For now, I have copied the results file to my local folder & I am able to read & parse the file using Python.

My question is, can we directly read the file from Jenkins?

1

There are 1 best solutions below

0
On

Yes you can. Here is an example with a yaml file, but it also works with xml (readXml I believe):

config = readYaml (file: 'config.yaml')

println config
println config.thatever