Grouping and Organizing Tests
Learn how to efficiently structure and manage your test suite in Bugster SDK
Introduction
Effectively grouping and organizing your tests is crucial for maintaining a scalable, manageable, and efficient test suite. Bugster SDK provides powerful tools to help you structure your tests logically, making it easier to run, maintain, and analyze your automated tests. This guide will walk you through the process of organizing your test suite for optimal performance and clarity.
Accessing the Test Organization Dashboard
- Log in to your Bugster SDK account at https://bugster.app/.
- Navigate to your project by selecting it from the project dropdown menu.
- In the left sidebar, click on “Test Organization” under the Test Management section.
Understanding Test Organization Concepts
Before diving into the specifics, let’s review key concepts in Bugster SDK’s test organization:
- Test Cases: Individual tests generated from user stories or created manually.
- Test Suites: Collections of related test cases.
- Tags: Labels that can be applied to test cases for easy filtering and organization.
- Folders: Hierarchical structures to group related test suites and cases.
- Dependencies: Relationships between tests that determine execution order.
Creating and Managing Folders
Folders help you create a hierarchical structure for your tests:
- Click the “New Folder” button in the Test Organization Dashboard.
- Name your folder (e.g., “User Authentication”, “Shopping Cart”).
- Drag and drop test suites or other folders into this new folder.
Use folders to mirror your application’s structure or to group tests by feature area.
Creating and Managing Test Suites
Test suites allow you to group related test cases:
- Click “Create Test Suite” in the dashboard.
- Name your suite and provide a description.
- Choose a folder to place the suite in, if applicable.
- Add test cases to the suite by dragging and dropping them from the test list.
Nested Test Suites
You can create nested test suites for more granular organization:
- Right-click on an existing test suite.
- Select “Create Nested Suite”.
- Name and configure the nested suite as you would a regular suite.
Tagging Tests
Tags provide a flexible way to categorize and filter tests:
- Select a test case or multiple cases.
- Click the “Add Tag” button.
- Enter a new tag or select from existing tags.
- Common tag categories include:
- Priority levels (e.g., “High”, “Medium”, “Low”)
- Test types (e.g., “Smoke”, “Regression”, “Performance”)
- Features (e.g., “Login”, “Checkout”, “Search”)
You can apply multiple tags to a single test for more precise categorization.
Setting Up Test Dependencies
To ensure tests run in the correct order:
- Select a test case in the dashboard.
- Click “Manage Dependencies”.
- Choose tests that should run before the selected test.
- Set the dependency type (e.g., “Must Pass”, “Must Run”).
Bulk Operations
For efficient management of large test suites:
- Use the checkbox to select multiple tests.
- Apply bulk actions like:
- Moving to a folder or suite
- Applying tags
- Setting dependencies
- Deleting or disabling tests
Searching and Filtering
Utilize the powerful search and filter capabilities:
- Use the search bar to find tests by name, ID, or content.
- Apply filters based on:
- Tags
- Folders
- Test suites
- Last run status
- Creation date
Best Practices for Test Organization
- Consistent Naming Conventions: Use clear, consistent names for folders, suites, and tests.
- Balanced Structure: Aim for a structure that’s neither too shallow nor too deep.
- Purpose-Driven Organization: Group tests based on features, user flows, or testing types.
- Use Tags Effectively: Create a standardized set of tags and apply them consistently.
- Regular Maintenance: Periodically review and refactor your test organization.
- Document Your Structure: Maintain documentation explaining your organization strategy.
Advanced Organization Techniques
Dynamic Test Suites
Create dynamic test suites based on criteria:
- Click “Create Dynamic Suite”.
- Set rules (e.g., all tests tagged “Critical” and “API”).
- Tests matching these criteria will automatically be included.
Test Plans
Create test plans for specific testing cycles:
- Go to the “Test Plans” section.
- Click “Create Test Plan”.
- Select tests or entire suites to include.
- Set execution order and environment settings.
Collaboration and Sharing
Enhance team collaboration:
- Use the “Share” button to give team members access to specific folders or suites.
- Set permissions (View, Edit, Manage) for shared items.
- Use comments to discuss organization strategies with your team.
Exporting and Reporting
Generate reports on your test organization:
- Click “Generate Report” in the Test Organization Dashboard.
- Choose report type (e.g., Test Structure, Tag Distribution).
- Export in your preferred format (PDF, CSV, JSON).
Integrating with CI/CD
Leverage your test organization in your CI/CD pipeline:
- Use the Bugster SDK API to fetch tests based on tags or suite structure.
- Integrate with your CI/CD tools to run specific suites or tagged tests.
- Update test metadata (e.g., last run status) via the API after CI/CD runs.
Troubleshooting
- Tests Not Appearing in Expected Location: Check filters, ensure tests are not hidden, verify correct folder/suite assignment.
- Unable to Create Suites or Folders: Confirm you have the necessary permissions.
- Inconsistent Tag Behavior: Review tag assignments, check for typos in tag names.
Next Steps
With your tests now properly organized, you’re ready to start Running and Analyzing Test Results. An well-organized test suite will make this process much more efficient and insightful.
If you need any assistance with grouping and organizing your tests, don’t hesitate to contact our support team.