Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Search with valid product keyword
Search with no matching products
Search with a typo in the keyword
Search with special characters
Search using multiple keywords
Search performance under load
Search accessibility compliance
Search bar responsiveness on different devices
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
Feature: Search functionality of the e-commerce website

Background:
Given the API base URL is set to '<base_url>'
And the authorization header is '<auth_token>'
And the content type is 'application/json'

Scenario: Search with valid product keyword
Given the API endpoint '/search?query=sports+shoes'
When I send a GET request
Then the response status should be 200
And the response body should contain a list of products
And the response should include filtering and sorting options

Scenario: Search with no matching products
Given the API endpoint '/search?query=unicorn+lamps'
When I send a GET request
Then the response status should be 200
And the response body should contain a message "No matching products found"
And the response body should include suggestions for related or popular products

Scenario: Search with a typo in the keyword
Given the API endpoint '/search?query=sprts+shoes'
When I send a GET request
Then the response status should be 200
And the response body should contain a message "Did you mean sports shoes?"
And the response body should include a list of products matching the corrected keyword

Scenario: Search with special characters
Given the API endpoint '/search?query=@#$%^'
When I send a GET request
Then the response status should be 200
And the response body should contain a message "No matching products found" or similar
And special characters should not break the system's functionality

Scenario: Search using multiple keywords
Given the API endpoint '/search?query=running+shoes+blue'
When I send a GET request
Then the response status should be 200
And the response body should contain a list of products that match all the entered keywords

Scenario: Search performance under load
Given a performance testing tool simulating concurrent API hits
When 1000 users simultaneously send GET requests to '/search?query=random_keywords'
Then the average response time for all requests should be under 2 seconds
And the response status for all requests should be 200

Scenario: Search accessibility compliance
Given the testing environment is using screen readers (e.g., JAWS, NVDA)
And all interaction is limited to keyboard inputs
When the user performs a search using the API '/search?query=sports+shoes'
Then the response status should be 200
And the system should provide descriptive feedback for API responses through the screen reader

Scenario: Search bar responsiveness on different devices
Given multiple devices such as desktop, mobile, and tablet
When the API endpoint '/search?query=sports+shoes' is tested under different resolutions
Then the response status should be 200 for all devices
And the response body should contain a fully functional list of products with no missing or misaligned data
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"scenarios": [
{
"type": "functional",
"title": "Search with valid product keyword",
"description": "Ensure the system displays matching products when a valid keyword is entered.",
"testId": "TC-001",
"testDescription": "A user enters a valid product keyword into the search bar and initiates a search.",
"prerequisites": "User is connected to the internet and the product database is available.",
"stepsToPerform": "1. Enter the e-commerce website.\n2. Locate the search bar at the top of the page.\n3. Type a valid product keyword (e.g., 'sports shoes') into the search field.\n4. Click the search button or press Enter.",
"expectedResult": "The system displays a list of products matching the entered keyword, along with filtering and sorting options."
},
{
"type": "functional",
"title": "Search with no matching products",
"description": "Ensure the system informs the user when no products match the keyword and suggests alternatives.",
"testId": "TC-002",
"testDescription": "A user enters a keyword that does not match any product in the database.",
"prerequisites": "User is connected to the internet and the product database is available.",
"stepsToPerform": "1. Enter the e-commerce website.\n2. Locate the search bar at the top of the page.\n3. Type a keyword that does not exist in the database (e.g., 'unicorn lamps').\n4. Click the search button or press Enter.",
"expectedResult": "The system displays a message saying 'No matching products found,' and suggestions for related or popular products."
},
{
"type": "functional",
"title": "Search with a typo in the keyword",
"description": "Ensure the system suggests alternative keywords when a typo is detected.",
"testId": "TC-003",
"testDescription": "A user enters a keyword with a typographical error to test the system's ability to suggest corrections.",
"prerequisites": "User is connected to the internet and the product database is available.",
"stepsToPerform": "1. Enter the e-commerce website.\n2. Locate the search bar at the top of the page.\n3. Type a keyword with a typo (e.g., 'sprts shoes').\n4. Click the search button or press Enter.",
"expectedResult": "The system suggests closely matching correct keywords (e.g., 'Did you mean sports shoes?') and displays the corresponding product results."
},
{
"type": "functional",
"title": "Search with special characters",
"description": "Ensure that the system gracefully handles special characters in the search query.",
"testId": "TC-004",
"testDescription": "A user inputs special characters into the search bar to verify that it doesn't break the system.",
"prerequisites": "User is connected to the internet and the product database is available.",
"stepsToPerform": "1. Enter the e-commerce website.\n2. Locate the search bar at the top of the page.\n3. Enter a search query containing special characters (e.g., '@#$%^').\n4. Click the search button or press Enter.",
"expectedResult": "The system displays 'No matching products found' or ignores special characters and performs the search based on the remaining valid text."
},
{
"type": "functional",
"title": "Search using multiple keywords",
"description": "Ensure the system displays results that match all keywords entered.",
"testId": "TC-005",
"testDescription": "A user searches using multiple applicable keywords to test the system's ability to handle complex queries.",
"prerequisites": "User is connected to the internet and the product database is available.",
"stepsToPerform": "1. Enter the e-commerce website.\n2. Locate the search bar at the top of the page.\n3. Enter multiple valid keywords (e.g., 'running shoes blue').\n4. Click the search button or press Enter.",
"expectedResult": "The system displays a list of products that match all the entered keywords."
},
{
"type": "non-functional",
"title": "Search performance under load",
"description": "Ensure the search operation performs efficiently under heavy user traffic.",
"testId": "TC-006",
"testDescription": "Simulate multiple concurrent users performing searches to verify the system's performance under load.",
"prerequisites": "Performance testing tools are available, and the product database contains a significant number of records.",
"stepsToPerform": "1. Simulate 1000 users concurrently accessing the search bar.\n2. Each user performs a search with random valid and invalid keywords.\n3. Measure the system's response time and ensure it meets performance benchmarks.",
"expectedResult": "The system handles the load efficiently with a response time under 2 seconds for all users."
},
{
"type": "non-functional",
"title": "Search accessibility compliance",
"description": "Ensure that the search bar and results comply with accessibility standards.",
"testId": "TC-007",
"testDescription": "Verify that the search functionality is accessible for users with disabilities.",
"prerequisites": "The website should be tested on a browser with screen readers and accessibility tools.",
"stepsToPerform": "1. Enable a screen reader (e.g., JAWS or NVDA).\n2. Navigate to the search bar using keyboard controls.\n3. Perform a search using only the keyboard.\n4. Listen to the screen reader's feedback during the interaction.",
"expectedResult": "The search bar is fully navigable using the keyboard, and the screen reader provides descriptive and accurate feedback for all interactions."
},
{
"type": "non-functional",
"title": "Search bar responsiveness on different devices",
"description": "Ensure the search bar functions correctly on devices of various screen sizes.",
"testId": "TC-008",
"testDescription": "Verify that the search bar is accessible and usable across mobile phones, tablets, and desktops.",
"prerequisites": "Access to multiple devices or browser tools to simulate different resolutions.",
"stepsToPerform": "1. Open the website on a desktop browser.\n2. Perform a search using the search bar.\n3. Repeat the test on a mobile phone and a tablet.\n4. Check if the search bar is clearly visible, accessible, and functional across all devices.",
"expectedResult": "The search bar is responsive and fully functional on all devices, with no visual or functional issues."
}
]
}
Binary file not shown.