{"ref":"capability:testing","page":"/capabilities/testing","json":"/capabilities/testing.json","generated":"2026-10-26","drafted_with_ai":true,"entity":{"id":"testing","name":"Testing","domain":"developer-experience","ecosystems":["cap","btp","digital-manufacturing"],"universal":false,"description":"Proving the service still does what it did — against the model and the handlers, without a deployed system and without a database somebody has to keep clean.","short":"Proving a service still does what it did, without a deployment","core_coverage":{"state":"core-and-community","assessed_at":"2026-09-27","what_core_does":"cds.test writes and runs tests against CAP services, with an in-memory database and the server started for the test rather than beside it. It is the layer where a handler and a query can be asserted together. In CAP Java the guide draws three layers to test, event handlers, services and the integration through the API, each with the Spring test support the runtime ships.","where_it_stops":"At the service boundary. Driving a UI, running a scenario in a browser, and anything needing a real BTP binding are outside it, and that is where every other entry here sits.","sources":[{"url":"https://cap.cloud.sap/docs/node.js/cds-test","title":"cds.test — capire","checked":"2026-09-08","quote":"CAP's testing utility for writing and running tests against CAP services."},{"url":"https://cap.cloud.sap/docs/java/developing-applications/testing","title":"Testing Applications (CAP Java) — capire","checked":"2026-09-27","quote":"This section describes some best practices and recommendations for testing CAP Java applications."},{"url":"https://cap.cloud.sap/docs/java/developing-applications/testing","title":"Testing Applications (CAP Java) — capire","checked":"2026-09-27","quote":"As described in Modular Architecture, a CAP Java application consists of weakly coupled components, which enables you to define your test scope precisely and focus on parts that need a high test coverage."}],"relationship":"narrow-by-design"},"coverage_by_ecosystem":{"btp":{"state":"community-only","assessed_at":"2026-10-15","where_it_stops":"At the deployed service's routes. What runs inside it, the handlers and the queries, is tested before deployment, on the CAP door.","note":"No SAP page read for this intake names a tool for testing a service after it is deployed to Cloud Foundry, so this is a assessment of the corpus rather than a quote from the core; the one provider here is independent."},"digital-manufacturing":{"state":"unmapped","assessed_at":"2026-10-17","note":"Assessed the day the SAP Digital Manufacturing door opened, before its entries were taken in."}},"framing_by_ecosystem":{"btp":{"description":"Checking a service already deployed to Cloud Foundry from outside it: requests sent to its routes with a token its XSUAA binding issues, and what comes back compared with what was expected."},"digital-manufacturing":{"description":"Automated tests of the production processes behind Digital Manufacturing's standard apps, built from the test modules SAP publishes for a test automation tool."}},"changed_in":[{"version":"@cap-js/cds-test 0.1.0","date":"2025-02-21","what_changed":"Before this, cds.test shipped inside @sap/cds itself, and a project pulled in axios, chai, chai-as-promised and chai-subset separately to use it. Test support moved out into its own package, @cap-js/cds-test, installed as a devDependency and versioned on its own release cycle from here on.","invalidates":"Guidance that treats cds.test as something @sap/cds provides with no extra install — from this point a project needs @cap-js/cds-test as a devDependency to get it.","source":{"url":"https://cap.cloud.sap/docs/releases/2025/feb25","title":"CAP release notes, February 2025 — test support moves to its own package","checked":"2026-09-08","quote":"The test support for CAP Node.js applications moves to its own package @cap-js/cds-test."},"applies_to":{"ecosystems":["cap"]}},{"version":"@sap/cds 9.0.2","date":"2025-06-02","applies_to":{"ecosystems":["cap"],"flavors":["node"]},"what_changed":"@cap-js/cds-test stopped being optional: cds.test now refuses to run unless the package is installed, and the axios, chai, chai-as-promised and chai-subset dependencies a project used to add by hand are no longer needed once it is. The 9.0 line reached npm as 9.0.2 on 2025-06-02 — 9.0.0 and 9.0.1 were never published.","invalidates":"Setup steps that install axios, chai, chai-as-promised and chai-subset directly to use cds.test rather than adding @cap-js/cds-test. On cds9, cds.test does not run without the latter present, regardless of what else is installed.","source":{"url":"https://cap.cloud.sap/docs/releases/2025/changelog","title":"CAP changelog 2025 — cds@9.0.0","checked":"2026-09-08","quote":"cds.test now requires module @cap-js/cds-test to be installed. Test dependencies like axios, chai, chai-as-promised, and chai-subset can be usually removed in favor of @cap-js/cds-test."}},{"version":"@cap-js/cds-test 1.0.0","date":"2026-04-23","what_changed":"Through its 0.x releases, cds.test's HTTP shortcuts (GET, PUT, POST…) ran on axios. Version 1.0 dropped that dependency in favour of Node's native Fetch API across the package — cds.test.axios remains only as a deprecated, partial fallback — and moved the default assertion library to Chai 6 while adding Vitest as a fully supported test runner alongside Jest, Mocha and node:test.","invalidates":"Any description of cds.test as axios-backed, or troubleshooting written around cds.test.axios as the primary HTTP client — since 1.0 that path is deprecated, not the default.","source":{"url":"https://cap.cloud.sap/docs/releases/2026/apr26","title":"CAP release notes, April 2026 — cds-test 1.0","checked":"2026-09-08","quote":"We replaced all dependencies on 3rd party HTTP client libraries like Axios in favor of using Node's native implementation of Fetch API in all relevant packages and scenarios."},"applies_to":{"ecosystems":["cap"]}}],"history":[{"date":"2026-08-31","field":"core_coverage.state","from":"left-open-on-purpose","to":"core-and-community","reason":"States renamed to describe who is present rather than to interpret intent. left-open-on-purpose asserted a motive; core-and-community states a fact, with relationship carrying the intent separately."},{"date":"2026-09-27","field":"core_coverage","from":"without the page","to":"cites the page","reason":"capire audit 2026-09-27: a page this capability owns was cited nowhere."},{"date":"2026-10-15","field":"coverage_by_ecosystem.btp","from":"absent","to":"community-only","reason":"Intake of @saptools/bruno, which runs request collections against services deployed to Cloud Foundry: the concern exists behind the BTP door."},{"date":"2026-10-17","field":"ecosystems","from":"cap, btp","to":"cap, btp, digital-manufacturing","reason":"The same concern on the SAP Digital Manufacturing door, opened 2026-10-17: SAP published test automation modules for the product's standard apps."}],"drafted_with_ai":true},"sap_delivery":{"door":"cap","all":{"built_in":[{"ref":"artifact:cap-java-cds-services-bom","name":"com.sap.cds:cds-services-bom","json":"/artifacts/cap-java-cds-services-bom.json"}],"documented_pattern":[],"announced":[],"packages":[{"ref":"artifact:cap-js-cds-test","name":"@cap-js/cds-test","json":"/artifacts/cap-js-cds-test.json"},{"ref":"artifact:sap-ux-fe-mockserver-plugin-cds","name":"@sap-ux/fe-mockserver-plugin-cds","json":"/artifacts/sap-ux-fe-mockserver-plugin-cds.json"}]},"by_flavor":{"node":{"built_in":[],"documented_pattern":[],"announced":[],"packages":[{"ref":"artifact:cap-js-cds-test","name":"@cap-js/cds-test","json":"/artifacts/cap-js-cds-test.json"}]},"java":{"built_in":[{"ref":"artifact:cap-java-cds-services-bom","name":"com.sap.cds:cds-services-bom","json":"/artifacts/cap-java-cds-services-bom.json"}],"documented_pattern":[],"announced":[],"packages":[]}}},"edges":{"use_cases":[],"shared_tasks":[],"related_tasks":[],"options":[{"ref":"artifact:cap-js-cds-test","name":"@cap-js/cds-test","json":"/artifacts/cap-js-cds-test.json","ecosystem":"cap","origin_ring":"sap-official"},{"ref":"artifact:sap-ux-fe-mockserver-plugin-cds","name":"@sap-ux/fe-mockserver-plugin-cds","json":"/artifacts/sap-ux-fe-mockserver-plugin-cds.json","ecosystem":"cap","origin_ring":"sap-official"},{"ref":"artifact:saptools-bruno","name":"@saptools/bruno","json":"/artifacts/saptools-bruno.json","ecosystem":"btp","origin_ring":"independent"},{"ref":"artifact:cap-js-community-cds-cucumber","name":"cds-cucumber","json":"/artifacts/cap-js-community-cds-cucumber.json","ecosystem":"cap","origin_ring":"community-org"},{"ref":"artifact:geert-janklaps-cds-launchpad-plugin","name":"cds-launchpad-plugin","json":"/artifacts/geert-janklaps-cds-launchpad-plugin.json","ecosystem":"cap","origin_ring":"independent"},{"ref":"artifact:cap-java-cds-services-bom","name":"com.sap.cds:cds-services-bom","json":"/artifacts/cap-java-cds-services-bom.json","ecosystem":"cap","origin_ring":"sap-official"},{"ref":"artifact:qualiture-enforce-export-coverage","name":"enforce-export-coverage","json":"/artifacts/qualiture-enforce-export-coverage.json","ecosystem":"general","origin_ring":"independent"},{"ref":"artifact:dongitran-sapbruno","name":"sapbruno","json":"/artifacts/dongitran-sapbruno.json","ecosystem":"cap","origin_ring":"independent"}],"samples":[{"ref":"artifact:miyasuta-cap-java-snippets","name":"cap-java-snippets","json":"/artifacts/miyasuta-cap-java-snippets.json"},{"ref":"artifact:sap-archive-digital-manufacturing-test-automation-samples","name":"SAP-archive/digital-manufacturing-test-automation-samples","json":"/artifacts/sap-archive-digital-manufacturing-test-automation-samples.json"},{"ref":"artifact:sap-samples-cap-bookshop-wdi5","name":"SAP-samples/cap-bookshop-wdi5","json":"/artifacts/sap-samples-cap-bookshop-wdi5.json"}],"explained_by":[{"ref":"content:restrict-crud-operations-in-capm-with-capabilities-and-readonly","name":"How to Restrict CRUD Operations in SAP CAPM Using @Capabilities, @readonly and Test APIs with .http","json":"/content/restrict-crud-operations-in-capm-with-capabilities-and-readonly.json"},{"ref":"content:new-tutorial-for-ui5-middleware-fe-mockserver","name":"New tutorial for UI5 Middleware FE Mockserver","json":"/content/new-tutorial-for-ui5-middleware-fe-mockserver.json"},{"ref":"content:enhancing-unit-testing-in-cap-java-with-github-copilot","name":"Enhancing Unit Testing in SAP CAP Java Applications with GitHub Copilot","json":"/content/enhancing-unit-testing-in-cap-java-with-github-copilot.json"},{"ref":"content:getting-started-with-unit-testing-in-cap-java","name":"Getting Started with Unit Testing in SAP CAP Java Applications","json":"/content/getting-started-with-unit-testing-in-cap-java.json"},{"ref":"content:simplifying-sap-btp-authentication-in-pipelines-with-sap-passport","name":"Simplifying SAP BTP Authentication in Pipelines with SAP Passport and Playwright","json":"/content/simplifying-sap-btp-authentication-in-pipelines-with-sap-passport.json"},{"ref":"content:cap-full-stack-testing-with-bdd-flavour","name":"CAP full-stack testing with BDD flavour","json":"/content/cap-full-stack-testing-with-bdd-flavour.json"},{"ref":"content:testing-cap-hana-artifacts-with-jest","name":"Testing your CAP HANA Artifacts with jest – including multitenancy, hdbprocedure and hdbview","json":"/content/testing-cap-hana-artifacts-with-jest.json"},{"ref":"content:cap-unit-testing-using-mocha-and-chai","name":"CAP: Unit Testing using Mocha and Chai","json":"/content/cap-unit-testing-using-mocha-and-chai.json"},{"ref":"content:using-postman-for-api-testing-with-xsuaa","name":"Using Postman for API Testing with XSUAA","json":"/content/using-postman-for-api-testing-with-xsuaa.json"},{"ref":"content:integration-tests-in-a-cloud-foundry-java-app-using-cap","name":"Integration Tests in a Cloud Foundry Java App using SAP Cloud Application Programming Model","json":"/content/integration-tests-in-a-cloud-foundry-java-app-using-cap.json"},{"ref":"content:sap-tutorial-cicd-wdi5-cap","name":"Create Automated System Tests for SAP Cloud Application Programming Model Projects","json":"/content/sap-tutorial-cicd-wdi5-cap.json"},{"ref":"content:teched-2026-par1120","name":"Accelerating SAP solution transformations with the agent-led toolchain","json":"/content/teched-2026-par1120.json"}],"normative_context":[]}}