Forum Discussion

sinis's avatar
sinis
Frequent Contributor
3 years ago
Solved

Taking inputs from Testcomplete to Visual Studio application

Is there a way we can take input from an UI test and store it in a variable and then the variable has to be passed to a visul studio application for running unit test. Is this possible in Testcomplete?

  • Just looked into this and it seems like user and system environment variables can not be used in this manner.

     

    So the other alternative is to use ini file as suggested before.

     

     

8 Replies

    • sinis's avatar
      sinis
      Frequent Contributor

      rraghvani I have tried environment variable and set the environment variable from TestComplete but I am not getting the updated variable value inside Visual Studio. Is there any other way we can do this since we are not allowed to use some files in order to exchange the data?

    • sinis's avatar
      sinis
      Frequent Contributor

      rraghvani Is there a way to set value to an environment variable using TestComplete, I only found an option to get value.

      sinis_0-1692271360123.png

       

  • rraghvani's avatar
    rraghvani
    Icon for Champion Level 3 rankChampion Level 3

    In TC, how are you settings the environment variable? And in VS, how are you reading the environment variable?

    • sinis's avatar
      sinis
      Frequent Contributor

      In TC, I have added a variable in project and then I am accessing the variable using script. Then setting it in environment variable.

      sinis_1-1695268464660.png

       

      sinis_0-1695268429486.png 

      In visual studio , I am getting the variable like 

      sinis_2-1695268545251.png

       

       

  • rraghvani's avatar
    rraghvani
    Icon for Champion Level 3 rankChampion Level 3

    Just looked into this and it seems like user and system environment variables can not be used in this manner.

     

    So the other alternative is to use ini file as suggested before.