I've Implemented JUnit Xml Reporting Feature

Hi

I’ve implemented a small junit xml reporting feature on frappe’s rest_runner.py along with a new bench run-tests flag to provide the export path for the report. We thought this might be helpful for other devs who use Jenkins as their CI solution and want to run frappe/erpnext tests.

There is a pull request here: JUnit XML Reporting feature by DeveloperMetal · Pull Request #1995 · frappe/frappe · GitHub

And wanted to check with the frappe team if the few small changes I made are acceptable.

Below is a screen grab of our Jenkins server using the junit xml report this feature generated.

6 Likes

@rmbhatia, @anand: do you think it could be something to grab to Frappe trunk code base over time?

With this change, functional/unit testing framework of Frappe will support both Travis and JUnit-compatible platforms for continuos integrationg/deployment and testing (like Jenkins). This will IMHO help to drive quality of code in various ERP Next/Frappe applications being developed across the entire community.

2 Likes

@rmbhatia: thanks for the recent merge of JUnit XML Reporting feature by DeveloperMetal · Pull Request #1995 · frappe/frappe · GitHub into Frappe trunk codebase!

We will update the frappe guide on writing and running the tests with the relevant details on this feature soon.

Updated documentation- [Documentation update] - Update documentation for XML Report by safo-bora · Pull Request #2010 · frappe/frappe · GitHub

Thanks!

:nerd:

1 Like

@rmbhatia: could you please review and merge [Documentation update] - Update documentation for XML Report by safo-bora · Pull Request #2010 · frappe/frappe · GitHub to frappe trunk codebase?

Thank you.

@rmehta: excuse me if my question below sounds like a confusion.

We noticed some moves of the changes per [Documentation update] - Update documentation for XML Report by safo-bora · Pull Request #2010 · frappe/frappe · GitHub into the trunk codebase of frappe. However, the latest online documentation (https://frappe.github.io/frappe/user/en/guides/basics/writing-tests) does not seem to render the latest changes (like the detailed examples of the command usage etc.).

Could you please help us understand the current status of this change better?

Thank you.

@rmehta: thank you for the merge of this change into Frappe trunk earlier this day.