drun 7.2.3__tar.gz → 7.2.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. {drun-7.2.3 → drun-7.2.6}/PKG-INFO +71 -71
  2. {drun-7.2.3 → drun-7.2.6}/README.md +70 -70
  3. {drun-7.2.3 → drun-7.2.6}/drun/__init__.py +1 -1
  4. {drun-7.2.3 → drun-7.2.6}/drun/cli.py +155 -79
  5. {drun-7.2.3 → drun-7.2.6}/drun/commands/run.py +99 -15
  6. {drun-7.2.3 → drun-7.2.6}/drun/loader/yaml_loader.py +18 -1
  7. {drun-7.2.3 → drun-7.2.6}/drun/models/report.py +4 -0
  8. drun-7.2.6/drun/models/step.py +92 -0
  9. drun-7.2.6/drun/runner/invoke.py +277 -0
  10. drun-7.2.6/drun/runner/runner.py +1249 -0
  11. {drun-7.2.3 → drun-7.2.6}/drun/scaffolds/templates.py +5 -5
  12. {drun-7.2.3 → drun-7.2.6}/drun.egg-info/PKG-INFO +71 -71
  13. {drun-7.2.3 → drun-7.2.6}/drun.egg-info/SOURCES.txt +3 -0
  14. drun-7.2.6/drun.egg-info/top_level.txt +2 -0
  15. {drun-7.2.3 → drun-7.2.6}/pyproject.toml +1 -1
  16. drun-7.2.6/tests/test_cli_help_width.py +120 -0
  17. drun-7.2.6/tests/test_invoke_case_selection.py +338 -0
  18. drun-7.2.6/tests/test_repeat_steps.py +234 -0
  19. {drun-7.2.3 → drun-7.2.6}/tests/test_run_outputs.py +358 -0
  20. drun-7.2.3/drun/models/step.py +0 -48
  21. drun-7.2.3/drun/runner/invoke.py +0 -177
  22. drun-7.2.3/drun/runner/runner.py +0 -1162
  23. drun-7.2.3/drun.egg-info/top_level.txt +0 -1
  24. {drun-7.2.3 → drun-7.2.6}/LICENSE +0 -0
  25. {drun-7.2.3 → drun-7.2.6}/drun/commands/__init__.py +0 -0
  26. {drun-7.2.3 → drun-7.2.6}/drun/commands/check.py +0 -0
  27. {drun-7.2.3 → drun-7.2.6}/drun/commands/fix.py +0 -0
  28. {drun-7.2.3 → drun-7.2.6}/drun/commands/tags.py +0 -0
  29. {drun-7.2.3 → drun-7.2.6}/drun/db/__init__.py +0 -0
  30. {drun-7.2.3 → drun-7.2.6}/drun/db/database_proxy.py +0 -0
  31. {drun-7.2.3 → drun-7.2.6}/drun/db/generate_mysql_config.py +0 -0
  32. {drun-7.2.3 → drun-7.2.6}/drun/engine/__init__.py +0 -0
  33. {drun-7.2.3 → drun-7.2.6}/drun/engine/http.py +0 -0
  34. {drun-7.2.3 → drun-7.2.6}/drun/engine/request_files.py +0 -0
  35. {drun-7.2.3 → drun-7.2.6}/drun/exporters/curl.py +0 -0
  36. {drun-7.2.3 → drun-7.2.6}/drun/exporters/snippet.py +0 -0
  37. {drun-7.2.3 → drun-7.2.6}/drun/extensions.py +0 -0
  38. {drun-7.2.3 → drun-7.2.6}/drun/importers/base.py +0 -0
  39. {drun-7.2.3 → drun-7.2.6}/drun/importers/curl.py +0 -0
  40. {drun-7.2.3 → drun-7.2.6}/drun/importers/har.py +0 -0
  41. {drun-7.2.3 → drun-7.2.6}/drun/importers/openapi.py +0 -0
  42. {drun-7.2.3 → drun-7.2.6}/drun/importers/postman.py +0 -0
  43. {drun-7.2.3 → drun-7.2.6}/drun/loader/__init__.py +0 -0
  44. {drun-7.2.3 → drun-7.2.6}/drun/loader/collector.py +0 -0
  45. {drun-7.2.3 → drun-7.2.6}/drun/loader/env.py +0 -0
  46. {drun-7.2.3 → drun-7.2.6}/drun/loader/hooks.py +0 -0
  47. {drun-7.2.3 → drun-7.2.6}/drun/models/case.py +0 -0
  48. {drun-7.2.3 → drun-7.2.6}/drun/models/config.py +0 -0
  49. {drun-7.2.3 → drun-7.2.6}/drun/models/request.py +0 -0
  50. {drun-7.2.3 → drun-7.2.6}/drun/models/validators.py +0 -0
  51. {drun-7.2.3 → drun-7.2.6}/drun/notifier/__init__.py +0 -0
  52. {drun-7.2.3 → drun-7.2.6}/drun/notifier/base.py +0 -0
  53. {drun-7.2.3 → drun-7.2.6}/drun/notifier/dingtalk.py +0 -0
  54. {drun-7.2.3 → drun-7.2.6}/drun/notifier/emailer.py +0 -0
  55. {drun-7.2.3 → drun-7.2.6}/drun/notifier/feishu.py +0 -0
  56. {drun-7.2.3 → drun-7.2.6}/drun/notifier/format.py +0 -0
  57. {drun-7.2.3 → drun-7.2.6}/drun/reporter/__init__.py +0 -0
  58. {drun-7.2.3 → drun-7.2.6}/drun/reporter/allure_reporter.py +0 -0
  59. {drun-7.2.3 → drun-7.2.6}/drun/reporter/html_reporter.py +0 -0
  60. {drun-7.2.3 → drun-7.2.6}/drun/reporter/json_reporter.py +0 -0
  61. {drun-7.2.3 → drun-7.2.6}/drun/runner/__init__.py +0 -0
  62. {drun-7.2.3 → drun-7.2.6}/drun/runner/asserting.py +0 -0
  63. {drun-7.2.3 → drun-7.2.6}/drun/runner/assertions.py +0 -0
  64. {drun-7.2.3 → drun-7.2.6}/drun/runner/extractors.py +0 -0
  65. {drun-7.2.3 → drun-7.2.6}/drun/runner/hooks.py +0 -0
  66. {drun-7.2.3 → drun-7.2.6}/drun/scaffolds/__init__.py +0 -0
  67. {drun-7.2.3 → drun-7.2.6}/drun/server/__init__.py +0 -0
  68. {drun-7.2.3 → drun-7.2.6}/drun/server/app.py +0 -0
  69. {drun-7.2.3 → drun-7.2.6}/drun/server/database.py +0 -0
  70. {drun-7.2.3 → drun-7.2.6}/drun/server/scanner.py +0 -0
  71. {drun-7.2.3 → drun-7.2.6}/drun/server/services.py +0 -0
  72. {drun-7.2.3 → drun-7.2.6}/drun/server/templates/detail.html +0 -0
  73. {drun-7.2.3 → drun-7.2.6}/drun/server/templates/index.html +0 -0
  74. {drun-7.2.3 → drun-7.2.6}/drun/templating/__init__.py +0 -0
  75. {drun-7.2.3 → drun-7.2.6}/drun/templating/builtins.py +0 -0
  76. {drun-7.2.3 → drun-7.2.6}/drun/templating/compat.py +0 -0
  77. {drun-7.2.3 → drun-7.2.6}/drun/templating/context.py +0 -0
  78. {drun-7.2.3 → drun-7.2.6}/drun/templating/engine.py +0 -0
  79. {drun-7.2.3 → drun-7.2.6}/drun/utils/__init__.py +0 -0
  80. {drun-7.2.3 → drun-7.2.6}/drun/utils/config.py +0 -0
  81. {drun-7.2.3 → drun-7.2.6}/drun/utils/curl.py +0 -0
  82. {drun-7.2.3 → drun-7.2.6}/drun/utils/data_exporter.py +0 -0
  83. {drun-7.2.3 → drun-7.2.6}/drun/utils/env_writer.py +0 -0
  84. {drun-7.2.3 → drun-7.2.6}/drun/utils/errors.py +0 -0
  85. {drun-7.2.3 → drun-7.2.6}/drun/utils/logging.py +0 -0
  86. {drun-7.2.3 → drun-7.2.6}/drun/utils/mask.py +0 -0
  87. {drun-7.2.3 → drun-7.2.6}/drun/utils/timeit.py +0 -0
  88. {drun-7.2.3 → drun-7.2.6}/drun.egg-info/dependency_links.txt +0 -0
  89. {drun-7.2.3 → drun-7.2.6}/drun.egg-info/entry_points.txt +0 -0
  90. {drun-7.2.3 → drun-7.2.6}/drun.egg-info/requires.txt +0 -0
  91. {drun-7.2.3 → drun-7.2.6}/setup.cfg +0 -0
  92. {drun-7.2.3 → drun-7.2.6}/tests/test_binary_response.py +0 -0
  93. {drun-7.2.3 → drun-7.2.6}/tests/test_request_files.py +0 -0
  94. {drun-7.2.3 → drun-7.2.6}/tests/test_run_env.py +0 -0
  95. {drun-7.2.3 → drun-7.2.6}/tests/test_template_engine.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: drun
3
- Version: 7.2.3
3
+ Version: 7.2.6
4
4
  Summary: Easy-to-use API testing with DevOps automation support
5
5
  Author: Drun Team
6
6
  Requires-Python: >=3.10
@@ -178,17 +178,17 @@ steps:
178
178
 
179
179
  ```bash
180
180
  # Run single test (with or without .yaml extension)
181
- drun run testcases/test_user_api.yaml --env dev
182
- drun run test_user_api --env dev
181
+ drun run testcases/test_user_api.yaml -env dev
182
+ drun run test_user_api -env dev
183
183
 
184
184
  # Run with HTML report
185
- drun run test_user_api --env dev --html reports/report.html
185
+ drun run test_user_api -env dev -html reports/report.html
186
186
 
187
187
  # Run with tag filtering
188
- drun run testcases --env dev -k "smoke and not slow"
188
+ drun run testcases -env dev -k "smoke and not slow"
189
189
 
190
190
  # Run test suite
191
- drun run testsuite_e2e --env dev
191
+ drun run testsuite_e2e -env dev
192
192
  ```
193
193
 
194
194
  ## Core Concepts
@@ -458,7 +458,7 @@ Automatically generate executable Shell and Python scripts from test steps:
458
458
 
459
459
  ```bash
460
460
  # Run test - code snippets are generated automatically
461
- $ drun run test_login --env dev
461
+ $ drun run test_login -env dev
462
462
 
463
463
  2025-11-24 14:23:18.551 | INFO | [CASE] Total: 1 Passed: 1 Failed: 0 Skipped: 0
464
464
  2025-11-24 14:23:18.553 | INFO | [CASE] HTML report written to reports/report.html
@@ -470,16 +470,16 @@ $ drun run test_login --env dev
470
470
  **CLI Options:**
471
471
  ```bash
472
472
  # Disable snippet generation
473
- $ drun run test_api --env dev --no-snippet
473
+ $ drun run test_api -env dev -snippet off
474
474
 
475
475
  # Generate only Python scripts
476
- $ drun run test_api --env dev --snippet-lang python
476
+ $ drun run test_api -env dev -snippet python
477
477
 
478
478
  # Generate only curl scripts
479
- $ drun run test_api --env dev --snippet-lang curl
479
+ $ drun run test_api -env dev -snippet curl
480
480
 
481
481
  # Custom output directory
482
- $ drun run test_api --env dev --snippet-output exports/
482
+ $ drun run test_api -env dev -snippet-output exports/
483
483
  ```
484
484
 
485
485
  ### Custom Hooks
@@ -538,10 +538,10 @@ steps:
538
538
  drun server
539
539
 
540
540
  # Custom port and options
541
- drun server --port 8080 --no-open
541
+ drun server -port 8080 -headless
542
542
 
543
543
  # Development mode with auto-reload
544
- drun server --reload
544
+ drun server -reload
545
545
 
546
546
  # Server will be accessible at http://0.0.0.0:8080
547
547
  # Features:
@@ -557,48 +557,48 @@ drun server --reload
557
557
 
558
558
  ```bash
559
559
  # Basic execution
560
- drun run PATH --env <env_name>
560
+ drun run PATH -env <env_name>
561
561
 
562
562
  # Smart file discovery - extension optional
563
- drun run test_api_health --env dev # Finds test_api_health.yaml or .yml
564
- drun run testcases/test_user --env dev # Supports paths without extension
565
- drun run test_api_health.yaml --env dev # Traditional format still works
563
+ drun run test_api_health -env dev # Finds test_api_health.yaml or .yml
564
+ drun run testcases/test_user -env dev # Supports paths without extension
565
+ drun run test_api_health.yaml -env dev # Traditional format still works
566
566
 
567
567
  # Temporary single-file run outside scaffold
568
568
  # Default output: only one log file in current directory
569
- drun run ./test_api_health.yaml --env-file ./demo.env
569
+ drun run ./test_api_health.yaml -env-file ./demo.env
570
570
 
571
571
  # With more options
572
572
  drun run testcases/ \
573
- --env staging \
573
+ -env staging \
574
574
  -k "smoke and not slow" \
575
- --vars api_key=secret \
576
- --html reports/report.html \
577
- --report reports/results.json \
578
- --allure-results allure-results \
579
- --mask-secrets \
580
- --failfast
575
+ -vars api_key=secret \
576
+ -html reports/report.html \
577
+ -report reports/results.json \
578
+ -allure-results allure-results \
579
+ -secrets mask \
580
+ -failfast
581
581
  ```
582
582
 
583
583
  **Options:**
584
- - `--env NAME`: Optional named environment; prefers `.env.<name>` and merges named env config if present
585
- - `--env-file FILE`: Explicit environment file path; higher priority than `--env` and default `.env`
584
+ - `-env NAME`: Optional named environment; prefers `.env.<name>` and merges named env config if present
585
+ - `-env-file FILE`: Explicit environment file path; higher priority than `-env` and default `.env`
586
586
  - `-k TAG_EXPR`: Filter by tags (e.g., `smoke and not slow`)
587
- - `--vars k=v`: Override variables from CLI
588
- - `--html FILE`: Generate HTML report (temporary single-file runs do not generate one by default)
589
- - `--report FILE`: Generate JSON report
590
- - `--allure-results DIR`: Generate Allure results
591
- - `--mask-secrets`: Mask sensitive data in logs/reports
592
- - `--reveal-secrets`: Show sensitive data (default for local runs)
593
- - `--response-headers`: Log response headers
594
- - `--failfast`: Stop on first failure
595
- - `--log-level LEVEL`: Set log level (DEBUG, INFO, WARNING, ERROR)
596
- - `--log-file FILE`: Write logs to file (temporary single-file runs otherwise default to `./<yaml>-<ts>.log`)
597
- - `--notify CHANNELS`: Enable notifications (feishu, dingtalk, email)
598
- - `--notify-only POLICY`: Notification policy (always, failed, passed)
599
- - `--no-snippet`: Disable code snippet generation (temporary single-file runs are already disabled by default)
600
- - `--snippet-output DIR`: Custom output directory for snippets
601
- - `--snippet-lang LANG`: Generate snippets in specific language: all|curl|python
587
+ - `-vars k=v`: Override variables from CLI
588
+ - `-html FILE`: Generate HTML report (temporary single-file runs do not generate one by default)
589
+ - `-report FILE`: Generate JSON report
590
+ - `-allure-results DIR`: Generate Allure results
591
+ - `-secrets mask`: Mask sensitive data in logs/reports
592
+ - `-secrets plain`: Show sensitive data (default for local runs)
593
+ - `-response-headers`: Log response headers
594
+ - `-failfast`: Stop on first failure
595
+ - `-log-level LEVEL`: Set log level (DEBUG, INFO, WARNING, ERROR)
596
+ - `-log-file FILE`: Write logs to file (temporary single-file runs otherwise default to `./<yaml>-<ts>.log`)
597
+ - `-notify CHANNELS`: Enable notifications (feishu, dingtalk, email)
598
+ - `-notify-only POLICY`: Notification policy (always, failed, passed)
599
+ - `-snippet off`: Disable code snippet generation (temporary single-file runs are already disabled by default)
600
+ - `-snippet-output DIR`: Custom output directory for snippets
601
+ - `-snippet MODE`: Snippet mode: off|all|curl|python
602
602
 
603
603
  ### Format Conversion
604
604
 
@@ -678,7 +678,7 @@ drun --version
678
678
  ### HTML Reports
679
679
 
680
680
  ```bash
681
- drun run testcases --env dev --html reports/report.html --mask-secrets
681
+ drun run testcases -env dev -html reports/report.html -secrets mask
682
682
  ```
683
683
 
684
684
  **Features:**
@@ -692,7 +692,7 @@ drun run testcases --env dev --html reports/report.html --mask-secrets
692
692
  ### JSON Reports
693
693
 
694
694
  ```bash
695
- drun run testcases --env dev --report reports/results.json
695
+ drun run testcases -env dev -report reports/results.json
696
696
  ```
697
697
 
698
698
  **Structure:**
@@ -720,7 +720,7 @@ drun run testcases --env dev --report reports/results.json
720
720
 
721
721
  ```bash
722
722
  # Generate Allure results
723
- drun run testcases --env dev --allure-results allure-results
723
+ drun run testcases -env dev -allure-results allure-results
724
724
 
725
725
  # View Allure report
726
726
  allure serve allure-results
@@ -754,10 +754,10 @@ NOTIFY_ATTACH_HTML=true
754
754
 
755
755
  **Usage:**
756
756
  ```bash
757
- drun run testcases --env dev \
758
- --notify feishu,email \
759
- --notify-only failed \
760
- --notify-attach-html
757
+ drun run testcases -env dev \
758
+ -notify feishu,email \
759
+ -notify-only failed \
760
+ -notify-attach-html
761
761
  ```
762
762
 
763
763
  ## Architecture
@@ -882,12 +882,12 @@ my-api-test/
882
882
  ### Environment Management
883
883
 
884
884
  ```bash
885
- # .env.dev (used with --env dev)
885
+ # .env.dev (used with -env dev)
886
886
  BASE_URL=https://api.dev.example.com
887
887
  API_KEY=dev-key-here
888
888
  DB_HOST=localhost
889
889
 
890
- # .env.staging (used with --env staging)
890
+ # .env.staging (used with -env staging)
891
891
  BASE_URL=https://api.staging.example.com
892
892
  API_KEY=staging-key-here
893
893
  DB_HOST=staging-db.example.com
@@ -896,13 +896,13 @@ DB_HOST=staging-db.example.com
896
896
  **Multi-environment:**
897
897
  ```bash
898
898
  # Development
899
- drun run testsuites/testsuite_smoke.yaml --env dev
899
+ drun run testsuites/testsuite_smoke.yaml -env dev
900
900
 
901
901
  # Staging
902
- drun run testsuites/testsuite_regression.yaml --env staging
902
+ drun run testsuites/testsuite_regression.yaml -env staging
903
903
 
904
904
  # Production (smoke tests only)
905
- drun run testsuites/testsuite_smoke.yaml --env prod
905
+ drun run testsuites/testsuite_smoke.yaml -env prod
906
906
  ```
907
907
 
908
908
  ### Naming Conventions
@@ -932,9 +932,9 @@ tags: [db, data-verify] # Database validation
932
932
 
933
933
  **Filtering:**
934
934
  ```bash
935
- drun run testcases --env dev -k "smoke" # Smoke tests only
936
- drun run testcases --env dev -k "regression and not slow" # Fast regression
937
- drun run testcases --env dev -k "critical or e2e" # Critical + E2E
935
+ drun run testcases -env dev -k "smoke" # Smoke tests only
936
+ drun run testcases -env dev -k "regression and not slow" # Fast regression
937
+ drun run testcases -env dev -k "critical or e2e" # Critical + E2E
938
938
  ```
939
939
 
940
940
  ### CI/CD Integration
@@ -965,19 +965,19 @@ jobs:
965
965
 
966
966
  - name: Run Smoke Tests
967
967
  run: |
968
- drun run testsuites/testsuite_smoke.yaml --env ci \
969
- --html reports/smoke.html \
970
- --report reports/smoke.json \
971
- --mask-secrets \
972
- --failfast
968
+ drun run testsuites/testsuite_smoke.yaml -env ci \
969
+ -html reports/smoke.html \
970
+ -report reports/smoke.json \
971
+ -secrets mask \
972
+ -failfast
973
973
 
974
974
  - name: Run Regression Tests
975
975
  if: github.event_name == 'pull_request'
976
976
  run: |
977
- drun run testsuites/testsuite_regression.yaml --env ci \
978
- --html reports/regression.html \
979
- --report reports/regression.json \
980
- --mask-secrets
977
+ drun run testsuites/testsuite_regression.yaml -env ci \
978
+ -html reports/regression.html \
979
+ -report reports/regression.json \
980
+ -secrets mask
981
981
 
982
982
  - name: Upload Reports
983
983
  uses: actions/upload-artifact@v3
@@ -990,9 +990,9 @@ jobs:
990
990
  if: failure()
991
991
  run: |
992
992
  echo "FEISHU_WEBHOOK=${{ secrets.FEISHU_WEBHOOK }}" >> .env.ci
993
- drun run testsuites/testsuite_smoke.yaml --env ci \
994
- --notify feishu \
995
- --notify-only failed
993
+ drun run testsuites/testsuite_smoke.yaml -env ci \
994
+ -notify feishu \
995
+ -notify-only failed
996
996
  ```
997
997
 
998
998
  ## Advanced Topics
@@ -1233,7 +1233,7 @@ python -m drun.cli --version
1233
1233
  - Automatic report scanning and indexing
1234
1234
  - SQLite-based report database
1235
1235
  - RESTful API for report management
1236
- - Command: `drun server --port 8080 --no-open`
1236
+ - Command: `drun server -port 8080 -headless`
1237
1237
  - **NEW**: Report list and detail pages with pagination
1238
1238
 
1239
1239
  ### v5.0.0 (2024-11-24) - Enhanced User Experience
@@ -1274,7 +1274,7 @@ MIT License - see [LICENSE](LICENSE) file for details.
1274
1274
  ## Tips
1275
1275
 
1276
1276
  - Use `drun check` before commits
1277
- - Enable `--mask-secrets` in CI/CD
1277
+ - Enable `-secrets mask` in CI/CD
1278
1278
  - Organize tests by module/feature
1279
1279
  - Use test suites for complex workflows
1280
1280
  - Tag tests for easy filtering
@@ -156,17 +156,17 @@ steps:
156
156
 
157
157
  ```bash
158
158
  # Run single test (with or without .yaml extension)
159
- drun run testcases/test_user_api.yaml --env dev
160
- drun run test_user_api --env dev
159
+ drun run testcases/test_user_api.yaml -env dev
160
+ drun run test_user_api -env dev
161
161
 
162
162
  # Run with HTML report
163
- drun run test_user_api --env dev --html reports/report.html
163
+ drun run test_user_api -env dev -html reports/report.html
164
164
 
165
165
  # Run with tag filtering
166
- drun run testcases --env dev -k "smoke and not slow"
166
+ drun run testcases -env dev -k "smoke and not slow"
167
167
 
168
168
  # Run test suite
169
- drun run testsuite_e2e --env dev
169
+ drun run testsuite_e2e -env dev
170
170
  ```
171
171
 
172
172
  ## Core Concepts
@@ -436,7 +436,7 @@ Automatically generate executable Shell and Python scripts from test steps:
436
436
 
437
437
  ```bash
438
438
  # Run test - code snippets are generated automatically
439
- $ drun run test_login --env dev
439
+ $ drun run test_login -env dev
440
440
 
441
441
  2025-11-24 14:23:18.551 | INFO | [CASE] Total: 1 Passed: 1 Failed: 0 Skipped: 0
442
442
  2025-11-24 14:23:18.553 | INFO | [CASE] HTML report written to reports/report.html
@@ -448,16 +448,16 @@ $ drun run test_login --env dev
448
448
  **CLI Options:**
449
449
  ```bash
450
450
  # Disable snippet generation
451
- $ drun run test_api --env dev --no-snippet
451
+ $ drun run test_api -env dev -snippet off
452
452
 
453
453
  # Generate only Python scripts
454
- $ drun run test_api --env dev --snippet-lang python
454
+ $ drun run test_api -env dev -snippet python
455
455
 
456
456
  # Generate only curl scripts
457
- $ drun run test_api --env dev --snippet-lang curl
457
+ $ drun run test_api -env dev -snippet curl
458
458
 
459
459
  # Custom output directory
460
- $ drun run test_api --env dev --snippet-output exports/
460
+ $ drun run test_api -env dev -snippet-output exports/
461
461
  ```
462
462
 
463
463
  ### Custom Hooks
@@ -516,10 +516,10 @@ steps:
516
516
  drun server
517
517
 
518
518
  # Custom port and options
519
- drun server --port 8080 --no-open
519
+ drun server -port 8080 -headless
520
520
 
521
521
  # Development mode with auto-reload
522
- drun server --reload
522
+ drun server -reload
523
523
 
524
524
  # Server will be accessible at http://0.0.0.0:8080
525
525
  # Features:
@@ -535,48 +535,48 @@ drun server --reload
535
535
 
536
536
  ```bash
537
537
  # Basic execution
538
- drun run PATH --env <env_name>
538
+ drun run PATH -env <env_name>
539
539
 
540
540
  # Smart file discovery - extension optional
541
- drun run test_api_health --env dev # Finds test_api_health.yaml or .yml
542
- drun run testcases/test_user --env dev # Supports paths without extension
543
- drun run test_api_health.yaml --env dev # Traditional format still works
541
+ drun run test_api_health -env dev # Finds test_api_health.yaml or .yml
542
+ drun run testcases/test_user -env dev # Supports paths without extension
543
+ drun run test_api_health.yaml -env dev # Traditional format still works
544
544
 
545
545
  # Temporary single-file run outside scaffold
546
546
  # Default output: only one log file in current directory
547
- drun run ./test_api_health.yaml --env-file ./demo.env
547
+ drun run ./test_api_health.yaml -env-file ./demo.env
548
548
 
549
549
  # With more options
550
550
  drun run testcases/ \
551
- --env staging \
551
+ -env staging \
552
552
  -k "smoke and not slow" \
553
- --vars api_key=secret \
554
- --html reports/report.html \
555
- --report reports/results.json \
556
- --allure-results allure-results \
557
- --mask-secrets \
558
- --failfast
553
+ -vars api_key=secret \
554
+ -html reports/report.html \
555
+ -report reports/results.json \
556
+ -allure-results allure-results \
557
+ -secrets mask \
558
+ -failfast
559
559
  ```
560
560
 
561
561
  **Options:**
562
- - `--env NAME`: Optional named environment; prefers `.env.<name>` and merges named env config if present
563
- - `--env-file FILE`: Explicit environment file path; higher priority than `--env` and default `.env`
562
+ - `-env NAME`: Optional named environment; prefers `.env.<name>` and merges named env config if present
563
+ - `-env-file FILE`: Explicit environment file path; higher priority than `-env` and default `.env`
564
564
  - `-k TAG_EXPR`: Filter by tags (e.g., `smoke and not slow`)
565
- - `--vars k=v`: Override variables from CLI
566
- - `--html FILE`: Generate HTML report (temporary single-file runs do not generate one by default)
567
- - `--report FILE`: Generate JSON report
568
- - `--allure-results DIR`: Generate Allure results
569
- - `--mask-secrets`: Mask sensitive data in logs/reports
570
- - `--reveal-secrets`: Show sensitive data (default for local runs)
571
- - `--response-headers`: Log response headers
572
- - `--failfast`: Stop on first failure
573
- - `--log-level LEVEL`: Set log level (DEBUG, INFO, WARNING, ERROR)
574
- - `--log-file FILE`: Write logs to file (temporary single-file runs otherwise default to `./<yaml>-<ts>.log`)
575
- - `--notify CHANNELS`: Enable notifications (feishu, dingtalk, email)
576
- - `--notify-only POLICY`: Notification policy (always, failed, passed)
577
- - `--no-snippet`: Disable code snippet generation (temporary single-file runs are already disabled by default)
578
- - `--snippet-output DIR`: Custom output directory for snippets
579
- - `--snippet-lang LANG`: Generate snippets in specific language: all|curl|python
565
+ - `-vars k=v`: Override variables from CLI
566
+ - `-html FILE`: Generate HTML report (temporary single-file runs do not generate one by default)
567
+ - `-report FILE`: Generate JSON report
568
+ - `-allure-results DIR`: Generate Allure results
569
+ - `-secrets mask`: Mask sensitive data in logs/reports
570
+ - `-secrets plain`: Show sensitive data (default for local runs)
571
+ - `-response-headers`: Log response headers
572
+ - `-failfast`: Stop on first failure
573
+ - `-log-level LEVEL`: Set log level (DEBUG, INFO, WARNING, ERROR)
574
+ - `-log-file FILE`: Write logs to file (temporary single-file runs otherwise default to `./<yaml>-<ts>.log`)
575
+ - `-notify CHANNELS`: Enable notifications (feishu, dingtalk, email)
576
+ - `-notify-only POLICY`: Notification policy (always, failed, passed)
577
+ - `-snippet off`: Disable code snippet generation (temporary single-file runs are already disabled by default)
578
+ - `-snippet-output DIR`: Custom output directory for snippets
579
+ - `-snippet MODE`: Snippet mode: off|all|curl|python
580
580
 
581
581
  ### Format Conversion
582
582
 
@@ -656,7 +656,7 @@ drun --version
656
656
  ### HTML Reports
657
657
 
658
658
  ```bash
659
- drun run testcases --env dev --html reports/report.html --mask-secrets
659
+ drun run testcases -env dev -html reports/report.html -secrets mask
660
660
  ```
661
661
 
662
662
  **Features:**
@@ -670,7 +670,7 @@ drun run testcases --env dev --html reports/report.html --mask-secrets
670
670
  ### JSON Reports
671
671
 
672
672
  ```bash
673
- drun run testcases --env dev --report reports/results.json
673
+ drun run testcases -env dev -report reports/results.json
674
674
  ```
675
675
 
676
676
  **Structure:**
@@ -698,7 +698,7 @@ drun run testcases --env dev --report reports/results.json
698
698
 
699
699
  ```bash
700
700
  # Generate Allure results
701
- drun run testcases --env dev --allure-results allure-results
701
+ drun run testcases -env dev -allure-results allure-results
702
702
 
703
703
  # View Allure report
704
704
  allure serve allure-results
@@ -732,10 +732,10 @@ NOTIFY_ATTACH_HTML=true
732
732
 
733
733
  **Usage:**
734
734
  ```bash
735
- drun run testcases --env dev \
736
- --notify feishu,email \
737
- --notify-only failed \
738
- --notify-attach-html
735
+ drun run testcases -env dev \
736
+ -notify feishu,email \
737
+ -notify-only failed \
738
+ -notify-attach-html
739
739
  ```
740
740
 
741
741
  ## Architecture
@@ -860,12 +860,12 @@ my-api-test/
860
860
  ### Environment Management
861
861
 
862
862
  ```bash
863
- # .env.dev (used with --env dev)
863
+ # .env.dev (used with -env dev)
864
864
  BASE_URL=https://api.dev.example.com
865
865
  API_KEY=dev-key-here
866
866
  DB_HOST=localhost
867
867
 
868
- # .env.staging (used with --env staging)
868
+ # .env.staging (used with -env staging)
869
869
  BASE_URL=https://api.staging.example.com
870
870
  API_KEY=staging-key-here
871
871
  DB_HOST=staging-db.example.com
@@ -874,13 +874,13 @@ DB_HOST=staging-db.example.com
874
874
  **Multi-environment:**
875
875
  ```bash
876
876
  # Development
877
- drun run testsuites/testsuite_smoke.yaml --env dev
877
+ drun run testsuites/testsuite_smoke.yaml -env dev
878
878
 
879
879
  # Staging
880
- drun run testsuites/testsuite_regression.yaml --env staging
880
+ drun run testsuites/testsuite_regression.yaml -env staging
881
881
 
882
882
  # Production (smoke tests only)
883
- drun run testsuites/testsuite_smoke.yaml --env prod
883
+ drun run testsuites/testsuite_smoke.yaml -env prod
884
884
  ```
885
885
 
886
886
  ### Naming Conventions
@@ -910,9 +910,9 @@ tags: [db, data-verify] # Database validation
910
910
 
911
911
  **Filtering:**
912
912
  ```bash
913
- drun run testcases --env dev -k "smoke" # Smoke tests only
914
- drun run testcases --env dev -k "regression and not slow" # Fast regression
915
- drun run testcases --env dev -k "critical or e2e" # Critical + E2E
913
+ drun run testcases -env dev -k "smoke" # Smoke tests only
914
+ drun run testcases -env dev -k "regression and not slow" # Fast regression
915
+ drun run testcases -env dev -k "critical or e2e" # Critical + E2E
916
916
  ```
917
917
 
918
918
  ### CI/CD Integration
@@ -943,19 +943,19 @@ jobs:
943
943
 
944
944
  - name: Run Smoke Tests
945
945
  run: |
946
- drun run testsuites/testsuite_smoke.yaml --env ci \
947
- --html reports/smoke.html \
948
- --report reports/smoke.json \
949
- --mask-secrets \
950
- --failfast
946
+ drun run testsuites/testsuite_smoke.yaml -env ci \
947
+ -html reports/smoke.html \
948
+ -report reports/smoke.json \
949
+ -secrets mask \
950
+ -failfast
951
951
 
952
952
  - name: Run Regression Tests
953
953
  if: github.event_name == 'pull_request'
954
954
  run: |
955
- drun run testsuites/testsuite_regression.yaml --env ci \
956
- --html reports/regression.html \
957
- --report reports/regression.json \
958
- --mask-secrets
955
+ drun run testsuites/testsuite_regression.yaml -env ci \
956
+ -html reports/regression.html \
957
+ -report reports/regression.json \
958
+ -secrets mask
959
959
 
960
960
  - name: Upload Reports
961
961
  uses: actions/upload-artifact@v3
@@ -968,9 +968,9 @@ jobs:
968
968
  if: failure()
969
969
  run: |
970
970
  echo "FEISHU_WEBHOOK=${{ secrets.FEISHU_WEBHOOK }}" >> .env.ci
971
- drun run testsuites/testsuite_smoke.yaml --env ci \
972
- --notify feishu \
973
- --notify-only failed
971
+ drun run testsuites/testsuite_smoke.yaml -env ci \
972
+ -notify feishu \
973
+ -notify-only failed
974
974
  ```
975
975
 
976
976
  ## Advanced Topics
@@ -1211,7 +1211,7 @@ python -m drun.cli --version
1211
1211
  - Automatic report scanning and indexing
1212
1212
  - SQLite-based report database
1213
1213
  - RESTful API for report management
1214
- - Command: `drun server --port 8080 --no-open`
1214
+ - Command: `drun server -port 8080 -headless`
1215
1215
  - **NEW**: Report list and detail pages with pagination
1216
1216
 
1217
1217
  ### v5.0.0 (2024-11-24) - Enhanced User Experience
@@ -1252,7 +1252,7 @@ MIT License - see [LICENSE](LICENSE) file for details.
1252
1252
  ## Tips
1253
1253
 
1254
1254
  - Use `drun check` before commits
1255
- - Enable `--mask-secrets` in CI/CD
1255
+ - Enable `-secrets mask` in CI/CD
1256
1256
  - Organize tests by module/feature
1257
1257
  - Use test suites for complex workflows
1258
1258
  - Tag tests for easy filtering
@@ -1,2 +1,2 @@
1
1
  __all__ = ["__version__"]
2
- __version__ = "7.2.2"
2
+ __version__ = "7.2.6"