Accepting and Modifying Tests
Learn how to review, accept, and modify automatically generated tests in Bugster SDK
Introduction
After Bugster SDK captures user stories and generates test scenarios, the next crucial step is reviewing, accepting, and, if necessary, modifying these tests. This process ensures that your test suite accurately reflects desired user behaviors and covers all critical paths in your application. This guide will walk you through the steps of effectively managing your generated tests.
Accessing the Test Management 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 Management” to access the Test Management Dashboard.
Understanding the Test Management Dashboard
The Test Management Dashboard provides an overview of all generated tests. Here’s what you’ll see:
- Test List: A list of all generated tests, sorted by creation date.
- Status Indicators: Icons showing the status of each test (e.g., New, Accepted, Modified, Failed).
- Filters: Options to filter tests based on various criteria.
- Search Bar: A tool to search for specific tests.
- Batch Actions: Buttons for performing actions on multiple selected tests.
Reviewing Generated Tests
To review a generated test:
- Click on a test in the list to expand its details.
- You’ll see:
- Test Name: Automatically generated based on the user story.
- Test Steps: A detailed list of actions the test will perform.
- Assertions: Checkpoints that verify expected outcomes.
- Related User Story: Link to the original user story that generated this test.
- Coverage Information: What parts of your application this test covers.
Accepting Tests
If a generated test looks good and doesn’t require modifications:
- Review the test details thoroughly.
- Click the “Accept” button at the bottom of the test details panel.
- The test status will change to “Accepted” and it will be added to your active test suite.
You can batch accept multiple tests by selecting them in the list and using the “Accept Selected” button.
Modifying Tests
If a test requires changes:
- Click the “Modify” button in the test details panel.
- You’ll enter the Test Editor mode, where you can:
- Edit test steps
- Modify or add assertions
- Adjust input data
- Change selectors for elements
Editing Test Steps
- Click on a step to edit its details.
- You can:
- Change the action type (e.g., click, input, wait)
- Modify element selectors
- Adjust wait times
- Add or remove steps
Modifying Assertions
- Scroll to the Assertions section.
- Click “Add Assertion” to include new checkpoints.
- For existing assertions, you can:
- Edit the expected outcome
- Change the element being asserted
- Remove unnecessary assertions
Adjusting Test Data
- Look for steps that involve input or data verification.
- Click on these steps to modify the data being used.
- You can use variables for dynamic data by enclosing them in curly braces, e.g.,
{username}
.
Using the Code View
For advanced users:
- Click “Switch to Code View” to see and edit the test in code format.
- Make your changes directly in the code.
- Click “Apply Changes” to save your modifications.
Saving and Versioning Modified Tests
After making modifications:
- Click “Save Changes” to update the test.
- You’ll be prompted to add a comment describing your changes.
- The test will be saved as a new version, with the ability to revert if needed.
Running Modified Tests
To ensure your modifications work as expected:
- Click the “Run Test” button in the test details panel.
- Watch the test execution in real-time or wait for results.
- Review the test results and make further modifications if necessary.
Best Practices for Accepting and Modifying Tests
- Thorough Review: Carefully review each generated test before accepting.
- Maintain Intent: When modifying, ensure you keep the original intent of the user story.
- Optimize for Reusability: Look for opportunities to make tests more generic and reusable.
- Balance Coverage and Maintenance: Aim for comprehensive coverage without creating redundant or overly specific tests.
- Use Descriptive Names: Rename tests to clearly describe their purpose.
- Document Changes: Always add clear comments when modifying tests to help team understanding.
Handling Edge Cases
- Identify edge cases in user behavior that may not be covered by generated tests.
- Create new tests specifically for these edge cases by clicking “Create New Test” in the dashboard.
- Design these tests to complement your generated test suite.
Collaboration and Review Process
Bugster SDK supports team collaboration in test management:
- Use the “Request Review” button to ask team members to review your modifications.
- Reviewers can comment on specific parts of the test.
- Use the “Approve” or “Request Changes” buttons to complete the review process.
Troubleshooting Common Issues
- Test Fails After Modification: Review recent application changes, check for updated selectors, and verify test data.
- Unable to Save Changes: Ensure you have the necessary permissions and that all required fields are filled.
- Inconsistent Test Results: Check for timing issues, async operations, or environmental factors that might affect test reliability.
Next Steps
Now that you understand how to accept and modify tests, you’re ready to start Grouping and Organizing Tests to create a structured and manageable test suite.
If you need any assistance with accepting or modifying tests, don’t hesitate to contact our support team.