on 01-15-2016 11:19 AM
All,
I am building a CBTA Composite testcase, in which one export value of the first test case is used in many other teststeps.
The handover of the output parameter of testcase 1 can be done using local referencing.
However, since the amount usage of the parameter is high, i rather would use an environment context variable.
However, it seems that the scope of the environment context variables is on testcase level, and not on global, Composite Testcase level.
Passing parameters using a custom function would be a possibility as well, storing the data in a file, or a computer environment variable.
Preferably i would like to use Global variables, is that possible ?
Regards,
Arjan
All,
Unfortunately the only/easiest option seems to be to store the variable in a file, which i suggested already in the question. For this i created a set of custom functions to work with INI files; ReadINIString, WriteINIString, DeleteINIString, DeleteINISection
Since this is a forum to help eachother, feel free to use the code:
https://github.com/arjanvdbroek/SAP-CBTA/
Arjan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All..
Is it still the same with the CBTA in the new patch also 3.12.6 , passing parameter across composite test cases.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Arjan,
As per my knowledge it is not possible with CBTA to refer to parameter across composite test cases.
Also CBTA doesn't support exporting output parameter values to TDC.
As Jan specified in above comment, you can create a custom function to export this parameter to local file, I would prefer excel which can be referred by another composite script.
I have tried using custom component for exporting and importing data to excel and it works fine.
Regards,
Sachin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Arjan,
Did you find a solution? I have been wondering if you could update a value in the test data container. Haven't had a chance to try it yet. I wanted to save a document number for example to show what document was created the last time the script was run.
Rick Shelton
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rick.
This part of script is used to save parameter to file. My script works with to parameters - File name and Data (I pass it in CBTA).
'Writing to file
If objFS.FileExists(FileName) Then
Const ForAppending = 8
Set objFile = objFS.OpenTextFile(FileName, ForAppending)
Else
Set objFile = objFS.CreateTextFile(FileName)
End If
objFile.WriteLine(DataToSave)
objFile.Close
And also this guide helped me in doing this.
Have a look, hope it helps.
User | Count |
---|---|
74 | |
26 | |
11 | |
10 | |
7 | |
6 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.