#Shared Steps Overview
Shared Steps allow you to define reusable test steps that can be referenced across multiple test cases. They help reduce duplication, improve consistency, and make maintenance easier when common steps change.
Hawzu supports both Workspace-level and Project-level Shared Steps, giving you flexibility to reuse steps globally or limit them to a specific project.
#What Are Shared Steps?
Shared Steps are reusable step definitions that can be inserted into test cases instead of writing the same steps repeatedly.
They are especially useful for:
- Common login flows
- Repeated setup or teardown steps
- Validation steps used across multiple test cases
- Standardized workflows that must remain consistent
When a shared step is updated, all test cases using it reflect the change automatically.
#Types of Shared Steps
#Workspace Shared Steps
Workspace Shared Steps are defined at the workspace level and are automatically available in all projects.
Key characteristics:
- Created once at the workspace level
- Immediately usable in every project
- No enable/disable toggle per project
- Ideal for organization-wide standards and reusable flows
Examples:
- User login steps
- Environment setup
- Authentication or authorization flows
#Project Shared Steps
Project Shared Steps are defined within a specific project and are available only inside that project.
Key characteristics:
- Scoped to a single project
- Not visible to other projects
- Useful for project-specific workflows
- Can coexist alongside workspace shared steps
Examples:
- Project-specific data setup
- Feature-specific workflows
- Custom validations unique to the project
#Using Shared Steps in Test Cases
Shared Steps can be inserted while editing test cases:
- Via the Insert Shared Step action
- From the step editor menu
- Mixed freely with regular (inline) steps
Once inserted, the shared step appears as a linked block, clearly distinguished from regular steps.
#Update Behavior
Shared Steps follow a single source of truth model:
- Editing a shared step updates it everywhere it is used
- Test cases automatically reflect the latest version
- No manual sync or re-insertion is required
This ensures consistency while reducing maintenance effort.
#Deleting Shared Steps
When deleting a shared step, Hawzu prevents accidental data loss by offering explicit actions.
#Delete Options
If the shared step is currently in use, you must choose one of the following:
#1. Remove from Usages
- The shared step reference is removed from all test cases
- No replacement steps are added
- Test cases remain valid but lose those steps
Use when:
- The step is obsolete
- The workflow should no longer exist
#2. Convert to Regular Steps
- The shared step is replaced with equivalent inline steps
- Each test case keeps its own copy of the steps
- Future updates to the shared step no longer affect those test cases
Use when:
- You want to preserve behavior
- But no longer want centralized control
#When to Use Shared Steps
Use Shared Steps when:
- Steps are reused across multiple test cases
- Consistency is critical
- Maintenance cost needs to be reduced
Avoid Shared Steps when:
- Steps are highly test-specific
- Variations are expected frequently
- The step logic is unstable
#Best Practices
- Use Workspace Shared Steps for global standards
- Use Project Shared Steps for localized workflows
- Keep shared steps focused and small
- Review shared step usage before deleting
- Prefer converting to regular steps instead of hard removal when unsure
#Next Steps