TC-AUTH-01
Positive
Obtaining a token with valid credentials
Verify that the system returns a valid access token
Specification · xlsx
Steps
- Call the get-token endpoint with valid credentials
- Analyze the response
Expected result
HTTP 200 OK; response contains access_token; the token is not empty
Endpoints
POST /iam/api/v1/auth/tokenGET /order/api/v1/merchant-integration/outbound-orders/statuses 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/TokenTest.php::tc_auth_01()
16// Verify that the system returns a valid access token
17public function tc_auth_01(): void
18{
19 $response = $this->ananas->getToken();
✗20 $this->assertEquals(200, $response['statusCode']);
21}
web/app/Scenarios/TokenScenarios.php · line numbers refer to this file
Assertions
| Line | Assertion | Expected | Actual | |
|---|---|---|---|---|
| ✗ | 20 | assertEquals |
200 |
504 |
The run stopped at the first failed assertion, as PHPUnit does.
HTTP exchanges 1
1 POST /iam/api/v1/auth/token 504 Gateway Time-out 10.01 s
Request
POST
https://api.qa2.ananastest.com/iam/api/v1/auth/token- Content-Length
- 219
- User-Agent
- GuzzleHttp/7
- Content-Type
- application/json
- Host
- api.qa2.ananastest.com
JSON · 219 B
{
"clientId": "5iliufdg44q6ett7gk79h2m8e9",
"clientSecret": "h0pf3bfAC7WI23ImSRr1k92S6oNQr9KXmhr1toafO2igUDUlqhZM7U8TpCmYC+yoOPBshC4WlNtoo94/2wibOiUofQo=",
"grantType": "CLIENT_CREDENTIALS",
"scope": "public_api/full_access"
}
Response
504 Gateway Time-out 10.01 s
- Server
- awselb/2.0
- Date
- Wed, 11 Nov 2026 13:54:02 GMT
- Content-Type
- text/html
- Content-Length
- 132
- Connection
- keep-alive
Text · 132 B
<html> <head><title>504 Gateway Time-out</title></head> <body> <center><h1>504 Gateway Time-out</h1></center> </body> </html>
cURL
curl -X POST 'https://api.qa2.ananastest.com/iam/api/v1/auth/token' \
-H 'Content-Type: application/json' \
--data-raw '{"clientId":"5iliufdg44q6ett7gk79h2m8e9","clientSecret":"h0pf3bfAC7WI23ImSRr1k92S6oNQr9KXmhr1toafO2igUDUlqhZM7U8TpCmYC+yoOPBshC4WlNtoo94\/2wibOiUofQo=","grantType":"CLIENT_CREDENTIALS","scope":"public_api\/full_access"}'