How to convert xml files into excel through protractor.Any idea?

How to convert xml files into excel through protractor.Any idea?



I want the output of my protractor test reports in excel, right now its generating in HTML format. They are also generating in XML format. Any idea will be helpful and will be appreciated.
Thank you.





Currently no excel reports are generated by protractor or any other supported library of node js .... Any reason u want excel report ? Stiff job but you can read xml and write to xls file same data which you get from allure report
– Amit Jain
Aug 31 at 11:40





@Amit Thank you for replying. Actually i want to send this excel through email. Any word document will also work but not HTML or XML. I can work with reading xml and writing into excel as well however i have no idea,how to do it. If you can help me with it?
– Shruti
Aug 31 at 13:30





You create the problem by yourself. You can create a very beautiful report using for example Allure 2 docs.qameta.io/allure/#_jasmine , and send (if you strongly want) just a link to current report by email.
– Oleksii
Sep 2 at 17:17




1 Answer
1



What you are looking for is a karma reporter that will report the tests in an excel format and send an email with the results. Unfortunately, none exist, so you will have to create one yourself.



Fortunately, creating a karma reporter is easy, there exists many libraries that can generate excel files, and sending an email is easy with the nodemailer package.



First, creating a karma reporter, you can use the karma-growl-reporter as an example.



Second, the excel4node plugin seems to be fairly well maintained and feature-rich (I have not used it myself, so I can't exactly vouch for it).



Third, I already mentioned nodemailer, which can send an email with the results.



With these three pieces, it should be fairly straightforward to implement the reporter, but feel free to comment if you have any questions.





Thank you @Andrew Eisenberg for the solution. I have one question, can we use excel4node with jasmine html reporter?
– Shruti
Sep 3 at 7:54





As i googled, i got to know that we can create reports in xml as well and then we can read it and write it in excel. what you guys think? but i want to know, how to read xml in protractor
– Shruti
Sep 3 at 9:52





There's no reason why you can't use excel4node in a jasmine reporter. The reporter just runs as part of a node process and you can do anything you need to in there. It might be easier to read and write xml than excel. You can use something like npmjs.com/package/xmlbuilder to build your xml document.
– Andrew Eisenberg
Sep 3 at 16:40



Thanks for contributing an answer to Stack Overflow!



But avoid



To learn more, see our tips on writing great answers.



Some of your past answers have not been well-received, and you're in danger of being blocked from answering.



Please pay close attention to the following guidance:



But avoid



To learn more, see our tips on writing great answers.



Required, but never shown



Required, but never shown




By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)