cancel
Showing results for 
Search instead for 
Did you mean: 

Does it possible to create a variable/parameter in CBTA?

Former Member
0 Kudos

Hello guys,

I currently start to learn CBTA, so I would be very thankful, if someone can answer my questions.

Does it possible to create a variable/parameter in CBTA. For example in eCATT you can define a variable Amount_in_local_currency= Exchange_Rate * Amount_in_Euro or like Salary = salary_last_month*0.3 where salary_last_month= 3000 in editor.

In case of composition test does it possible to compare parameters? eCATT uses for this purpose the command CHEVAR, which compares value of parameter with fixed value or values of both parameter. For example you create a variable Amount_in_local_currency= Exchange_Rate * Amount_in_Euro than in other script you have a parameter Amount_in_local_currency_1. In eCATT i would use the command CHEVAR(Amount_in_local_currency= Amount_in_local_currency_1). How does it work in CBTA does anybody know it?

Accepted Solutions (0)

Answers (1)

Answers (1)

sabatale
Contributor
0 Kudos

Hello Alena,

I am not sure I understand what you expect from CBTA, but I will give it a shot.

In case you are recording the scenario:

1) You can use the Checkpoint feature => Click "Add Checkpoint", then click a position on the screen to be recorded

2) From the frontend, then choose "Check data" to add validation => ie. a checkpoint veryfing that the field value for "Salary" is 3000

2b) ... Or you could go with the option "Get data" to capture dynamic values => this will save the parameter value in the runtime, which you can re-use later in other components within the script or composite test

Please note that you can also enter Visual Basic code as input for parameters.

This link should be helpful: https://blogs.sap.com/2014/10/10/how-to-use-string-functions-in-cbta/