Assume you are a software QA and start to write test cases for a new feature.
再來是我希望它能夠產出我想要的內容與格式
1 2
Test scope must include happy path, exception cases and boundary tests. Each test cases should contains test target, expected result and test scenarios.
Here is the new feature. User need to login backoffice first, then landing to report query page.
There are 2 filters: 1. DateRange. Allowing user to set Start and End date to query report. This field is mandatory. 2. Brand. There are many brands' data in database. This option allowing user to choose which brand to they want to see in this report. If the filter is non-set, then default to query all brands data.
When user click the query button, then show the query result.
Test Target: Successfully query report with valid Date Range and Brand filter.
Test Scenario:
Login to backoffice. Navigate to report query page. Set Start and End Date range. Select a specific brand from the Brand dropdown. Click on the Query button. Verify that the query result is displayed. Verify that the result only contains data within the specified date range and brand filter. Expected Result: Query result is displayed and contains data within the specified date range and brand filter.
Test Case 2: Exception Case
Test Target: Error message is displayed when Start Date is after End Date.
Test Scenario:
Login to backoffice. Navigate to report query page. Set Start Date to a date later than End Date. Select a brand from the Brand dropdown. Click on the Query button. Expected Result: Error message is displayed indicating that the Start Date cannot be after the End Date.
Test Case 3: Boundary Test
Test Target: Query report with the maximum Date Range and all brands.
Test Scenario:
Login to backoffice. Navigate to report query page. Set the Start Date to the earliest date in the database. Set the End Date to the latest date in the database. Do not select any brand from the Brand dropdown. Click on the Query button. Verify that the query result is displayed. Verify that the result contains all the data in the database. Expected Result: Query result is displayed and contains all data in the database within the maximum date range and for all brands.
Test Case 4: Exception Case
Test Target: Error message is displayed when Date Range is not set.
Test Scenario:
Login to backoffice. Navigate to report query page. Do not set any value for the Date Range. Select a brand from the Brand dropdown. Click on the Query button. Expected Result: Error message is displayed indicating that the Date Range is mandatory and needs to be set.
Test Case 5: Boundary Test
Test Target: Query report with the minimum Date Range and a specific brand.
Test Scenario:
Login to backoffice. Navigate to report query page. Set the Start and End Date to the same date. Select a specific brand from the Brand dropdown. Click on the Query button. Verify that the query result is displayed. Verify that the result contains data for the specified date and brand. Expected Result: Query result is displayed and contains data for the specified date and brand.