How to convert a generated text file to Junit format(XML) using Perl
I have a text file generated which is in the format:
Tests started on Fri Oct 19 14:11:35 2018
Test File Comparison Result
========= =================
abc.msg FAILED
aa.msg PASSED
bb.msg TO BE VALIDATED
Tests finished on Fri Oct 19 14:12:01 2018
Expected JUnit Format:
Please find attached the snip with the expected xml format
I want to convert the above text file after being generated from a Perl script to an XML file using a Perl script.
Any help would be appreciated. Thanks in advance!!

TAP::Formatter::JUnit has
tap2junitcommand that convert TAP format text into JUnit XML. All you have to do is to create a filter that can read your test result and convert it to TAP format, just like:custom2tap.pl
Save your test result as
customtest.txtthen runcat customtest.txt | perl custom2tap.pl | tap2junit -, you can have following output:Windows
Install Strawberry Perl, so that you can use
cpancommand.Install
TAP::Formatter::JUnitfrom command prompt:Run
type customtest.txt | perl custom2tap.pl | tap2junit -