Skip to content

Add --version flag. #69

@rodrigobahiense

Description

@rodrigobahiense

Is your feature request related to a problem? Please describe.

Yes. In CI environments, it can be difficult to verify that a runner is using the expected ddtest version. This can lead to inconsistent behavior across jobs or machines, especially when different environments may have different versions installed.

Without a simple way to check the installed version from the command line, CI scripts cannot reliably assert that they are running against the correct ddtest release before executing tests.

Describe the goal of the feature

Add a --version flag to ddtest, for example:

ddtest --version

The command should print the currently installed ddtest version and exit successfully.

This would allow CI runners to validate the installed version before running tests, improving reproducibility and consistency across pipelines. For example, a CI job could compare the reported version against the expected version and fail early if there is a mismatch.

Describe alternatives you've considered

One alternative is to inspect the installed package metadata directly, depending on the package manager or runtime environment. However, that approach is less portable and requires CI scripts to know how ddtest was installed.

Another option is to infer the version from lockfiles or installation logs, but that does not always guarantee which version is actually being executed by the runner.

A built-in --version flag would provide a simpler, more reliable, and standard way to perform this check.

Additional context

This is mainly intended to improve CI consistency. Our runners need a lightweight way to ensure they are executing the expected ddtest version before running the rest of the pipeline.

Many CLI tools support a --version flag, so this would also align ddtest with common command-line conventions.

How does ddtest help you?

We use ddtest as part of our automated testing workflow. Having a reliable CLI version check would make it easier to keep CI environments consistent and detect configuration or dependency issues early.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions