convert-autest-to-urtest
Skill2k starsChanged 3 days agoApache-2.0View on GitHub
Convert Apache Traffic Server AuTests to pytest Uranium tests while preserving coverage, assertions, and process lifecycle. Use for explicit test migrations and for newly added or updated AuTests encountered during a requested Uranium-branch rebase.
We split this skill into the rules it gives an agent
20 rules. About 0 are common, 8 are distinctive, and 12 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 33
Read the repository's applicable instructions and these current sources:
- Distinctive: line 41
Treat those sources as authoritative if API details below have changed.
- Distinctive: line 50
Every case, parameter variation, capability gate, and manual-only condition.
- Very specific: line 65
Prefer a self-contained <scenario>.test.yaml: put Proxy Verifier traffic and the urtest: orchestration in the same file.
- Very specific: line 71
Use a native test_*.py when special client/server behavior is necessary, such as raw malformed messages, controlled disconnects, TLS …
- Distinctive: line 92
Wait for the exact content the assertion needs, not an arbitrary number of log lines or a fixed sleep.
- Very specific: line 102
Use fixture-managed directories and allocated ports.
- Very specific: line 109
Use the shared gold comparison in tools.uranium.assertions or stream matches_gold().
- Very specific: line 115
Keep default ATS log validation unless the test intentionally produces errors.
- Distinctive: line 126
Keep capability-based skips distinct from manual selection.
- Very specific: line 130
Use explicit stdout/stderr methods: contains(expression, explanation), excludes(expression, explanation), and matches_gold(path).
- Very specific: line 133
Use the ATS-aware curl interface so Unix-domain-socket configuration survives: curl.run_for(ats, arguments_string, timeout=seconds) or …
- Very specific: line 139
Check actual configuration-copy path resolution and supported placeholders.
- Very specific: line 140
Do not invent placeholder names or assume every directory named replay_* resolves relative assets like the conventional replay/ or replays/ …
- Very specific: line 142
Use current feature/plugin requirement checks.
- Distinctive: line 154
Search the entire test tree for leftover wrappers:
- Distinctive: line 166
Use the repository's build and test documentation when building or running ATS.
- Distinctive: line 167
If using an available build/test skill, prefer the current Uranium wrapper and its help over older AuTest flags.
- Very specific: line 171
Run from the configured build's tests directory.
- Very specific: line 179
Use pytest -k for filtering and -n for parallelism, not legacy -f/-j.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->Convert AuTest to Uranium
Produce equivalent, maintainable tests—not merely a passing replacement. This skill does not authorize rebases, commits, pushes, or production fixes beyond the user's request.
Establish the current framework
Read the repository's applicable instructions and these current sources:
doc/developer-guide/testing/uranium-tests.en.rst: replay schema and execution.doc/developer-guide/testing/uranium-api.en.rst: fixtures and service APIs.tests/tools/uranium/README.md: framework responsibilities and code flow.- The relevant implementations in
tests/tools/uranium/services/and a nearby converted test with similar behavior.
Treat those sources as authoritative if API details below have changed. Do not restore an AuTest compatibility backend or follow older AuTest authoring advice where it conflicts with the migration. Obtain the original test from Git when its working-tree copy has already been deleted or moved.
Inventory behavior before translating
For each original test, account for:
- Every case, parameter variation, capability gate, and manual-only condition.
- Process startup dependencies, readiness, shutdown, and state shared between runs.
- Requests and wire behavior, including malformed traffic, timing, and half-closes.
- Return codes, positive and negative output assertions, gold files, diagnostics, metrics, and access-log counts.
- Helpers, certificates, plugin builds, replay files, and other required assets.
Map each original assertion to its replacement. Inspect what the old assertion actually checked; a historical green result can be a false positive. Do not weaken expectations, add an xfail, or replace executable coverage with a skip to make a conversion pass. Report a demonstrated production bug separately if its fix is outside the requested scope.
Choose the test form
Prefer a self-contained <scenario>.test.yaml: put Proxy Verifier traffic and
the urtest: orchestration in the same file. Basic curl and microserver tests
often fit this form. Remove an old replay wrapper only after its configuration,
assertions, and lifecycle have all been represented. Avoid introducing a separate
replay file unless it genuinely needs to be shared.
Use a native test_*.py when special client/server behavior is necessary, such
as raw malformed messages, controlled disconnects, TLS session save/resume,
live reconfiguration, or functionality Proxy Verifier cannot express. Use plain
test_* functions taking fixtures, small helper functions, and parametrization
for independent variations. Classes are appropriate for stateful services, not
mandatory scenario wrappers with a run() entry point.
Preserve intentional state across cache priming/hit checks, session resumption, and reload sequences. Splitting these into independent fixture instances changes the test. Follow the surrounding directory layout and update asset paths.
Preserve the difficult semantics
Process lifetime and synchronization
- Compare AuTest run boundaries with Uranium cleanup explicitly. AuTest may stop
a per-run origin before later metric checks; Uranium may keep it alive until
final cleanup. For direct replays that require this, the current
urtest.server.stop_after_client: truestops the origin before metrics/file checks. Do not enable it indiscriminately. Preserve crash detection before an intentional stop and validate process output afterward. - Wait for the exact content the assertion needs, not an arbitrary number of log lines or a fixed sleep. A client completing 13 requests does not mean all 13 access-log entries have flushed. Metric checks may need one snapshot containing all expected values.
- For asynchronous reloads, establish completion of the root operation, not just a successful child task or a superficially successful CLI summary. Verify the relevant behavior before and after the change.
- Diagnose protocol hangs before increasing timeouts. Preserve framing, Content-Length, half-close/drain behavior, and the connection reuse that causes the condition under test.
- Use fixture-managed directories and allocated ports. Preserve serial/exclusive
execution requirements; update
tests/serial_tests.txtwhen paths change.
Assertions and controls
- Preserve regex semantics. An old expression such as
PR.must not become a literal substring check. Keep exact counts and exclusions where meaningful. - Use the shared gold comparison in
tools.uranium.assertionsor streammatches_gold(); do not introduce another comparison implementation. - Retain positive controls in rejection tests: successful same-SNI resumption alongside cross-SNI rejection, valid padded frames alongside invalid padding, or permitted connection reuse alongside forbidden reuse. A failed request alone may only prove the test setup is broken.
- Keep default ATS log validation unless the test intentionally produces errors.
Both replay tests and
ATS.close()in procedural tests fail onERROR:,FATAL:orUnrecognized configuration valuein diags.log, as AuTest'sMakeATSProcessdid. An AuTest that setdisable_log_checksmaps toats_factory.create(..., disable_log_checks=True)or the replayprocess_config;FATAL:still fails a procedural test unless it usesexpect_start_failure(). Relax only the cases the original relaxed. An original that excluded all but specific errors maps toats.allow_errors(); do not blanket-disable diagnostics to get a pass. - Preserve real implementations of intentionally disabled diagnostic tests with
@pytest.mark.manualorurtest.manual, runnable with--run-manual. Keep capability-based skips distinct from manual selection.
API translation pitfalls
- Use explicit
stdout/stderrmethods:contains(expression, explanation),excludes(expression, explanation), andmatches_gold(path). Do not use+=or replace the stream object. Usereset()only for intentional replacement. - Use the ATS-aware curl interface so Unix-domain-socket configuration survives:
curl.run_for(ats, arguments_string, timeout=seconds)orcurl.get(ats, ...). Curl accepts a shell-style argument string; do not assume every command API has that signature. CheckATS.runversusATS.run_shellexplicitly. - Launch Python helpers with
sys.executable, not a hardcodedpython3, to keep them in the test interpreter's environment. - Check actual configuration-copy path resolution and supported placeholders.
Do not invent placeholder names or assume every directory named
replay_*resolves relative assets like the conventionalreplay/orreplays/folder. - Use current feature/plugin requirement checks. Document function parameters
with
:param name:and timeout units in seconds.
Additional audit during a requested rebase
Compare upstream test changes between the previous base and the new base,
including modified existing tests—not only newly added files. Rename/delete
conflicts from gold_tests to uranium_tests require a semantic comparison;
blindly selecting either side can silently discard coverage.
Retain new helpers and assets, migrate new assertions/configuration into existing Uranium tests, and update test-plugin CMake registrations and serial-test paths. Search the entire test tree for leftover wrappers:
rg --files tests -g '*.test.py'Review matches individually. Do not search only the migrated directory: a newly
added upstream directory can remain under gold_tests. Do not replace this with
a broad ban on all Python filenames ending in test.py.
Verify and report
Use the repository's build and test documentation when building or running ATS. If using an available build/test skill, prefer the current Uranium wrapper and its help over older AuTest flags. Respect the user's chosen environment; discover container mount and build paths rather than assuming a previous task's paths apply.
Run from the configured build's tests directory. For an already-running test
container, an example is:
./urtest.sh --no-run-in-container --collect-only -k '<expression>'
./urtest.sh --no-run-in-container -v -n 8 -k '<expression>'Use pytest -k for filtering and -n for parallelism, not legacy -f/-j.
Confirm collection includes the intended cases and execution did not merely skip
them. Test changed cases plus controls affected by shared helpers. Repeat timing-
sensitive cases when warranted; report failures rather than rerunning until a
single green run conceals them. Run a full suite when requested or proportionate
to a broad change.
For framework changes, add focused harness tests for both existing/default and
new behavior. Run applicable replay validation, self-contained replay, native
inventory, and no-wrapper checks in tests/tools/uranium/tests/; do not hardcode
inventory counts. Format changed code and build docs when documentation changes.
Summarize converted cases, semantic differences or newly exposed bugs, exact verification results, and any untested capabilities. Preserve requested failure artifacts or inspection sandboxes; clean only task-owned scratch artifacts when appropriate. Follow separate commit/push instructions only when authorized.
Trending
More talk lately.about the whole repository
Who's talking about apache/trafficserver
- Stack Overflow“What is significance/use of doing void(param); at the start of function?”Stack Overflow · Mar 6, 2010 · 5 votes
- openssl/openssl“Deprecate BIO_meth_get_*”GitHub · Nov 25, 2024 · 2 reactions
- Stack Overflow“How to make older versions of clang happy with atomic's default exception specification”Stack Overflow · Mar 29, 2021 · 2 votes
- Stack Overflow“What is a git commit that has "tree" in the output?”Stack Overflow · Mar 2, 2021 · 2 votes
- Stack Overflow“clang-tidy: what might cause NOLINT comments to not be respected?”Stack Overflow · Jun 25, 2020 · 2 votes
The biggest 5 of 57 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 57
Talked about on GitHub and Stack Overflow (57 times).
On GitHub · 50
- Nov 25, 2024Deprecate BIO_meth_get_* — openssl/openssl2 reactions · 1 comment
- Jun 11, 2026Fast Huffman decoder accepts padding longer than 7 bits (RFC 7541 §5.2) and disagrees with the full decoder — litespeedtech/ls-hpack1 reaction
- Oct 29, 2026Update module golang.org/x/net to v0.62.0 [SECURITY] — grafana/go-oidc0 reactions · 3 comments
- Oct 29, 2026Update module golang.org/x/net to v0.62.0 [SECURITY] — grafana/kafka_exporter0 reactions · 1 comment
- Oct 29, 2026Update module golang.org/x/net to v0.62.0 [SECURITY] — grafana/node_exporter0 reactions · 3 comments
45 more on GitHub
- Oct 29, 2026Update module golang.org/x/net to v0.62.0 [SECURITY] — grafana/cadvisor0 reactions · 2 comments
- Oct 29, 2026Update module golang.org/x/net to v0.62.0 [SECURITY] — grafana/cadvisor0 reactions · 3 comments
- Oct 26, 2026CVE-2023-44487 SNYK-UBUNTU2204-NGHTTP2-5954819 — RADAR-base/radar-helm-charts0 reactions
- Oct 24, 2026Update module golang.org/x/net to v0.55.0 [SECURITY] — drone-plugins/drone-matrix0 reactions · 1 comment
- Oct 24, 2026Update module golang.org/x/net to v0.55.0 [SECURITY] — uhthomas/renovate197560 reactions · 1 comment
- Oct 24, 2026Update module golang.org/x/net to v0.55.0 [SECURITY] — sarvex/build-go-microservices0 reactions · 1 comment
- Oct 24, 2026Update module golang.org/x/net to v0.55.0 [SECURITY] — vergissberlin/go-tutorial-grpc0 reactions · 1 comment
- Oct 24, 2026Update module golang.org/x/net to v0.55.0 [SECURITY] — FairwindsOps/gemini0 reactions · 1 comment
- Oct 24, 2026Update module golang.org/x/net to v0.55.0 [SECURITY] — FairwindsOps/gonogo0 reactions · 2 comments
- Oct 24, 2026Update module golang.org/x/net to v0.55.0 [SECURITY] — uhthomas/renovate207060 reactions · 1 comment
- Oct 20, 2026Update module golang.org/x/net to v0.55.0 [SECURITY] — svetlimladenov/CollegeSystems0 reactions · 1 comment
- Oct 20, 2026Update module golang.org/x/net to v0.55.0 [SECURITY] — go-x-pkg/servers0 reactions · 1 comment
- Oct 20, 2026[chore/dependency] Update module golang.org/x/net to v0.55.0 [SECURITY] — vijaynallagatla/cli-stocks0 reactions · 1 comment
- Oct 20, 2026Update module golang.org/x/net to v0.55.0 [SECURITY] — drone-plugins/drone-github-release0 reactions · 1 comment
- Oct 20, 2026Update module golang.org/x/net to v0.55.0 [SECURITY] — katsuharu/household-account-book0 reactions · 1 comment
- Oct 20, 2026Update module golang.org/x/net to v0.55.0 [SECURITY] — Clivern/Koala0 reactions · 1 comment
- Oct 19, 2026CVE-2023-44487 SNYK-UBUNTU2204-NGHTTP2-5954819 — RADAR-base/radar-helm-charts0 reactions
- Oct 16, 2026chore(deps): Update module golang.org/x/net to v0.55.0 [SECURITY] — GoogleCloudPlatform/terraform-pubsub-integration-java0 reactions · 1 comment
- Oct 16, 2026chore(deps): update module golang.org/x/net to v0.55.0 [security] — mmengspv/tracetest-otel0 reactions · 1 comment
- Oct 16, 2026Update module golang.org/x/net to v0.55.0 [SECURITY] — highb/grafana-ds-seattle-opendata0 reactions · 1 comment
- Oct 15, 2026Update module golang.org/x/net to v0.60.0 [SECURITY] — omercnet/pgweb0 reactions · 1 comment
- Oct 15, 2026Update module golang.org/x/net to v0.55.0 [SECURITY] — deepch/RTSPtoWebRTC0 reactions · 1 comment
- Oct 13, 2026Update module golang.org/x/net to v0.55.0 [SECURITY] — lexicoder/woven-planet-devops-challenge0 reactions · 1 comment
- Oct 13, 2026chore(deps): update module golang.org/x/net to v0.55.0 [security] — bdhave/vault4summon0 reactions · 2 comments
- Oct 13, 2026chore(deps): update module golang.org/x/net to v0.55.0 [security] — TejaBeta/kubectl-istiolog0 reactions · 1 comment
- Oct 13, 2026chore(deps): update module golang.org/x/net to v0.62.0 [security] — DoodleScheduling/gh-bootstrap-repository0 reactions · 1 comment
- Oct 13, 2026Update module golang.org/x/net to v0.55.0 [SECURITY] — Qs-F/gen0 reactions · 1 comment
- Oct 13, 2026Update module golang.org/x/net to v0.55.0 [SECURITY] — deepch/vdk0 reactions · 1 comment
- Oct 13, 2026chore(deps): update module golang.org/x/net to v0.55.0 [security] — uhthomas/tesla_exporter0 reactions · 1 comment
- Oct 13, 2026chore(deps): update module golang.org/x/net to v0.55.0 [security] — hitokoto-osc/sentence-generator0 reactions · 1 comment
- Oct 13, 2026chore(deps): update module golang.org/x/net to v0.55.0 [security] — stenic/ledger0 reactions · 1 comment
- Oct 13, 2026Update module golang.org/x/net to v0.55.0 [SECURITY] — Clivern/Mammal0 reactions · 1 comment
- Oct 13, 2026Update module golang.org/x/net to v0.55.0 [SECURITY] — gepaplexx/multena-rbac-collector0 reactions · 1 comment
- Oct 13, 2026chore(deps): update module golang.org/x/net to v0.38.0 [security] — ti-community-infra/tichi0 reactions · 3 comments
- Oct 13, 2026chore(deps): update module golang.org/x/net to v0.55.0 [security] — super-flat/parti0 reactions · 1 comment
- Oct 13, 2026chore(deps): update module golang.org/x/net to v0.55.0 [security] — omegion/ssh-manager0 reactions · 2 comments
- Oct 13, 2026Update module golang.org/x/net to v0.55.0 [SECURITY] — pmpplatform/kanister-exporter0 reactions · 1 comment
- Oct 13, 2026Update module golang.org/x/net to v0.55.0 [SECURITY] — turbine-kreuzberg/ingress-waf-admission-controller0 reactions · 1 comment
- Oct 13, 2026chore(deps): update module golang.org/x/net to v0.55.0 [security] — penguin-statistics/gommon0 reactions · 1 comment
- Oct 13, 2026chore(all): update module golang.org/x/net to v0.55.0 [SECURITY] — openconfig/grpctunnel0 reactions · 1 comment
- Oct 12, 2026CVE-2023-44487 SNYK-UBUNTU2204-NGHTTP2-5954819 — RADAR-base/radar-helm-charts0 reactions
- Oct 5, 2026CVE-2023-44487 SNYK-UBUNTU2204-NGHTTP2-5954819 — RADAR-base/radar-helm-charts0 reactions
- Sep 28, 2026CVE-2023-44487 SNYK-UBUNTU2204-NGHTTP2-5954819 — RADAR-base/radar-helm-charts0 reactions
- Sep 21, 2026CVE-2023-44487 SNYK-UBUNTU2204-NGHTTP2-5954819 — RADAR-base/radar-helm-charts0 reactions
- Sep 14, 2026CVE-2023-44487 SNYK-UBUNTU2204-NGHTTP2-5954819 — RADAR-base/radar-helm-charts0 reactions
On Stack Overflow · 7
- Mar 6, 2010What is significance/use of doing void(param); at the start of function?5 votes · 1 answer
- Mar 29, 2021How to make older versions of clang happy with atomic's default exception specification2 votes · 1 answer
- Mar 2, 2021What is a git commit that has "tree" in the output?2 votes · 2 answers
- Jun 25, 2020clang-tidy: what might cause NOLINT comments to not be respected?2 votes · 1 answer
- Apr 19, 2024How does one get c macro stringification to work with a tick?0 votes · 2 answers
2 more on Stack Overflow
- Aug 3, 2015How to push object in apache trafficserver0 votes
- Dec 10, 2013Load Balancing with Apache Traffic Server0 votes
In this repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/writing-autests.mdcCursor rule
- ats-buildSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

