TC-PROD-06
Functional
Retrieving data using the ean parameter
Verify result filtering using the EAN parameter
Specification · xlsx
Steps
- Call the endpoint with a valid EAN code
Expected result
The matching product is returned
Endpoints
GET /product/api/v1/merchant-integration/products Run
- API_URL
https://api.qa2.ananastest.com- EAN
4065423838841
A dry run builds every request without sending it; responses come from a local stub.
Test code
mirrors tests/ProductsTest.php::tc_prod_06()
76// Verify result filtering using the EAN parameter
77public function tc_prod_06(): void
78{
79 $ean = $_ENV['EAN'];
80
81 $response = $this->ananas->getProducts(0, 200, false, $ean);
82
83 $this->assertEquals(200, $response['statusCode']);
84 $this->assertEquals($ean, $response['response'][0]['ean']);
85}
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.