Skip to Content

CBTA Update an external data sheet from a test script parameter

Mar 30, 2017 at 01:10 PM


avatar image

I am working with Solution Manager 7.1 SP15 and CBTA I have just started with CBTA as I have previously created automation using UFT.

The scenario is that we purchase a piece of equipment that has a serial number in SAP. That equipment is shipped to it’s final destination and installed to a Functional Location. This means that we must have a new Equipment/Serial No each time we run the E2E script.

We achieved this in UFT by calling a number from a spreadsheet and then posting back to the spreadsheet to increment the number by 1. This meant that we will always use the next equipment available.

The following VB Script is used: -

'GetTheSerialNumberFrom Excel Sheet (Data Table)

Dim strSerialNo,strRow,strVal,strLen

If LCase(Parameter("DEST_PLANT_IN")) = "xxxx" Then

DataTable.Import "G:\xxxxxxxxxxx\Z_Global_System_Data.xls"

strSerialNo = Datatable.Value("SERIAL_NUMBER_IN", dtGlobalSheet)

strSerialNo = strSerialNo + 1

'Update Data TableValue

Datatable.Value("SERIAL_NUMBER_IN", dtGlobalSheet) = strSerialNo

'length ofString

strLen = len(strSerialNo )


If strLen= 1Then

Parameter("SERIAL_NUMBER_IN") = "SOLMANCAPEX" &"000"&strSerialNo

Elseif strLen= 2 Then

Parameter("SERIAL_NUMBER_IN") = "SOLMANCAPEX" &"00"&strSerialNo


Parameter("SERIAL_NUMBER_IN") = "SOLMANCAPEX" &"0"&strSerialNo

End If

Any ideas how I can achieve this in CBTA?

Kind Regards


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Paul Babier Sep 06, 2017 at 11:50 PM


This can be achieved with use of variants.

There are 3 basic type of variants:

1) Default - these are the values store with the script that were provided during recording
2) Internal Variants - these are user provided variants that are stored in the TCE (Test Configuration Environment)
3) External Variant - this is a *.txt file on the testers local system, but it could be to a mapped drive where the file is centrally maintained.

Then in solar02 you specify which variant you want to use at execution, and if you don't specify it will use the default variant. (In 7.2 you specify which variant in SOLDOC)


Paul Babier

10 |10000 characters needed characters left characters exceeded