trcli 1.14.0__tar.gz → 1.14.2__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.
- {trcli-1.14.0 → trcli-1.14.2}/PKG-INFO +1 -1
- {trcli-1.14.0 → trcli-1.14.2}/README.md +438 -4
- trcli-1.14.2/tests/test_ai_evaluation_auto_creation.py +456 -0
- {trcli-1.14.0 → trcli-1.14.2}/tests/test_api_request_handler.py +52 -11
- {trcli-1.14.0 → trcli-1.14.2}/tests/test_api_request_handler_case_fields_update.py +2 -2
- {trcli-1.14.0 → trcli-1.14.2}/tests/test_api_request_handler_labels.py +4 -2
- {trcli-1.14.0 → trcli-1.14.2}/tests/test_api_request_handler_references.py +124 -227
- {trcli-1.14.0 → trcli-1.14.2}/tests/test_junit_parse_reference.py +105 -50
- {trcli-1.14.0 → trcli-1.14.2}/tests/test_junit_parser.py +20 -118
- trcli-1.14.2/tests/test_junit_quality_rating.py +511 -0
- trcli-1.14.2/tests/test_quality_rating_parser.py +286 -0
- trcli-1.14.2/tests/test_result_fields_quality_rating.py +166 -0
- trcli-1.14.2/tests/test_robot_parser.py +121 -0
- trcli-1.14.2/tests/test_update_existing_cases_case_fields.py +183 -0
- trcli-1.14.2/trcli/__init__.py +1 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/api/api_request_handler.py +77 -2
- {trcli-1.14.0 → trcli-1.14.2}/trcli/api/bdd_handler.py +3 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/api/case_handler.py +7 -1
- {trcli-1.14.0 → trcli-1.14.2}/trcli/api/label_manager.py +4 -1
- {trcli-1.14.0 → trcli-1.14.2}/trcli/api/reference_manager.py +6 -3
- {trcli-1.14.0 → trcli-1.14.2}/trcli/api/result_handler.py +12 -11
- {trcli-1.14.0 → trcli-1.14.2}/trcli/api/results_uploader.py +153 -25
- {trcli-1.14.0 → trcli-1.14.2}/trcli/cli.py +18 -1
- {trcli-1.14.0 → trcli-1.14.2}/trcli/commands/cmd_parse_junit.py +31 -3
- {trcli-1.14.0 → trcli-1.14.2}/trcli/commands/cmd_parse_robot.py +17 -1
- {trcli-1.14.0 → trcli-1.14.2}/trcli/data_classes/data_parsers.py +13 -2
- {trcli-1.14.0 → trcli-1.14.2}/trcli/data_classes/dataclass_testrail.py +22 -0
- trcli-1.14.2/trcli/data_classes/quality_rating_parser.py +91 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/data_providers/api_data_provider.py +38 -8
- {trcli-1.14.0 → trcli-1.14.2}/trcli/readers/file_parser.py +6 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/readers/junit_xml.py +32 -20
- {trcli-1.14.0 → trcli-1.14.2}/trcli/readers/robot_xml.py +22 -4
- {trcli-1.14.0 → trcli-1.14.2}/trcli.egg-info/PKG-INFO +1 -1
- {trcli-1.14.0 → trcli-1.14.2}/trcli.egg-info/SOURCES.txt +6 -0
- trcli-1.14.0/tests/test_robot_parser.py +0 -186
- trcli-1.14.0/trcli/__init__.py +0 -1
- {trcli-1.14.0 → trcli-1.14.2}/LICENSE.md +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/setup.cfg +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/setup.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/tests/test_api_client.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/tests/test_api_client_proxy.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/tests/test_api_data_provider.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/tests/test_api_request_handler_case_matcher.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/tests/test_cli.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/tests/test_cmd_add_run.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/tests/test_cmd_export_gherkin.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/tests/test_cmd_import_gherkin.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/tests/test_cmd_labels.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/tests/test_cmd_parse_cucumber.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/tests/test_cmd_references.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/tests/test_cmd_update.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/tests/test_cucumber_bdd_matching.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/tests/test_cucumber_parser.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/tests/test_dataclass_creation.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/tests/test_glob_deduplication.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/tests/test_glob_integration.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/tests/test_junit_bdd_parser.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/tests/test_load_data_from_config.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/tests/test_matchers_parser.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/tests/test_multiple_case_ids.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/tests/test_project_based_client.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/tests/test_response_verify.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/tests/test_results_uploader.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/tests/test_version_checker.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/api/__init__.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/api/api_cache.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/api/api_client.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/api/api_response_verify.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/api/api_utils.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/api/case_matcher.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/api/multisuite_uploader.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/api/project_based_client.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/api/run_handler.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/api/section_handler.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/api/suite_handler.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/backports.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/commands/__init__.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/commands/cmd_add_run.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/commands/cmd_export_gherkin.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/commands/cmd_import_gherkin.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/commands/cmd_labels.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/commands/cmd_parse_cucumber.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/commands/cmd_parse_openapi.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/commands/cmd_references.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/commands/cmd_update.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/commands/results_parser_helpers.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/constants.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/data_classes/__init__.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/data_classes/validation_exception.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/logging/__init__.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/logging/config.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/logging/file_handler.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/logging/structured_logger.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/readers/__init__.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/readers/cucumber_json.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/readers/openapi_yml.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/settings.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli/version_checker.py +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli.egg-info/dependency_links.txt +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli.egg-info/entry_points.txt +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli.egg-info/requires.txt +0 -0
- {trcli-1.14.0 → trcli-1.14.2}/trcli.egg-info/top_level.txt +0 -0
|
@@ -33,7 +33,7 @@ trcli
|
|
|
33
33
|
```
|
|
34
34
|
You should get something like this:
|
|
35
35
|
```
|
|
36
|
-
TestRail CLI v1.14.
|
|
36
|
+
TestRail CLI v1.14.2
|
|
37
37
|
Copyright 2025 Gurock Software GmbH - www.gurock.com
|
|
38
38
|
Supported and loaded modules:
|
|
39
39
|
- parse_junit: JUnit XML Files (& Similar)
|
|
@@ -51,7 +51,7 @@ CLI general reference
|
|
|
51
51
|
--------
|
|
52
52
|
```shell
|
|
53
53
|
$ trcli --help
|
|
54
|
-
TestRail CLI v1.14.
|
|
54
|
+
TestRail CLI v1.14.2
|
|
55
55
|
Copyright 2025 Gurock Software GmbH - www.gurock.com
|
|
56
56
|
Usage: trcli [OPTIONS] COMMAND [ARGS]...
|
|
57
57
|
|
|
@@ -485,6 +485,440 @@ Assigning failed results: 3/3, Done.
|
|
|
485
485
|
Submitted 25 test results in 2.1 secs.
|
|
486
486
|
```
|
|
487
487
|
|
|
488
|
+
## AI Evaluation Template Support
|
|
489
|
+
|
|
490
|
+
TRCLI supports TestRail's AI Evaluation Template, which enables **multi-dimensional quality assessment** for test results. This feature is ideal for evaluating systems where outcomes need assessment across multiple quality criteria, not just pass/fail.
|
|
491
|
+
|
|
492
|
+
### Use Cases
|
|
493
|
+
|
|
494
|
+
The AI Evaluation Template is useful for:
|
|
495
|
+
|
|
496
|
+
- **AI Systems**: Chatbots, code generators, recommendation engines (factual accuracy, relevance, completeness)
|
|
497
|
+
- **Performance Testing**: Responsiveness, degradation, stability under load
|
|
498
|
+
- **Security Testing**: Vulnerability resistance, data leakage prevention
|
|
499
|
+
- **UI/UX Testing**: Accessibility, usability, aesthetics
|
|
500
|
+
- **Any Quality-Based Testing**: Custom quality dimensions for your specific needs
|
|
501
|
+
|
|
502
|
+
### Quality Rating
|
|
503
|
+
|
|
504
|
+
Rate test results across **up to 15 custom categories** using **0-5 star ratings**:
|
|
505
|
+
|
|
506
|
+
```xml
|
|
507
|
+
<property name="quality_rating" value='{"factual_accuracy": 5, "relevance": 4, "completeness": 3}'/>
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
### AI Context Fields
|
|
511
|
+
|
|
512
|
+
Track additional context about AI system evaluation:
|
|
513
|
+
|
|
514
|
+
- **custom_ai_input**: What was tested (prompt, request, scenario)
|
|
515
|
+
- **custom_ai_output**: What was produced (response, result, behavior)
|
|
516
|
+
- **custom_ai_traces**: Links to detailed logs/observability tools
|
|
517
|
+
- **custom_ai_latency**: Performance metrics
|
|
518
|
+
|
|
519
|
+
### Validation Rules
|
|
520
|
+
|
|
521
|
+
Quality ratings must follow these rules:
|
|
522
|
+
|
|
523
|
+
- **Maximum 15 categories**
|
|
524
|
+
- **Star values must be integers 0-5**
|
|
525
|
+
- **At least one category must have a value ≥ 1**
|
|
526
|
+
- **Must be valid JSON object format**
|
|
527
|
+
|
|
528
|
+
#### Valid Examples
|
|
529
|
+
|
|
530
|
+
```json
|
|
531
|
+
{"accuracy": 5, "speed": 4, "reliability": 3}
|
|
532
|
+
{"factual_accuracy": 5, "relevance": 5, "completeness": 4, "clarity": 3, "tone": 4}
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
#### Invalid Examples
|
|
536
|
+
|
|
537
|
+
```json
|
|
538
|
+
{"accuracy": 10} ❌ Value out of range (must be 0-5)
|
|
539
|
+
{"cat1": 5, "cat2": 4, ... "cat20": 3} ❌ Too many categories (max 15)
|
|
540
|
+
{"accuracy": 0, "speed": 0} ❌ All values are 0 (need at least one ≥ 1)
|
|
541
|
+
{"accuracy": 4.5} ❌ Must be integer, not float
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
### Error Handling
|
|
545
|
+
|
|
546
|
+
If a quality rating fails validation, TRCLI will:
|
|
547
|
+
1. Log an error message with the specific validation issue
|
|
548
|
+
2. Skip the invalid quality rating
|
|
549
|
+
3. Continue uploading the test result (without quality rating)
|
|
550
|
+
4. Upload other valid properties (status, comment, custom fields)
|
|
551
|
+
|
|
552
|
+
Example error message:
|
|
553
|
+
|
|
554
|
+
```
|
|
555
|
+
ERROR: Quality rating validation failed for test 'test_chatbot_response':
|
|
556
|
+
Star values must be between 0 and 5, got 10 for category 'accuracy'
|
|
557
|
+
```
|
|
558
|
+
|
|
559
|
+
### Viewing Results in TestRail
|
|
560
|
+
|
|
561
|
+
Once uploaded, quality ratings appear in TestRail with star visualizations:
|
|
562
|
+
|
|
563
|
+
```
|
|
564
|
+
Test: test_chatbot_response
|
|
565
|
+
Status: ✓ Passed
|
|
566
|
+
|
|
567
|
+
Quality Rating:
|
|
568
|
+
⭐⭐⭐⭐⭐ Factual Accuracy (5/5)
|
|
569
|
+
⭐⭐⭐⭐⭐ Relevance (5/5)
|
|
570
|
+
⭐⭐⭐⭐ Clarity (4/5)
|
|
571
|
+
⭐⭐⭐⭐⭐ Tone (5/5)
|
|
572
|
+
|
|
573
|
+
Input: What is the capital of France?
|
|
574
|
+
Output: The capital of France is Paris.
|
|
575
|
+
Traces: https://logs.example.com/trace/123
|
|
576
|
+
Latency: 0.8 seconds
|
|
577
|
+
```
|
|
578
|
+
|
|
579
|
+
### Using `--result-fields` for Quality Rating
|
|
580
|
+
|
|
581
|
+
In addition to specifying quality ratings in XML/JSON properties, you can apply a **global quality rating** to all test results using the `--result-fields` command-line option:
|
|
582
|
+
|
|
583
|
+
```shell
|
|
584
|
+
trcli parse_junit \
|
|
585
|
+
-f sample_results.xml \
|
|
586
|
+
--project-id 1 \
|
|
587
|
+
--suite-id 2 \
|
|
588
|
+
--result-fields quality_rating:'{"factual_accuracy": 4, "reliability": 5, "performance": 3}'
|
|
589
|
+
```
|
|
590
|
+
|
|
591
|
+
#### Behavior
|
|
592
|
+
|
|
593
|
+
- **Global Application**: The quality rating specified via `--result-fields` is applied to **all test results** that don't already have one
|
|
594
|
+
- **Test-Specific Override**: Quality ratings specified in test properties/metadata **always take precedence** over `--result-fields`
|
|
595
|
+
- **Validation**: The same validation rules apply (max 15 categories, 0-5 stars, at least one ≥ 1)
|
|
596
|
+
|
|
597
|
+
#### Example: Mixed Quality Ratings
|
|
598
|
+
|
|
599
|
+
```xml
|
|
600
|
+
<testsuites>
|
|
601
|
+
<testsuite name="API Tests">
|
|
602
|
+
<!-- Test 1: Uses CLI global quality_rating (no rating in XML) -->
|
|
603
|
+
<testcase name="C100_test_payment_success" time="2.5">
|
|
604
|
+
<properties>
|
|
605
|
+
<property name="testrail_result_field" value="custom_api_endpoint:/api/v1/payment"/>
|
|
606
|
+
</properties>
|
|
607
|
+
</testcase>
|
|
608
|
+
|
|
609
|
+
<!-- Test 2: Uses test-specific quality_rating (overrides CLI) -->
|
|
610
|
+
<testcase name="C101_test_refund_success" time="3.1">
|
|
611
|
+
<properties>
|
|
612
|
+
<property name="quality_rating" value='{"factual_accuracy": 5, "response_time": 5}'/>
|
|
613
|
+
</properties>
|
|
614
|
+
</testcase>
|
|
615
|
+
</testsuite>
|
|
616
|
+
</testsuites>
|
|
617
|
+
```
|
|
618
|
+
|
|
619
|
+
CLI command:
|
|
620
|
+
```shell
|
|
621
|
+
trcli parse_junit \
|
|
622
|
+
-f report.xml \
|
|
623
|
+
--project-id 1 \
|
|
624
|
+
--suite-id 2 \
|
|
625
|
+
--result-fields quality_rating:'{"factual_accuracy": 4, "reliability": 5}'
|
|
626
|
+
```
|
|
627
|
+
|
|
628
|
+
**Result:**
|
|
629
|
+
- **C100** gets the CLI quality rating: `{"factual_accuracy": 4, "reliability": 5}`
|
|
630
|
+
- **C101** gets its test-specific quality rating: `{"factual_accuracy": 5, "response_time": 5}`
|
|
631
|
+
|
|
632
|
+
#### Error Handling with --result-fields
|
|
633
|
+
|
|
634
|
+
If the quality_rating value in `--result-fields` is invalid, TRCLI will exit with an error before uploading:
|
|
635
|
+
|
|
636
|
+
```
|
|
637
|
+
ERROR: Unable to parse quality_rating in --result-fields property.
|
|
638
|
+
Star values must be between 0 and 5, got 10 for category 'accuracy'
|
|
639
|
+
```
|
|
640
|
+
|
|
641
|
+
**Note:** This is different from invalid property-based quality ratings, which log a warning and continue. CLI validation is stricter because it affects all results.
|
|
642
|
+
|
|
643
|
+
### Robot Framework Support
|
|
644
|
+
|
|
645
|
+
Robot Framework test results fully support AI Evaluation Template features. Quality ratings and AI context fields are specified in the test's documentation section using special markers.
|
|
646
|
+
|
|
647
|
+
#### Example Robot Framework Test
|
|
648
|
+
|
|
649
|
+
```robot
|
|
650
|
+
*** Test Cases ***
|
|
651
|
+
Test Chatbot Response Quality
|
|
652
|
+
[Documentation] Test chatbot's ability to answer factual questions accurately
|
|
653
|
+
...
|
|
654
|
+
... Quality Rating Categories:
|
|
655
|
+
... - factual_accuracy: Did the chatbot provide correct information?
|
|
656
|
+
... - relevance: Was the response relevant to the question?
|
|
657
|
+
... - clarity: Was the response clear and easy to understand?
|
|
658
|
+
... - tone: Was the tone appropriate and professional?
|
|
659
|
+
...
|
|
660
|
+
... AI Context Fields:
|
|
661
|
+
... - custom_ai_input: The question asked to the chatbot
|
|
662
|
+
... - custom_ai_output: The response provided by the chatbot
|
|
663
|
+
... - custom_ai_traces: Link to detailed logs/observability
|
|
664
|
+
... - custom_ai_latency: Response time
|
|
665
|
+
...
|
|
666
|
+
... - testrail_case_id: C300
|
|
667
|
+
... - quality_rating: {"factual_accuracy": 5, "relevance": 5, "clarity": 4, "tone": 4}
|
|
668
|
+
... - testrail_result_field: custom_ai_input:What is the capital of France?
|
|
669
|
+
... - testrail_result_field: custom_ai_output:The capital of France is Paris.
|
|
670
|
+
... - testrail_result_field: custom_ai_traces:https://logs.example.com/trace/chat-001
|
|
671
|
+
... - testrail_result_field: custom_ai_latency:0.85 seconds
|
|
672
|
+
|
|
673
|
+
Ask Chatbot Question What is the capital of France?
|
|
674
|
+
Verify Answer Correctness Paris
|
|
675
|
+
```
|
|
676
|
+
|
|
677
|
+
The key elements for Robot Framework:
|
|
678
|
+
|
|
679
|
+
1. **Documentation Format**: Use continuation lines (`...`) in the `[Documentation]` section
|
|
680
|
+
2. **Quality Rating**: Specify as JSON on a line starting with `- quality_rating:`
|
|
681
|
+
3. **AI Context Fields**: Use `- testrail_result_field: field_name:value` format
|
|
682
|
+
4. **Case Matching**: Use `- testrail_case_id: C123` to link to existing test cases
|
|
683
|
+
|
|
684
|
+
#### Uploading Robot Framework Results
|
|
685
|
+
|
|
686
|
+
```bash
|
|
687
|
+
trcli parse_robot \
|
|
688
|
+
-f output.xml \
|
|
689
|
+
--project-id 1 \
|
|
690
|
+
--suite-id 100
|
|
691
|
+
```
|
|
692
|
+
|
|
693
|
+
### Multi-Step AI Evaluation Workflows
|
|
694
|
+
|
|
695
|
+
For complex AI systems with multiple pipeline stages (like RAG, multi-agent systems, or sequential AI workflows), you can combine **step-level execution tracking** with **overall quality assessment** in your AI Evaluation tests. quality_rating result field can be added to to Test Case (Steps)
|
|
696
|
+
|
|
697
|
+
#### How It Works
|
|
698
|
+
|
|
699
|
+
**Step-Level Tracking:**
|
|
700
|
+
- Each step has its own **status** (passed, failed, skipped, untested)
|
|
701
|
+
- See exactly where in the pipeline the failure occurred
|
|
702
|
+
|
|
703
|
+
**Overall Quality Rating:**
|
|
704
|
+
- One **quality_rating** applies to the entire test result
|
|
705
|
+
- Assess the final output quality across multiple dimensions
|
|
706
|
+
|
|
707
|
+
#### JUnit XML Example
|
|
708
|
+
|
|
709
|
+
```xml
|
|
710
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
711
|
+
<testsuites name="RAG Pipeline Tests" tests="1" failures="1" time="10.5">
|
|
712
|
+
<testsuite name="Document QA" tests="1" failures="1" time="10.5">
|
|
713
|
+
|
|
714
|
+
<testcase classname="ai.rag.DocumentQA" name="C1000_test_rag_pipeline" time="10.5">
|
|
715
|
+
<properties>
|
|
716
|
+
<property name="test_id" value="C1000"/>
|
|
717
|
+
|
|
718
|
+
<!-- Step-Level Execution Tracking -->
|
|
719
|
+
<property name="testrail_result_step" value="passed:Step 1 Query Understanding"/>
|
|
720
|
+
<property name="testrail_result_step" value="passed:Step 2 Document Retrieval"/>
|
|
721
|
+
<property name="testrail_result_step" value="failed:Step 3 Answer Generation"/>
|
|
722
|
+
<property name="testrail_result_step" value="untested:Step 4 Response Validation"/>
|
|
723
|
+
|
|
724
|
+
<!-- Overall Quality Rating -->
|
|
725
|
+
<property name="quality_rating" value='{"factual_accuracy": 2, "coherence": 3, "completeness": 1}'/>
|
|
726
|
+
|
|
727
|
+
<!-- AI Context Fields (not applicable to Test Case (Steps) -->
|
|
728
|
+
<property name="testrail_result_field" value="custom_ai_input:What programming language is used for machine learning?"/>
|
|
729
|
+
<property name="testrail_result_field" value="custom_ai_output:JavaScript is the primary language for machine learning."/>
|
|
730
|
+
<property name="testrail_result_field" value="custom_ai_traces:https://logs.example.com/trace/rag-001"/>
|
|
731
|
+
<property name="testrail_result_field" value="custom_ai_latency:10.5 seconds"/>
|
|
732
|
+
</properties>
|
|
733
|
+
<failure message="Answer generation produced factually incorrect response"/>
|
|
734
|
+
</testcase>
|
|
735
|
+
|
|
736
|
+
</testsuite>
|
|
737
|
+
</testsuites>
|
|
738
|
+
```
|
|
739
|
+
|
|
740
|
+
**Upload Command:**
|
|
741
|
+
```bash
|
|
742
|
+
trcli parse_junit \
|
|
743
|
+
-f rag_pipeline_results.xml \
|
|
744
|
+
--project-id 1 \
|
|
745
|
+
--suite-id 100
|
|
746
|
+
```
|
|
747
|
+
|
|
748
|
+
#### Important Notes
|
|
749
|
+
|
|
750
|
+
1. **Quality Rating Scope**: The `quality_rating` applies to the **entire test result**, not individual steps. It represents the overall quality of the AI system's final output.
|
|
751
|
+
|
|
752
|
+
2. **Step Status Format**: Use `status:description` format for step-level tracking:
|
|
753
|
+
- `passed:Step 1 Query Understanding`
|
|
754
|
+
- `failed:Step 3 Answer Generation`
|
|
755
|
+
- `skipped:Optional Enhancement`
|
|
756
|
+
- `untested:Step 4 Response Validation`
|
|
757
|
+
|
|
758
|
+
3. **Available Step Statuses**:
|
|
759
|
+
- `passed` (status_id: 1) - Step completed successfully
|
|
760
|
+
- `untested` (status_id: 3) - Step not executed
|
|
761
|
+
- `skipped` (status_id: 4) - Step intentionally skipped
|
|
762
|
+
- `failed` (status_id: 5) - Step failed
|
|
763
|
+
|
|
764
|
+
4. **Test Status Aggregation**: The overall test status follows **fail-fast** logic - if any step fails, the entire test fails.
|
|
765
|
+
|
|
766
|
+
### Automatic Case Creation for AI Evaluation Template
|
|
767
|
+
|
|
768
|
+
When using the `-y` flag (auto-creation mode), TRCLI can automatically detect and create test cases with the **AI Evaluation template**. This eliminates the need to manually select templates or pre-create cases.
|
|
769
|
+
|
|
770
|
+
#### How Auto-Detection Works
|
|
771
|
+
|
|
772
|
+
TRCLI detects AI Evaluation indicators through three methods:
|
|
773
|
+
|
|
774
|
+
1. **Quality Rating in Test Results**: When `quality_rating` is present in any test result
|
|
775
|
+
2. **AI Case Fields in CLI**: When `--case-fields` includes `custom_ai_type` or `custom_ai_model`
|
|
776
|
+
3. **AI Case Fields in XML Properties**: When `testrail_case_field` properties include AI fields
|
|
777
|
+
|
|
778
|
+
If any of these indicators are detected, TRCLI will validate that the AI Evaluation template exists in your project or exit with an error if the template is not found.
|
|
779
|
+
|
|
780
|
+
#### Example: Auto-Create with Quality Rating
|
|
781
|
+
|
|
782
|
+
```bash
|
|
783
|
+
trcli -y \
|
|
784
|
+
-h https://your-instance.testrail.io \
|
|
785
|
+
--project "AI Testing" \
|
|
786
|
+
-n \
|
|
787
|
+
--title "RAG Pipeline Tests" \
|
|
788
|
+
-f junit_results.xml
|
|
789
|
+
```
|
|
790
|
+
|
|
791
|
+
**junit_results.xml:**
|
|
792
|
+
```xml
|
|
793
|
+
<testsuites name="RAG Tests">
|
|
794
|
+
<testsuite name="Document QA">
|
|
795
|
+
<testcase name="test_rag_pipeline">
|
|
796
|
+
<properties>
|
|
797
|
+
<!-- Automation ID for case matching -->
|
|
798
|
+
<property name="test_id" value="ai.rag.test_rag_pipeline"/>
|
|
799
|
+
|
|
800
|
+
<!-- Quality rating triggers AI Evaluation template -->
|
|
801
|
+
<property name="quality_rating" value='{"factual_accuracy": 5, "coherence": 4}'/>
|
|
802
|
+
|
|
803
|
+
<!-- AI context fields for observability -->
|
|
804
|
+
<property name="testrail_result_field" value="custom_ai_input:What is ML?"/>
|
|
805
|
+
<property name="testrail_result_field" value="custom_ai_output:ML is a subset of AI..."/>
|
|
806
|
+
</properties>
|
|
807
|
+
</testcase>
|
|
808
|
+
</testsuite>
|
|
809
|
+
</testsuites>
|
|
810
|
+
```
|
|
811
|
+
|
|
812
|
+
#### Example: Auto-Create with AI Case Fields
|
|
813
|
+
|
|
814
|
+
You can specify AI case fields either via CLI or in XML properties:
|
|
815
|
+
|
|
816
|
+
**Via CLI `--case-fields`:**
|
|
817
|
+
```bash
|
|
818
|
+
trcli -y \
|
|
819
|
+
-h https://your-instance.testrail.io \
|
|
820
|
+
--project "AI Testing" \
|
|
821
|
+
--case-fields custom_ai_type:1 custom_ai_model:2 \
|
|
822
|
+
-f test_results.xml
|
|
823
|
+
```
|
|
824
|
+
|
|
825
|
+
**Via XML Properties:**
|
|
826
|
+
```xml
|
|
827
|
+
<testcase name="test_llm_chatbot">
|
|
828
|
+
<properties>
|
|
829
|
+
<property name="test_id" value="ai.llm.test_chatbot"/>
|
|
830
|
+
|
|
831
|
+
<!-- AI case fields trigger AI Evaluation template -->
|
|
832
|
+
<!-- custom_ai_type: 1=RAG, 2=ML, 3=LLM -->
|
|
833
|
+
<property name="testrail_case_field" value="custom_ai_type:3"/>
|
|
834
|
+
<!-- custom_ai_model: 1=GPT-5, 2=Gemini 3, 3=Sonnet 3.5 -->
|
|
835
|
+
<property name="testrail_case_field" value="custom_ai_model:1"/>
|
|
836
|
+
|
|
837
|
+
<!-- Optional: Add quality rating -->
|
|
838
|
+
<property name="quality_rating" value='{"factual_accuracy": 4}'/>
|
|
839
|
+
</properties>
|
|
840
|
+
</testcase>
|
|
841
|
+
```
|
|
842
|
+
|
|
843
|
+
#### AI Case Field Values
|
|
844
|
+
|
|
845
|
+
The AI Evaluation template includes two dropdown case fields:
|
|
846
|
+
|
|
847
|
+
**`custom_ai_type`** - Type of AI system:
|
|
848
|
+
- `1` = RAG (Retrieval-Augmented Generation)
|
|
849
|
+
- `2` = ML (Machine Learning)
|
|
850
|
+
- `3` = LLM (Large Language Model)
|
|
851
|
+
|
|
852
|
+
**`custom_ai_model`** - AI model used:
|
|
853
|
+
- `1` = GPT-5
|
|
854
|
+
- `2` = Gemini 3
|
|
855
|
+
- `3` = Sonnet 3.5
|
|
856
|
+
|
|
857
|
+
**Note:** Values must be integers (1-3), not strings.
|
|
858
|
+
|
|
859
|
+
#### Combining Auto-Creation with Multi-Step Results
|
|
860
|
+
|
|
861
|
+
Auto-creation works seamlessly with step-level results for Test Case (Steps) template. Simply include both `quality_rating` and `testrail_result_step` properties:
|
|
862
|
+
|
|
863
|
+
```xml
|
|
864
|
+
<testcase name="test_rag_full_pipeline">
|
|
865
|
+
<properties>
|
|
866
|
+
<property name="test_id" value="ai.rag.test_full_pipeline"/>
|
|
867
|
+
|
|
868
|
+
<!-- Step-level execution tracking -->
|
|
869
|
+
<property name="testrail_result_step" value="passed:Step 1 Query Understanding"/>
|
|
870
|
+
<property name="testrail_result_step" value="passed:Step 2 Vector Search"/>
|
|
871
|
+
<property name="testrail_result_step" value="failed:Step 3 Answer Generation"/>
|
|
872
|
+
|
|
873
|
+
<!-- Overall quality rating (applies to entire test) -->
|
|
874
|
+
<property name="quality_rating" value='{"factual_accuracy": 2, "coherence": 4}'/>
|
|
875
|
+
|
|
876
|
+
<!-- AI case fields for metadata -->
|
|
877
|
+
<property name="testrail_case_field" value="custom_ai_type:1"/>
|
|
878
|
+
<property name="testrail_case_field" value="custom_ai_model:3"/>
|
|
879
|
+
</properties>
|
|
880
|
+
</testcase>
|
|
881
|
+
```
|
|
882
|
+
|
|
883
|
+
#### Template Validation
|
|
884
|
+
|
|
885
|
+
Before creating cases, TRCLI validates that the AI Evaluation template exists in your project. If the template is not found, you'll see:
|
|
886
|
+
|
|
887
|
+
```
|
|
888
|
+
ERROR: Cannot auto-create cases with AI Evaluation template.
|
|
889
|
+
AI Evaluation template not found in project (ID: 1).
|
|
890
|
+
|
|
891
|
+
Please enable the AI Evaluation template in your TestRail project:
|
|
892
|
+
1. Go to Administration > Customizations > Templates
|
|
893
|
+
2. Enable 'AI Evaluation' template for your project
|
|
894
|
+
```
|
|
895
|
+
|
|
896
|
+
#### Robot Framework Support
|
|
897
|
+
|
|
898
|
+
Robot Framework tests also support auto-creation with AI Evaluation template:
|
|
899
|
+
|
|
900
|
+
```robot
|
|
901
|
+
*** Test Cases ***
|
|
902
|
+
Test RAG Pipeline
|
|
903
|
+
[Documentation] - testrail_case_field:custom_ai_type:1
|
|
904
|
+
... - testrail_case_field:custom_ai_model:3
|
|
905
|
+
... - quality_rating:{"factual_accuracy": 5, "relevance": 4}
|
|
906
|
+
... - testrail_result_field:custom_ai_input:What is quantum computing?
|
|
907
|
+
... - testrail_result_field:custom_ai_output:Quantum computing uses...
|
|
908
|
+
[Tags] ai-evaluation
|
|
909
|
+
|
|
910
|
+
# Test steps here
|
|
911
|
+
Should Be Equal ${status} success
|
|
912
|
+
```
|
|
913
|
+
|
|
914
|
+
#### Important Notes
|
|
915
|
+
|
|
916
|
+
1. **Template Requirement**: The AI Evaluation template must be enabled in your TestRail project
|
|
917
|
+
2. **Global vs. Test-Specific**: AI case fields can be specified globally via `--case-fields` or per-test via XML properties
|
|
918
|
+
3. **Field Type**: AI case field values are dropdown IDs (integers 1-3), not strings
|
|
919
|
+
4. **Detection Scope**: Detection checks ALL test cases in the file - if any test has AI indicators, ALL auto-created cases will use the AI Evaluation template
|
|
920
|
+
5. **Compatible with BDD**: Auto-creation is NOT supported for BDD workflows (Cucumber/Gherkin), which have their own template assignment logic
|
|
921
|
+
|
|
488
922
|
## Behavior-Driven Development (BDD) Support
|
|
489
923
|
|
|
490
924
|
The TestRail CLI provides comprehensive support for Behavior-Driven Development workflows using Gherkin syntax. The BDD features enable you to manage test cases written in Gherkin format, execute BDD tests with various frameworks (Cucumber, Behave, pytest-bdd, etc.), and seamlessly upload results to TestRail.
|
|
@@ -1675,7 +2109,7 @@ Options:
|
|
|
1675
2109
|
### Reference
|
|
1676
2110
|
```shell
|
|
1677
2111
|
$ trcli add_run --help
|
|
1678
|
-
TestRail CLI v1.14.
|
|
2112
|
+
TestRail CLI v1.14.2
|
|
1679
2113
|
Copyright 2025 Gurock Software GmbH - www.gurock.com
|
|
1680
2114
|
Usage: trcli add_run [OPTIONS]
|
|
1681
2115
|
|
|
@@ -1885,7 +2319,7 @@ providing you with a solid base of test cases, which you can further expand on T
|
|
|
1885
2319
|
### Reference
|
|
1886
2320
|
```shell
|
|
1887
2321
|
$ trcli parse_openapi --help
|
|
1888
|
-
TestRail CLI v1.14.
|
|
2322
|
+
TestRail CLI v1.14.2
|
|
1889
2323
|
Copyright 2025 Gurock Software GmbH - www.gurock.com
|
|
1890
2324
|
Usage: trcli parse_openapi [OPTIONS]
|
|
1891
2325
|
|