[💡 Feature]: Allow presets and to customize the test run command

Aperta
#53 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
typescript, vscode

Direzione di ricerca

The issue asks for a setting, such as customRunCommand, that replaces the extension's built-in test run command with a user-defined one. Its placeholders are configFile, specFile and specLineNumber. Start by finding where the extension builds the single-spec run command and how it reads its settings. Maintainers have not agreed on the design, and the issue has had no comments in 525 days, so confirm the approach with them before writing code. Done means a configured command runs with the placeholders substituted.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Idea 💡 Needs Triaging ⏳
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
Lingua principale
TypeScript
Stelle
8
Fork
5
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di webdriverio/vscode-webdriverio

Tutte le issue di webdriverio/vscode-webdriverio

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.