Ananas APItest bench
staging api.qa2.ananastest.com
TC-AUTH-03 Negative

Invalid credentials

Verify system behavior when incorrect access credentials are sent

Specification · xlsx

Steps

  1. Call the endpoint with incorrect credentials

Expected result

HTTP 401 Unauthorized; clear error message

Endpoints

POST /iam/api/v1/auth/tokenGET /order/api/v1/merchant-integration/outbound-orders/statuses

Run

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

Change parameters

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

Test code

mirrors tests/TokenTest.php::tc_auth_03()
33// Verify system behavior when incorrect access credentials are sent
34public function tc_auth_03(): void
35{
36 $ananasIncorrect = new AnanasAPI(
37 $this->client(),
38 $_ENV['API_URL'],
39 'incorrect_client_id',
40 'incorrect_client_secret'
41 );
42
43 $response = $ananasIncorrect->getToken();
44 $this->assertEquals(401, $response['statusCode']);
45}

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