This guide demonstrates how to use Smooth for automated QA testing. You’ll learn to create comprehensive test scenarios that validate user workflows, form submissions, and application functionality.
1
Define Test Scenarios
Structure your QA test with clear validation criteria. Define what constitutes success and failure for each test case.
Python
Copy
Ask AI
test_scenario = """Test this flow on apple.com:1. Navigate to the apple website2. Go to the page to buy the latest iphone3. Select the basic configuration, black, maximum storage4. No trade in5. Return the price options"""
2
Run Comprehensive Tests
Execute your test scenario.
Python
Copy
Ask AI
from smooth import SmoothClientsmooth_client = SmoothClient(api_key="cmzr-YOUR_API_KEY")task = smooth_client.run( task=test_scenario, enable_recording=True # For QA testing, we recommend enabling recording for later analysis)print(f"Live URL: {task.live_url()}")task_result = task.result()print(f"Agent Response: {task_result.output}")print(f"Task Video: {task_result.recording_url}")
The agent will systematically execute each test step and provide the requested information.
3
Validate Edge Cases
Test boundary conditions and error handling by creating scenarios with invalid inputs or unusual user behavior.
Python
Copy
Ask AI
edge_case_test = """Test form validation on https://github.com/signup:1. Try submitting with empty required fields2. Enter invalid email formats (test@, @example.com, plain text)3. Verify error messages are clear and helpfulReport any issues. If none, just say it."""task = smooth_client.run(task=edge_case_test, max_steps=24)task_result = task.result()print(f"Agent Response: {task_result.output}")print(f"Task Video: {task_result.recording_url}")
Functional Testing: Verify features work as intended
Form Validation: Test input validation and error handling
Navigation Testing: Ensure all links and menus function correctly
QA testing with Smooth provides real browser interaction, making it ideal for testing web applications and complex user interfaces that traditional testing tools might miss.