Skip to content

Create record command for azpysdk CLI #44277

@mccoyp

Description

@mccoyp

We should support recording both tests and samples via a record verb in the azpysdk CLI. For example:

# Record pytest tests
azpysdk record test /path/to/test_file.py

# Record pytest tests with arguments
azpysdk record test /path/to/tests/ --pytest-args -v -k "test_name"

# Record a code sample
azpysdk record sample /path/to/sample.py

This should use our existing test recording infrastructure, e.g. @recorded_by_proxy, and adjust the environment as necessary to support sample recording in cases where the tooling is pytest-dependent. If it makes sense to decouple pytest from our tooling in some places, we can do that as part of this effort. For example, recording files are currently determined based on the PYTEST_CURRENT_TEST variable; we can either set this ourselves for samples or find another approach.

Metadata

Metadata

Assignees

Labels

EngSysThis issue is impacting the engineering system.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions