TC-PROD-05
Functional
Retrieving data using the search parameter
Verify result filtering using the search parameter
Specification · xlsx
Steps
- Call the endpoint with a defined search parameter
Expected result
Only products matching the search criteria are returned
Endpoints
GET /product/api/v1/merchant-integration/products Run
- API_URL
https://api.qa2.ananastest.com- SEARCH_PARAM
Trunks
A dry run builds every request without sending it; responses come from a local stub.
Test code
mirrors tests/ProductsTest.php::tc_prod_05()
62// Verify result filtering using the search parameter
63public function tc_prod_05(): void
64{
65 $search = $_ENV['SEARCH_PARAM'];
66
67 $response = $this->ananas->getProducts(0, 200, $search);
68
69 $this->assertEquals(200, $response['statusCode']);
70
71 foreach ($response['response'] as $item) {
72 $this->assertStringContainsString($search, $item['name']);
73 }
74}
web/app/Scenarios/ProductsScenarios.php · line numbers refer to this file
Not run yet. Run it against the API, or do a dry run to see the requests it would send.