Automation Detection

TestIntel can detect which inventory tests have corresponding automation code in a repository. This links test management (Zephyr/Xray/Jira) to test automation (pytest, Playwright, Jest, etc.) without requiring manual tagging.

How it works

  1. Repo scan fetches test files from a GitHub repository
  1. Test extraction parses test names from the code (function names, scenario names, etc.)
  1. Fuzzy matching compares extracted names against inventory test names
  1. Update sets automation_status: "Automated" and adds a repo external key for matched tests

Tests with no repo match remain unchanged (typically "Not Planned" or "Manual").

Supported frameworks

LanguageFrameworksFile patternsExtraction
Pythonpytest, unittesttest_*.py, *_test.pydef test_* functions
JavaScript/TypeScriptJest, Mocha, Playwright*.spec.ts, *.test.jsit('...'), test('...')
JavaJUnit*Test.java@Test annotated methods
Gotesting*_test.gofunc Test* functions
C#xUnit, NUnit*Test.cs, *Tests.cs[Test], [Fact], [Theory] methods
GherkinCucumber, SpecFlow*.featureScenario: lines

Usage

API


# Scan the default project's repo
curl -X POST "http://localhost:8000/sync/repo/scan" \
  -H "x-api-key: your-key"

# Scan a specific repo
curl -X POST "http://localhost:8000/sync/repo/scan?repo=owner/repo&branch=main" \
  -H "x-api-key: your-key"

# Adjust match threshold (0.0-1.0, default 0.65)
curl -X POST "http://localhost:8000/sync/repo/scan?threshold=0.7" \
  -H "x-api-key: your-key"

Response


{
  "scanned": 42,
  "tests_found": 18,
  "matched": 12,
  "updated": 12,
  "matches": [
    {
      "repo_test": "Login valid",
      "repo_path": "tests/test_auth.py",
      "inventory_id": "TC-0001",
      "inventory_name": "Test1: Login with valid credentials",
      "similarity": 78
    }
  ]
}

Other automation signals

Results import

When test results (JUnit XML) are imported via upload, webhook, or S3 watcher, any inventory test that matches a result is automatically set to automation_status: "Automated". If a test produced a result, it was executed by automation.

Manual tagging

Tests can also be manually set to Automated/Manual via the API:


curl -X PUT "http://localhost:8000/inventory/TC-0001" \
  -H "x-api-key: your-key" \
  -H "Content-Type: application/json" \
  -d '{"automation_status": "Automated"}'

Matching details

Prerequisites