A comprehensive tool for managing Azure DevOps test points with XML integration and fuzzy matching capabilities.
- Test Point Management: List, filter, and update test points from Azure DevOps test plans and suites
- XML Integration: Parse JUnit/pytest XML test results and automatically update test points
- Fuzzy Matching: Intelligent matching between XML test names and Azure DevOps test case names
- Multiple Output Formats: Console, JSON, and CSV output support
- Flexible Filtering: Filter test points by outcome, automation status, state, and name patterns
- Bulk Operations: Update multiple test points efficiently with batch operations
- Dry Run Mode: Preview changes before applying them
- Environment Configuration: Secure credential management through environment variables
pip install azure-devops-test-managergit clone https://github.com/iqbaljunaid/azure-devops-test-manager.git
cd azure-devops-test-manager
pip install -e .git clone https://github.com/iqbaljunaid/azure-devops-test-manager.git
cd azure-devops-test-manager
pip install -e ".[dev]"Set up your Azure DevOps credentials as environment variables:
export AZURE_DEVOPS_PAT="your_personal_access_token"
export AZURE_DEVOPS_ORG="https://dev.azure.com/yourorg"
export AZURE_DEVOPS_PROJECT="Your Project Name"# List all test points in a test plan
azure-devops-test-manager 12345
# List test points for a specific suite with details
azure-devops-test-manager 12345 67890 --detailed
# Update test points from XML results
azure-devops-test-manager 12345 --from-xml test-results.xml
# Preview updates without applying them
azure-devops-test-manager 12345 --update-outcome Passed --dry-run# List all test points in a test plan
azure-devops-test-manager 679333
# List test points for a specific suite
azure-devops-test-manager 679333 679334
# Get detailed test case information (slower)
azure-devops-test-manager 679333 --detailed
# Export results to different formats
azure-devops-test-manager 679333 --output json
azure-devops-test-manager 679333 --output csv# Update all test points to "Passed"
azure-devops-test-manager 679333 --update-outcome Passed
# Update only specific outcomes
azure-devops-test-manager 679333 --update-outcome Passed --filter-outcome Failed
# Update only automated tests
azure-devops-test-manager 679333 --update-outcome Passed --filter-automated true
# Add comments to updates
azure-devops-test-manager 679333 --update-outcome Passed --comment "Fixed in latest build"
# Preview changes before applying
azure-devops-test-manager 679333 --update-outcome Passed --dry-runThe tool can parse JUnit/pytest XML test results and automatically update test points:
# Update test points based on XML results
azure-devops-test-manager 679333 --from-xml test-results.xml
# Preview XML-based updates
azure-devops-test-manager 679333 --from-xml test-results.xml --dry-run
# Update specific suite with higher matching threshold
azure-devops-test-manager 679333 679334 --from-xml test-results.xml --min-score 90
# Add comment to XML-based updates
azure-devops-test-manager 679333 --from-xml test-results.xml --comment "Updated from CI pipeline"# Check current configuration
azure-devops-test-manager --show-config
# Get help
azure-devops-test-manager --helpYou can also use the tool programmatically:
from azure_devops_test_manager import AzureTestPointManager
# Initialize manager
manager = AzureTestPointManager()
# List test points
test_points = manager.list_test_points_for_plan(plan_id=12345)
# Update from XML results
results = manager.update_from_test_results(
plan_id=12345,
xml_file_path="test-results.xml",
comment="Updated from automated tests"
)
print(f"Updated {results['total_updated']} test points")
# Update specific test point
manager.update_test_point_outcome(
plan_id=12345,
suite_id=67890,
point_id=123,
outcome="Passed",
comment="Manual verification complete"
)The tool supports configuration through environment variables:
| Variable | Description | Default |
|---|---|---|
AZURE_DEVOPS_PAT |
Personal Access Token (Required) | None |
AZURE_DEVOPS_ORG |
Organization URL | https://azure-devops.visualstudio.com |
AZURE_DEVOPS_PROJECT |
Project Name | Project_NAME |
Your Azure DevOps Personal Access Token needs the following permissions:
- Test Management: Read & Write
- Work Items: Read (for detailed test case information)
The tool supports standard JUnit/pytest XML formats. Example:
<?xml version="1.0" encoding="utf-8"?>
<testsuites>
<testsuite name="pytest" tests="3" failures="1" skipped="1">
<testcase classname="tests.test_example" name="test_success" time="0.001"/>
<testcase classname="tests.test_example" name="test_failure" time="0.002">
<failure message="AssertionError">Test failed</failure>
</testcase>
<testcase classname="tests.test_example" name="test_skip" time="0.000">
<skipped message="Skipped test"/>
</testcase>
</testsuite>
</testsuites>XML test results are mapped to Azure DevOps outcomes as follows:
| XML Result | Azure DevOps Outcome |
|---|---|
passed |
Passed |
failed |
Failed |
error |
Failed |
skipped |
Blocked |
The tool uses fuzzy string matching to correlate XML test names with Azure DevOps test case names:
- Clean Name Matching: Removes common prefixes like
test_ - Partial Matching: Handles partial name matches
- Token Sort Matching: Flexible word order matching
- Configurable Threshold: Minimum similarity score (default: 80%)
git clone https://github.com/yourusername/azure-devops-test-manager.git
cd azure-devops-test-manager
pip install -e ".[dev]"pytestblack src testsmypy srcpython -m build- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
See CHANGELOG.md for a list of changes and version history.
- Issues: GitHub Issues
- Documentation: Read the Docs
- Discussions: GitHub Discussions
- Built with requests for HTTP API calls
- Uses fuzzywuzzy for intelligent name matching
- XML parsing with BeautifulSoup
- Inspired by the need for better integration between test automation and Azure DevOps test management