Forum Discussion

simon_cnhi's avatar
simon_cnhi
Occasional Contributor
3 years ago
Solved

How to capture the output of a testedapp and use for input into a second tested app

Hi all,

I have 2 tested apps - "REG.EXE" and "NOTEPAD.EXE"

I would like to use the output from REG.EXE as input into NOTEPAD.EXE.

The output from REG.EXE varies per week and the idea is to capture the output in a text file for later use.

Can this be achieved using variables, and if so, how?

 

many thanks in advance.

 

Simon

  • brumazz's avatar
    brumazz
    3 years ago

    Hi Simon, 

     

    Keyword tests do not require any scripting, though you can use Code snippets or reference script tests from a keyword test.

     

    As for the variables, please see this video to see if it helps

    https://www.youtube.com/watch?v=huWhD_gN0Nc

     

     
     

4 Replies

  • brumazz's avatar
    brumazz
    SmartBear Alumni (Retired)

    Hi Simon, 

     

    This is a very common ask, and should be pretty easy to setup once you see the steps.  

    In a Keyword Test, go to the Statement section of the operations panel and grab the Set Variable Value Operation.

     

    https://support.smartbear.com/testcomplete/docs/keyword-testing/reference/statements/set-variable-value.html

     

    First step is using the Set Variable Value to create a variable, once it is created, you need to set the Value for that variable.

     

    Setting this can be done just like customizing a log message.

     

    https://support.smartbear.com/testcomplete/docs/testing-with/log/posting/variables.html

     

     
    • simon_cnhi's avatar
      simon_cnhi
      Occasional Contributor

      Hi brumazz,

      Thanks for the info. I decided to take a different route because Google, in their infinite wisdom, have decided not to use the "regular" MSI field value "version" to store the version of Chrome, so, I generated an INI file instead -

      I can now read the INI file and define the variables I wish to use for a Keyword Test

      So, the question now is (hope it's ok to post in same thread), how do I use the variables "chromeProductCode" & "chromeVersion" as input into an application's respective fields, during a Keyword test.

      Is there an online article you can point me to? Also, will the Keyword test have to be fully scripted?

       

      cheers in advance

      Simon

      • brumazz's avatar
        brumazz
        SmartBear Alumni (Retired)

        Hi Simon, 

         

        Keyword tests do not require any scripting, though you can use Code snippets or reference script tests from a keyword test.

         

        As for the variables, please see this video to see if it helps

        https://www.youtube.com/watch?v=huWhD_gN0Nc