Test Creation Reference
Complete reference for test authoring — step types, configuration, conditions, parameters, and patterns
Complete reference for authoring tests in SmoothDeploy: every step type, every configuration option, conditional execution, variables, frames, and common patterns. New to SmoothDeploy? Start with Your First Test, then return here for depth.
Creation Methods
1. Manual Step Creation
Build tests step-by-step using the visual interface.
When to Use:
- Complex test logic requiring precise control
- Tests with conditional logic
- Integration with external systems
- Custom validation scenarios
Process:
- Navigate to your project
- Click "Create New Test"
- Add steps one by one:
- Select action type from dropdown
- Configure step parameters
- Set execution conditions
- Add assertions or validations
- Organize steps with groups if needed
- Save and name your test
2. Recording Tests
Capture user interactions automatically using the Tauri native app.
When to Use:
- Quick test creation for common workflows
- Learning how actions translate to steps
- Rapid prototyping of test scenarios
- Non-technical team members
Process:
- Open Tauri native app
- Click "Start Recording"
- Navigate to target application
- Perform desired actions:
- Click buttons and links
- Fill form fields
- Navigate between pages
- Interact with elements
- Stop recording
- Review generated steps
- Edit and refine as needed
- Save test
Step Types
Navigation Steps
- Navigate: Go to specific URLs
- Go Back/Forward: Browser navigation
- Refresh: Reload current page
Interaction Steps
- Click: Click buttons, links, elements
- Double Click: Double-click actions
- Right Click: Context menu interactions
- Hover: Mouse hover effects
- Type: Enter text in form fields
- Clear: Clear input fields
- Select: Choose from dropdowns
Validation Steps
- Assert Text: Verify text content
- Assert Element: Check element presence
- Assert Attribute: Validate element attributes
- Assert URL: Verify current URL
- Screenshot: Capture visual state
Advanced Steps
- Wait: Pause execution for specified time
- Wait for Element: Wait for element to appear
- Scroll: Scroll page or elements
- Upload File: Handle file uploads
- Download: Manage file downloads
Step Configuration
Basic Parameters
Each step type has specific parameters:
Click Steps:
- Target selector (CSS, XPath, text)
- Click options (left, right, double)
- Wait conditions
Type Steps:
- Input text or variables
- Clear existing text
- Special key combinations
Assert Steps:
- Expected values
- Comparison operators
- Timeout settings
Advanced Options
Conditions:
- Always Run: Execute every time
- If Element Exists: Conditional execution
- If Variable Equals: Value-based conditions
- Custom Logic: JavaScript expressions
Variables:
- Use
{{variableName}}syntax - Access test parameters
- Reference previous step outputs
- Environment-specific values
Frames:
- Target specific iframes
- Handle nested frame contexts
- Switch between frame contexts
Best Practices
Test Structure
- Start with clear test objectives
- Use descriptive step names
- Group related actions
- Add meaningful assertions
Reusability
- Create shared steps for common actions
- Use variables for dynamic values
- Build step libraries for your domain
- Document step purposes
Maintenance
- Keep tests focused and atomic
- Use data-driven approaches
- Regular review and updates
- Version control integration
Performance
- Minimize unnecessary waits
- Use efficient selectors
- Optimize test execution time
- Consider parallel execution
Common Patterns
Login Flow
- Navigate to login page
- Type username
- Type password
- Click login button
- Assert successful login
Form Submission
- Navigate to form
- Fill required fields
- Select options
- Submit form
- Verify success message
Data Validation
- Navigate to data view
- Assert data presence
- Verify data accuracy
- Check data formatting
- Validate calculations
Troubleshooting
Recording Issues
- Ensure target application is accessible
- Check browser compatibility
- Verify element selectors
- Review step parameters
Manual Creation
- Validate step configurations
- Test individual steps
- Check variable references
- Verify assertions
Common Errors
- Element not found: Update selectors
- Timeout errors: Adjust wait times
- Variable errors: Check syntax and scope
- Assertion failures: Verify expected values