SAP Knowledge Base Article - Public

3836535 - Test plan fails with 404 Not Found in Test Your Processes

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:
PropertyOperatorExpected ValueActual ValueError ReasonRequired Action
$RESPONSE_CODEeq201404Expected 201 and found value 404Check 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

  1. Open Test Your Processes application. 
  2. Execute the relevant API Test Plan. 
  3. 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

  1. Open the Communication Systems app.
  2. Open the Communication System referenced by the Communication Arrangement linked to the communication role.
  3. Confirm the Host Name matches the S/4HANA Cloud test tenant API URL (for example, my<tenantID>-api.s4hana.cloud.sap).
  4. 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

  1. Open the Communication Arrangements app.
  2. Open the arrangement linked to the communication role.
  3. 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

  1. Open the Test Your Processes app. 
  2. Navigate to Maintain Roles→ Users.
  3. Open the relevant communication user used for this test plan.
  4. Ensure that the Communication Arrangement selected is the correct and same arrangement from Step 2.
  5. Enter the correct password. 
  6. Click Save.

Step 4 — Re-execute and verify

  1. Re-execute the test plan in Test Your Processes.
  2. Open the execution log and expand Step 1 – Request Information.
  3. Confirm the URL now shows the S/4HANA Cloud test tenant host.
  4. Confirm Step 3 (API Execution) returns response code 201.
  5. Confirm Step 4 (Check Condition) passes — the $RESPONSE_CODE matches 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

Product

SAP S/4HANA Cloud Public Edition all versions