Ananas APItest bench
staging api.qa2.ananastest.com
TC-PRICE-06 Negative Validation changes data

Updating with an invalid price

Verify price value validation

Specification · xlsx

Steps

  1. Send a negative or invalid value

Expected result

The system returns an error in the response

Endpoints

PUT /product/api/v1/merchant-integration/product/bulk

Run

API_URL
https://api.qa2.ananastest.com
TARGET_ID
2555660

Change parameters

A dry run builds every request without sending it; responses come from a local stub.

Test code

mirrors tests/BulkTest.php::tc_price_06()
108// Verify price validation
109public function tc_price_06(): void
110{
111 $targetId = (int) $_ENV['TARGET_ID'];
112
113 $productData = [
114 [
115 'id' => $targetId,
116 'basePrice' => -123456,
117 ],
118 ];
119
120 $response = $this->ananas->editInBulk($productData);
121
122 $this->assertEquals(200, $response['statusCode']);
123 $this->assertEquals('FAIL', $response['response'][0]['status']);
124}

web/app/Scenarios/BulkScenarios.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.