1

I am planning to put my organization's test run results into the ELK stack for analysis and have had no luck finding any code to leverage.

I've downloaded and analyzed a variety of xunit xml outputs and have noted that there are variations in the format, which is kind of a bummer.

I am using python and have found code to simply convert xml to json that works well (xmltodict). Perhaps I can just send whichever json-from-xml format I get to elastic search? I worry that I might not know how to make an elastic search index capable to handling a variable format.

I guess I am looking at either sending them to elastic search 'as is' post conversion or I will need to find a way to make a common format from the various ones I am seeing out there... python xunit, .NET xunit, junit, etc

Any ideas welcome. This sounded so easy before I really got a look at it :)

chrismead
  • 1,833
  • 2
  • 17
  • 26

1 Answers1

0

I am doing this myself and have a put enough work into it that I can't share the code that employer owns, but here are some tips if you are using python:

chrismead
  • 1,833
  • 2
  • 17
  • 26
  • 1
    How did you end up structuring the document? We also want to store xUnit reports in ES but struggling a bit with nested objects. Just storing them is not a problem but if you want to query later the index and visualize some reports (eg. most long running tests, test duration between X and Y seconds, etc.) is not really easy. – Martin Jan 29 '19 at 09:57
  • We are also in the process of converting junit XML output to json and pushing that to ELK for Kibana reporting. Our XML output is gigantic, so we'll just be cherry picking a few relevant fields (pass/fail, etc.) into the json. Are you all doing something similar to this, or are you grabbing the whole mess into json and pushing it to ELK? – rcronk Mar 07 '19 at 16:47