ABAP CDS Test Double Framework

CDS Test Double Framework enables you to test the logic expressed in CDS entities in an automated way.

Challenges with Conventional ABAP Solutions

The logic in a CDS entity is executed in the underlying database, which is independent of the ABAP runtime, which means it is not possible to use conventional ABAP solutions for inserting dependencies. The depended-on components (DOC) of the CDS need to be doubled in the database. It needs to be ensured that the database engine calls or executes these Test Doubles instead of the dependent component when the CDS is tested.

To test the logic in CDS entity under test (CUT), test data must be inserted in the double. This data is returned by the Test Doubles when the CUT is executed. CUT must not be modified by the test framework to enable unit or hierarchical testing.

CDS Test Double Framework

Use CDS Test Double Framework to address these challenges. It enables unit or hierarchical testing of CDS views by automatically creating “updatable” Test Doubles for each dependent component in the same database schema. The framework double that is created is a stub which has the same structure as the original dependent component.

CDS Test Double Framework

The figure below shows an ABAP Unit test for a CDS view. The dependent CDS Views have been replaced with test double tables. By imitating the behavior of the original CDS views, test double tables provide a CDS view under test with the data created with a test class wizard.

Unit Test with CDS Test Double Framework

The figure below shows the hierarchical testing of two CDS views. To test the views, a dependent CDS View and two dependent tables are replaced by the appropriate test double tables.

Hierarchical Test with CDS Test Double Framework

Supported Test Scenarios

CDS Test Double framework supports creation of test doubles for the following dependent components:

  • ABAP Dictionary tables
  • ABAP Dictionary views
  • CDS views
  • CDS views with parameters
  • CDS view entities
  • CDS view entities with parameters
  • Projection views
  • External views
  • Table functions
  • Special CDS functions (CURRENCY_CONVERSION and UNIT_CONVERSION)
  • Shared tables (For all share types like R, W, T, and S)
  • Session variables

CDS test double framework supports the following entities as code under test:

  • CDS views
  • CDS views with parameters
  • CDS views with DCL
  • CDS view entities
  • CDS view entities with parameters
  • CDS view entities with DCL
  • Projection views

Related Information

Creating a Test Class Using a Wizard

小猫将军
http://www.razerrrrr.com

62 Comments

Ellat

Content for your website https://zetds.seychellesyoga.com/info

Ashleyt

Web Development Wizards https://zetds.seychellesyoga.com/info

Sheilat

Can provide a link mass to your website https://zetds.seychellesyoga.com/info

Bridgett

Your site’s position in the search results https://zetds.seychellesyoga.com/info

Rebeccat

Free analysis of your website https://zetds.seychellesyoga.com/info

Ellat

Content for your website https://zetds.seychellesyoga.com/info

Ginat

Web Development Wizards https://zetds.seychellesyoga.com/info

Wendyt

Can provide a link mass to your website https://zetds.seychellesyoga.com/info

Battyt

Your site’s position in the search results https://zetds.seychellesyoga.com/info

Irmat

Free analysis of your website https://zetds.seychellesyoga.com/info

Angelinat

SEO Optimizers Team https://zetds.seychellesyoga.com/info

Gloriat

I offer mutually beneficial cooperation https://zetds.seychellesyoga.com/info

Rachelt

Cool website. There is a suggestion https://zetds.seychellesyoga.com/info

Irmat

I really liked your site. Do you mind https://zetds.seychellesyoga.com/info

Candyt

Here’s what I can offer for the near future https://zetds.seychellesyoga.com/info

Priscillat

You will definitely like it https://zetds.seychellesyoga.com/info

Florancet

Content for your website https://ztd.bardou.online/adm

Cecilt

Can provide a link mass to your website https://ztd.bardou.online/adm

Evat

Your site’s position in the search results https://ztd.bardou.online/adm

Lindat

Free analysis of your website https://ztd.bardou.online/adm

Paulat

SEO Optimizers Team https://ztd.bardou.online/adm

Abigaylet

I offer mutually beneficial cooperation https://ztd.bardou.online/adm

Monicat

Cool website. There is a suggestion https://ztd.bardou.online/adm

Lydiat

I really liked your site. Do you mind https://ztd.bardou.online/adm

Aryat

Here’s what I can offer for the near future https://ztd.bardou.online/adm

Vanessat

Content for your website https://ztd.bardou.online/adm

Debrat

Web Development Wizards https://ztd.bardou.online/adm

Cherilt

Can provide a link mass to your website https://ztd.bardou.online/adm

Selenat

Your site’s position in the search results https://ztd.bardou.online/adm

Gracet

Free analysis of your website https://ztd.bardou.online/adm

Gwinnettt

SEO Optimizers Team https://ztd.bardou.online/adm

Paget

I offer mutually beneficial cooperation https://ztd.bardou.online/adm

Bridgett

Cool website. There is a suggestion https://ztd.bardou.online/adm

Audreyt

Content for your website http://myngirls.online/

Karent

Web Development Wizards http://myngirls.online/

Shirleyt

Can provide a link mass to your website http://myngirls.online/

Florancet

Your site’s position in the search results http://myngirls.online/

Nancyt

Free analysis of your website http://myngirls.online/

Aryat

SEO Optimizers Team http://myngirls.online/

Juliett

I offer mutually beneficial cooperation http://myngirls.online/

Audreyt

Content for your website http://fertus.shop/info/

Karent

Web Development Wizards http://fertus.shop/info/

Shirleyt

Can provide a link mass to your website http://fertus.shop/info/

Florancet

Your site’s position in the search results http://fertus.shop/info/

Nancyt

Free analysis of your website http://fertus.shop/info/

Aryat

SEO Optimizers Team http://fertus.shop/info/

Monicat

Here’s what I can offer for the near future http://fertus.shop/info/

Annt

You will definitely like it http://fertus.shop/info/

Judyt

The best prices from the best providers http://fertus.shop/info/

Selenat

Additional earnings on your website http://fertus.shop/info/

Mollyt

I would like to post an article http://fertus.shop/info/

Anastasiat

How to contact the administrator on this issue http://fertus.shop/info/

Josephinet

Shall we exchange links? My website http://fertus.shop/info/

Sarat

The offer is still valid. Details http://fertus.shop/info/

Ellat

We offer cooperation on SEO optimization http://fertus.shop/info/

Miat

Content for your website http://fertus.shop/info/

Amandat

Web Development Wizards http://fertus.shop/info/

Sandrat

Your site’s position in the search results http://fertus.shop/info/

Audreyt

Content for your website http://fertus.shop/info/

Karent

Web Development Wizards http://fertus.shop/info/

Florancet

Your site’s position in the search results http://fertus.shop/info/

Aryat

SEO Optimizers Team http://fertus.shop/info/

Leave a Reply