Skip to Content
author's profile photo Former Member
Former Member

Global Variables in CBTA Composite Testcases possible ?

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 12, 2016 at 08:35 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 05, 2016 at 09:05 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 04, 2016 at 01:29 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 05, 2019 at 04:32 PM

    Hi All..

    Is it still the same with the CBTA in the new patch also 3.12.6 , passing parameter across composite test cases.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.