TC-ADD-03
Negative
Boundary
changes data Exceeding the technical request limits
Verify system behavior when the defined limits are exceeded (payload size or number of products)
! Documented discrepancy · errors.txt
The system fails only when the maximum number of products is exceeded, the large payload size seems to have no effect and leads to code 202.
All tests in this section: All the import tests return the code 202 and not 200 in case of success.
Specification · xlsx
Steps
- Create a payload larger than 5MB and send the request
Expected result
Not specified in the spreadsheet.
Endpoints
POST /product/api/v1/merchant-integration/import Run
- API_URL
https://api.qa2.ananastest.com
A dry run builds every request without sending it; responses come from a local stub.
Test code
mirrors tests/ImportTest.php::tc_add_03()
131// Verify system behavior when the defined limits are exceeded (payload size or number of products)
132public function tc_add_03(): void
133{
134 // $sizeInBytes = 10 * 1024 * 1024;
135 // $payload = str_repeat('X', $sizeInBytes);
136
137 $data = [];
138
139 for ($i = 0; $i < 100000; $i++) {
140 $data[] = [
141 'name' => 'test',
142 'description' => 'test',
143 'coverImage' => 'test',
144 'ean' => 'test',
145 ];
146 }
147
148 $response = $this->ananas->addOrEditInBulk($data);
149 $this->assertEquals(400, $response['statusCode']);
150}
web/app/Scenarios/ImportScenarios.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.