In this blog, I wanted to share some knowledge on CBTA.

CBTA (Component Based Test Automation) is a functionality of SAP Solution Manager where we can create test cases in modular structure. As the name suggests,CBTA is component based testing and there are 2 types of components namely,

                           

                                              1. Screen Components

                                              2. Default Components

Screen components are nothing but the activity done while testing the system under test such as mouse click, entering transactions etc. Default components are the data entered at the time of recording such as values.

Some terminologies to be known are,

1. SUT (System Under Test):

          SUT is the managed system which is to be tested. In SUT Management, the following details are maintained

  • Technical RFC destination (looks like TST_<SID>_<CLNT>)
  • Business user (i.e. Tester Profile)
  • Base URL / HTTP destination in case of non-ABAP systems.

2. SDC (System Data Container)

          SDC defines the systems on which the automated test cases are recorded or executed. A system is defined as follows

  • Operational function (eg: CRM,ERP)
  • Technical role (eg: Development system, Production system)

3. TDC (Test Data Container)

          TDC is a central repository for all test data. It contains the information of parameters, attributes and variants.

                                         

Now we will look how test scripts, SDC are created and see how automated testing is done with the help of SAP Solution Manager

Prerequisites:

Perform system configuration steps as given in the guided procedure SOLMAN_SETUP prior to create test script

Note: Test cases can be created in configuration phase of each project via SOLAR02 transaction. But I am explaining how CBTA works via transaction SM_WORKCENTER


Step 1: Login into SAP Solution Manager system and run transaction SM_WORKCENTER. Under Test Management workcenter, click Easy Test Automation as shown below

/wp-content/uploads/2016/07/1_996131.png

Step 2: A pop up opens where you can create new SDC or use existing SDC. To create new SDC, select System Data and enter the SDC name and click create as shown below

/wp-content/uploads/2016/07/2_996043.png

Step 3: Then you will be directed to SDC creation window where we need to give the name of the System Data Container and specify the logical component, target system as shown in the below screenshots.

/wp-content/uploads/2016/07/3_996133.png

/wp-content/uploads/2016/07/4_996140.png

After entering the details, upon saving the SDC contains the following information

/wp-content/uploads/2016/07/5_996141.png

Save these configuration in transport request.

Step 4: Now, in Test Management workcenter, go to CBTA Settings-> Maintain SUT. Here, you need to import the SDC created as shown below

/wp-content/uploads/2016/07/6_996152.png

Step 5: After selecting and importing the SDC, now you need to specify the RFC that communicates with the SUT which is configured as prerequisite and also assign the tester profile so that it enables logon to managed system while the script runs.

/wp-content/uploads/2016/07/7_996154.png

Step 6: Now, to create Test scripts, in Test Management workcenter-> Test Repository-> Test Scripts

/wp-content/uploads/2016/07/8_996167.png

When you click create Test Scripts, a pop up will appear where you need to give the name and title of the script, test tool would be CBTA as shown below

/wp-content/uploads/2016/07/9_996170.png

Step 7: Now, in the attributes tab of the test script, you need to specify the Application Component, here it will be CBTA component, SDC for this test script, Target system, Executable type and the Transaction as shown below

/wp-content/uploads/2016/07/10_996172.png

Note: Executable can be a transaction, BSP Application, CRM Webclient, Webdynpro application

Step 8: Once the details are filled in step 7, now click Launch button as that the script runs in the managed system remotely.

Note: In order to run the scripts remotely, settings in the managed system should be done. For this, run transaction SCC4 in corresponding managed system and keep the settings as changes are allowed.

Also you must enable scripts to run by making the changes in SAP Logon settings are shown below

/wp-content/uploads/2016/07/11_996187.png

So finally when you click on Launch CBTA, the scripts runs in the SUT and the test log is stored in SAP Solution Manager system.

Useful blogs about CBTA,

Component Based Test Automation (CBTA) in SAP Solution Manager 7.1

To report this post you need to login first.

10 Comments

You must be Logged on to comment or reply to a post.

  1. Tom Cenens

    Hi Vignesh

    Thanks for sharing with the community.

    Small comment on the below:

    “Note: In order to run the scripts remotely, settings in the managed system should be done. For this, run transaction SCC4 in corresponding managed system and keep the settings as changes are allowed.”

    The only option that needs to be open is “e-catt and catt allowed”. The other options can be closed down so changes not allowed is possible in SCC4 and won’t stop CBTA from working.

    I normally also unflag the “notify” options in SAPgui Scripting options because those are annoying from an end-user perspective and get in the way of automatic execution without confirmation of a pop-up.

    Best regards

    Tom

    (0) 
    1. Vignesh Prabhu Post author

      Hi Tom,

      Thanks for your valuable feedback. Definitely this suggestion will help all.

      Personally, I would try it and let you know how it works by following your opinion.

      Thanks,

      Vignesh

      (0) 
      1. Tom Cenens

        Hi Vignesh

        I tested it before posting my reply since I’ve got CBTA running at customer side 😉 so sure, go ahead and check the settings / try different settings.

        Best regards

        Tom

        (0) 
          1. Tom Cenens

            Hi Vignesh

            Keep on going and sharing, helping others out can have a immensely positive impact on your life, on both a business and a personal level. Believe in yourself and thrive beyond what you could imagine to be possible.

            Best regards

            Tom

            (0) 
  2. Vicky Dev

    Nice article, but bpca/tboms part is missing.. also, do u guys have any video that shows any e2e bp/scenario testing – showing before and after ehp upgrade/changes etc..?
    If so, cud u shoot me the link to dev at akkob ( you know the rest)

    Appreciate your help,

    Thanks,
    Dev.

    (0) 

Leave a Reply