Shared Steps
Shared Steps allow you to create reusable step groups that can be referenced across multiple test cases, reducing duplication and improving maintenance of common testing procedures.
Overview
Shared Steps provide:
- Reusable step libraries for common testing patterns
- Centralized maintenance of frequently used procedures
- Cross-project sharing of standardized test steps
- Version control for step group changes
- Efficient test case creation through step reuse
What are Shared Steps?
Shared Steps are predefined groups of test steps that can be inserted into multiple test cases. They're particularly useful for:
- Login procedures used across many tests
- Setup and teardown operations
- Common navigation flows
- Standard verification steps
- Data preparation procedures
Example Use Cases
Login Shared Step:
1. Navigate to login page
2. Enter username: {{username}}
3. Enter password: {{password}}
4. Click login button
5. Verify user is logged in
Product Search Shared Step:
1. Navigate to search page
2. Enter search term: {{search_term}}
3. Click search button
4. Verify search results are displayed
Creating Shared Steps
Accessing Shared Steps
- Navigate to your project
- Click Shared Steps in the left sidebar
- Click Add Shared Step Group to create new shared steps
Creating a Shared Step Group
-
Basic Information
- Name: Descriptive name for the step group
- Description: Purpose and usage notes
- Tags: Categorization tags
-
Step Definition
- Add individual steps using the step editor
- Include expected results for each step
- Use parameter placeholders for reusable values
-
Parameters
- Define parameters using
{{parameter_name}}syntax - Set default values for parameters
- Add parameter descriptions for clarity
- Define parameters using
Step Editor Features
Rich Text Formatting:
- Bold, italic, underline text
- Bullet points and numbered lists
- Code blocks and syntax highlighting
- Links and references
Parameter Support:
- Use
{{parameter_name}}for dynamic values - Parameters automatically detected and configurable
- Default values and validation rules
Attachments:
- Add reference images or documents
- Include template files or examples
- Attach configuration files
Using Shared Steps in Test Cases
Inserting Shared Steps
When creating or editing a test case:
- Click Insert Shared Step in the step editor
- Browse or search available shared step groups
- Select the desired shared step group
- Configure parameter values
- Insert into your test case
Parameter Configuration
When inserting shared steps:
- Review Parameters: See all available parameters
- Set Values: Provide specific values for this test case
- Use Defaults: Keep default values where appropriate
- Validation: Ensure required parameters are filled
Example parameter configuration:
Shared Step: User Login
Parameters:
- username: "[email protected]"
- password: "SecurePassword123"
- expected_role: "Administrator"
Step References
Shared steps appear in test cases as references:
Step 3: [Shared] User Login
→ Username: [email protected]
→ Password: SecurePassword123
→ Expected Role: Administrator
Step 4: Navigate to dashboard
Step 5: Verify admin menu is visible
Managing Shared Steps
Viewing Shared Steps
The Shared Steps page displays:
- Name and Description: Overview of each step group
- Usage Count: Number of test cases using these steps
- Last Modified: Recent change information
- Tags: Categorization and filtering
- Actions: Edit, copy, delete options
Editing Shared Steps
- Click the Edit button on a shared step group
- Modify steps, parameters, or metadata
- Save changes
- All referencing test cases automatically updated
Editing shared steps affects ALL test cases that use them. Review usage before making changes.
Versioning Shared Steps
Shared steps support version history:
- View History: See all previous versions
- Compare Versions: Diff between versions
- Restore Version: Revert to previous version
- Version Notes: Add change descriptions
Copying Shared Steps
Create variations of existing shared steps:
- Click Copy on an existing shared step group
- Modify the copied version
- Save with a new name
- Original shared steps remain unchanged
Advanced Features
Cross-Project Sharing
Share step groups across multiple projects:
- Export Shared Steps: Export to file format
- Import to Project: Import into target project
- Maintain Separately: Each project can modify independently
- Template Sharing: Create organization-wide templates
Search and Filtering
Find shared steps efficiently:
- Text Search: Search in names and descriptions
- Tag Filtering: Filter by category tags
- Usage Filtering: Find frequently or rarely used steps
- Recent Activity: See recently modified steps
Bulk Operations
Manage multiple shared steps:
- Bulk Edit: Update tags or descriptions
- Bulk Export: Export multiple step groups
- Bulk Delete: Remove unused step groups
- Batch Import: Import multiple step groups
Best Practices
Creating Effective Shared Steps
- Single Responsibility: Each shared step should have one clear purpose
- Descriptive Names: Use clear, searchable names
- Parameter Usage: Make steps flexible with parameters
- Documentation: Include good descriptions and examples
- Logical Grouping: Group related steps together
Parameter Design
- Meaningful Names: Use descriptive parameter names
- Default Values: Provide sensible defaults
- Validation: Include parameter requirements
- Documentation: Explain parameter usage
Organization and Maintenance
- Consistent Naming: Follow naming conventions
- Regular Reviews: Periodically review and clean up
- Usage Monitoring: Track which steps are actively used
- Version Control: Use version history effectively
- Team Coordination: Coordinate changes with team members
Performance Considerations
- Step Complexity: Keep shared steps reasonably sized
- Nesting Limits: Avoid deeply nested shared step references
- Parameter Count: Limit number of parameters per step group
- Regular Cleanup: Remove unused shared steps
Examples
Common Shared Step Patterns
Application Login:
Name: Standard User Login
Parameters: username, password, expected_page
Steps:
1. Navigate to {{base_url}}/login
2. Enter username: {{username}}
3. Enter password: {{password}}
4. Click "Sign In" button
5. Wait for page load
6. Verify current page is {{expected_page}}
Database Setup:
Name: Test Data Preparation
Parameters: dataset_name, cleanup_option
Steps:
1. Connect to test database
2. Run cleanup script if {{cleanup_option}} is true
3. Load dataset: {{dataset_name}}
4. Verify data integrity
5. Log setup completion
API Authentication:
Name: Get API Access Token
Parameters: client_id, client_secret, scope
Steps:
1. Send POST to /oauth/token
2. Include client_id: {{client_id}}
3. Include client_secret: {{client_secret}}
4. Include scope: {{scope}}
5. Store returned access_token
6. Verify token is valid
Troubleshooting
Common Issues
Missing Parameters:
- Ensure all required parameters are defined
- Check parameter names match exactly
- Verify default values are provided where needed
Step Reference Errors:
- Shared step may have been deleted or renamed
- Check if you have access to the shared step
- Verify shared step is in the same project
Performance Issues:
- Large shared steps may slow test case loading
- Consider breaking complex steps into smaller groups
- Remove unused parameters and steps
Resolution Steps
- Check Access: Ensure you have permission to view/edit shared steps
- Verify References: Confirm shared steps still exist
- Update Parameters: Ensure parameter values are valid
- Review Changes: Check recent modifications to shared steps
- Contact Admin: Get help with access or technical issues
API Reference
Get Shared Steps
GET /api/projects/{projectId}/shared-steps
Create Shared Step Group
POST /api/projects/{projectId}/shared-steps
Content-Type: application/json
{
"name": "User Login",
"description": "Standard login procedure",
"steps": [
{
"action": "Navigate to login page",
"expected": "Login form displays"
}
],
"parameters": [
{
"name": "username",
"defaultValue": "testuser",
"required": true
}
]
}
Use Shared Step in Test Case
POST /api/test-cases/{caseId}/steps
Content-Type: application/json
{
"type": "shared_step",
"sharedStepId": "uuid",
"parameters": {
"username": "specific_user",
"password": "specific_password"
}
}