All about CBTA- How to create Test scripts, SDC and TCE; How test script runs..!!
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
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
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
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.
After entering the details, upon saving the SDC contains the following information
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
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.
Step 6: Now, to create Test scripts, in Test Management workcenter-> Test Repository-> Test Scripts
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
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
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
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
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.
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.
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.
Thanks for boosting me. Yes I will definitely try from my end with different settings as suggested.
As per your suggestion, I tried running CBTA test scripts and yes, it works... 🙂
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.
Really happy for motivating me and people around. Many thanks for your valuable words. 🙂
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,
Right now there is no video for it. Sorry.
What is the difference between Worksoft and SAP CBTA?
Thank you, very nice document.
We just started using CBTA (SM 7.2 SP6).
We have a problem. I need advice.
We save the script, open it and get the error:
“A row with the index 1 is not in the table.”
Did you had any luck with the above error as i am also facing the same issue, kindly suggest if you have carried out any steps to resolve it
I have created all my test scripts in transaction SM_Workcenter, now we have migration to SolMan 7.2. I'm afraid to lose all my scripts. Could you please suggest how can I assign already created scripts to one project in solar02?
Thank you in advance!
Hi Vignesh Prabhu / Tom Cenens : I'm facing an issue and need your help. In CBTA on clicking Assign Executables there's a search window appears. But the search result is empty. Could you please help. Below Pic fr your reference.
Thank you for this blog. I have a question about CBTA test scripts and their organization. Is ist possible to check them using ABAP package checks to prevent unwanted side effects? The use case would be to prevent that scripts of package call scripts form another package?