You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add UX verification tool and case recording system (#84)
- Add UIUXViewportTool for visual quality and content accuracy checks
- Implement CentralCaseRecorder for independent test case tracking
- Integrate UX verification into test execution workflow
- Update test runners and agent prompts to support UX testing
Co-authored-by: Sean Liu <[email protected]>
Copy file name to clipboardExpand all lines: webqa_agent/llm/prompt.py
-84Lines changed: 0 additions & 84 deletions
Original file line number
Diff line number
Diff line change
@@ -538,90 +538,6 @@ class LLMPrompt:
538
538
539
539
"""
540
540
541
-
# New: Test case generation prompts
542
-
case_generator_system_prompt="""
543
-
## Role
544
-
You are an expert UI test case generator. Your task is to analyze a webpage and user requirements, then generate comprehensive test cases that thoroughly validate the functionality.
545
-
546
-
## Objective
547
-
Based on the provided webpage HTML/structure and user requirements, you need to:
548
-
1. **Understand the webpage structure** and identify key interactive elements
549
-
2. **Analyze user requirements** to understand what functionality needs to be tested
550
-
3. **Generate comprehensive test steps** that cover the main user workflow
551
-
4. **Include appropriate validations** to ensure the functionality works correctly
552
-
5. **Consider edge cases** and error scenarios when applicable
553
-
554
-
## Test Case Structure
555
-
Each test case should include:
556
-
- **name**: A descriptive name for the test case
557
-
- **steps**: A list of actions and validations
558
-
- **objective**: What the test case aims to validate
Return a JSON object with the following structure:
585
-
```json
586
-
{
587
-
"test_cases": [
588
-
{
589
-
"name": "descriptive_test_name",
590
-
"objective": "what this test validates",
591
-
"steps": [
592
-
{"action": "action instruction"},
593
-
{"verify": "validation instruction"},
594
-
...
595
-
]
596
-
}
597
-
]
598
-
}
599
-
```
600
-
"""
601
-
602
-
case_generator_output_prompt="""
603
-
## Task: Generate Comprehensive Test Cases
604
-
605
-
Based on the provided webpage structure and user requirements, generate detailed test cases that thoroughly validate the functionality.
606
-
607
-
### Webpage Analysis
608
-
Please analyze the page structure and identify:
609
-
1. **Interactive Elements**: buttons, forms, links, inputs, etc.
610
-
2. **Key Features**: main functionalities exposed by the UI
611
-
3. **User Workflows**: typical user journeys through the interface
612
-
4. **Validation Points**: where success/failure can be measured
613
-
614
-
### Test Case Generation Rules
615
-
1. **Start with Basic Flow**: Begin with the most common user workflow
616
-
2. **Add Edge Cases**: Include boundary conditions and error scenarios
617
-
3. **Include Proper Waits**: Add appropriate wait times for dynamic content
618
-
4. **Validate Each Step**: Include assertions to verify expected outcomes
619
-
5. **Use Realistic Data**: Include realistic test data and file paths
620
-
6. **Consider User Experience**: Test from an end-user perspective
621
-
622
-
Generate comprehensive test cases in the specified JSON format. **Do not include code blocks in the output**
623
-
"""
624
-
625
541
page_default_prompt="""
626
542
You are a web content quality inspector. You need to carefully read the text content of the webpage and complete the task based on the user's test objective. Please ensure that the output JSON format does not contain any code blocks or backticks.
0 commit comments