Skip to content

[πŸ’‘ Feature]: Allow presets and to customize the test run commandΒ #53

@nextlevelbeard

Description

@nextlevelbeard

Is your feature request related to a problem?

There are several use cases for having a one-click run with a custom commands.

Examples:
User uses want to debug a single test, therefore for a specific test I want to run with CLI flag --maxInstances 1 and my own custom CLI argument, I might want to run an npm script and not simply invoke the test-runner with the config.

Therefore, we could customize the command, making use of variables.

Describe the solution you'd like.

Have an option somewhere (VS Code extension option maybe)

customRunCommand: "npx wdio ${configFile} --spec "${specFile}:${specLineNumber}" --myCustomArg; echo "Done!"; curl -PUT example.com/done --data "{ done: true }"
or
customRunCommand: "npm run myscript"

When users chooses to run a specific test, the custom command runs, replacing the variables configFile, specFile and specLineNumber among others.

customRunCommand: "npx wdio cloud.wdio.conf.ts --spec "project/tests/myspec.spec.ts:123" --maxInstances 1 --myCustomArg; echo "Done!"; curl -PUT example.com/done --data "{ done: true }"

Describe alternatives you've considered.

No response

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions