Symptom
- When executing an API test plan in the Test Automation Tool, the API execution step returns 404 NOT_FOUND.
- The check condition step fails with the following details:
| Property | Operator | Expected Value | Actual Value | Error Reason | Required Action |
|---|---|---|---|---|---|
| $RESPONSE_CODE | eq | 201 | 404 | Expected 201 and found value 404 | Check the assert condition |
- The URL shown in Step 1 (Request Information) of the log points to a host other than the S/4HANA Cloud test tenant (for example, a SAP Cloud Integration / CPI endpoint).
Environment
SAP S/4HANA Cloud Public Edition.
Reproducing the Issue
- Open Test Your Processes application.
- Execute the relevant API Test Plan.
- Open the execution log and expand the log details.
Cause
The Communication Role assigned to the API test process step is mapped to a Communication Arrangement whose Communication System points to an incorrect host — such as a SAP Cloud Integration (CPI) tenant — instead of the S/4HANA Cloud Public Edition test tenant. The Test Automation Tool requires a direct connection to the S/4HANA Cloud test tenant for all API automate execution.
Resolution
Step 1 — Verify the Communication System host
- Open the Communication Systems app.
- Open the Communication System referenced by the Communication Arrangement linked to the communication role.
- Confirm the Host Name matches the S/4HANA Cloud test tenant API URL (for example,
my<tenantID>-api.s4hana.cloud.sap). - If the host points to a non-S/4HANA system, correct it or create a new Communication System with the correct host.
Step 2 — Verify the Communication Arrangement
- Open the Communication Arrangements app.
- Open the arrangement linked to the communication role.
- Confirm:
- The Communication System is the S/4HANA host from Step 1.
- The Authentication Method is User ID and Password (Basic Authentication).
- A Communication User is assigned.
- The relevant OData inbound service is listed.
Step 3 — Update the communication role mapping in the Test Automation Tool
- Open the Test Your Processes app.
- Navigate to Maintain Roles→ Users.
- Open the relevant communication user used for this test plan.
- Ensure that the Communication Arrangement selected is the correct and same arrangement from Step 2.
- Enter the correct password.
- Click Save.
Step 4 — Re-execute and verify
- Re-execute the test plan in Test Your Processes.
- Open the execution log and expand Step 1 – Request Information.
- Confirm the URL now shows the S/4HANA Cloud test tenant host.
- Confirm Step 3 (API Execution) returns response code 201.
- Confirm Step 4 (Check Condition) passes — the
$RESPONSE_CODEmatches the expected value configured in the check condition.
See Also
Keywords
Test Your Processes, API test plan, HTTP 404 Not Found, 404, NOT_FOUND, communication arrangement, endpoint misconfiguration, CPI endpoint, S/4HANA endpoint, Test Automation Tool, TAT, CA-CTT-S4C-API, OData, communication role, communication system, API automate. , KBA , CA-CTT-S4C-API , Test Automation Tool Component for API tests , CA-CTT-S4C , CTT-Customer Test Tool, S4C-START for S/4HANA CE , Problem
SAP Knowledge Base Article - Public