Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Additional CLI Commands and Operations for Fossil Test #53

Open
dreamer-coding opened this issue Jan 4, 2025 · 0 comments

Comments

@dreamer-coding
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
The current Fossil Test CLI provides useful commands, but there are still some key features that would improve the flexibility and convenience of testing, especially for advanced use cases like filtering tests, excluding specific cases, or managing test environments. Currently, some of these actions need to be manually managed or require external scripts, which can make workflows more cumbersome.

Describe the solution you’d like
I propose adding the following commands and operations to the Fossil Test CLI for greater control over the testing process:

  1. --filter=

Allows filtering tests based on a name pattern, tag, or description.
Example:

fossil_test --filter="database_*"

Description:
Only runs tests that match the provided pattern. Useful for running specific categories of tests without executing the entire suite.

  1. --exclude=

Excludes tests that match the provided pattern or tag.
Example:

fossil_test --exclude="slow_tests"

Description:
Skips any test whose name or tag matches the pattern. Handy for excluding known slow or irrelevant tests.

  1. --timeout=

Sets a global timeout for each test execution.
Example:

fossil_test --timeout=30

Description:
Terminates any test that exceeds the specified duration, ideal for catching long-running or hanging tests.

  1. --parallel=

Runs tests in parallel with a specified number of threads or processes.
Example:

fossil_test --parallel=4

Description:
Speeds up the test execution by parallelizing independent tests. Especially beneficial for large test suites.

  1. --tags=

Runs tests with specific tags assigned to them.
Example:

fossil_test --tags="performance,critical"

Description:
Only runs tests marked with the specified tags, offering more granular control over test selection.

  1. --report=

Generates a test report in the specified format.
Example:

fossil_test --report=html

Description:
Generates a human-readable report in the specified format, such as HTML, JSON, or plain text, for easy sharing and review.

  1. --clear-cache

Clears any cached data related to previous test runs.
Example:

fossil_test --clear-cache

Description:
Resets cached data (e.g., test results, environment settings), ensuring tests run with the most up-to-date configurations.

  1. --env=<key=value>

Sets custom environment variables for the test run.
Example:

fossil_test --env="DATABASE_URL=postgres://localhost/test"

Description:
Provides a way to set environment variables for the tests, useful for managing database connections, API keys, or other configuration parameters.

  1. --debug

Enables debug mode for more verbose output during test execution.
Example:

fossil_test --debug

Description:
Shows detailed information on test execution, including function calls, variable values, and stack traces, to assist with troubleshooting.

  1. --skip-failed

Skips any previously failed tests, only running new or passed ones.
Example:

fossil_test --skip-failed

Description:
If a test suite has previously failed, this command will skip the failed tests and only run those that were successful or new.

Describe alternatives you’ve considered
• Writing custom scripts for managing test selection, environment variables, and report generation. However, this approach is less portable and requires manual maintenance.
• Using external testing frameworks, but they often come with additional complexity or are not fully integrated with Fossil Test.

Additional context
These additional commands would increase flexibility and convenience for developers running complex or large test suites, especially in automated CI/CD pipelines, where fine-tuning of test runs is often required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant