I've been thinking if there is a tool that can help with the creation of azure user stories based on the clasess available in code coverage under c# project? What I wanted to happen is:
- Setup runsetting file for c# project
- Run the Code Coverage
- All classess that needs coverage will automatically create user stories in ADO
this will be helpful before starting committing the start of unit testing.
i havent tried and but im asking if there is an existing app for this or something similar available? Im planning to create one as well if this is possible
I am afraid that there is no out-of-box method can automatically create User Story Work item based on whether the class runs code coverage.
For a workaround, we can use the script to read the .coverage file(generate after running code coverage) and get class name to create the work item.
Here are the steps:
Step1: Covert the
.coveragefile to.coveragexmlfile with the following command:.coveragexml sample:
Step2: Add powershell task and use PowerShell script to read the .coveragexml file and get all class names. Then we can use the Rest API: Work Items - Create to create the work item.
PowerShell script sample:
Result: