Forum Discussion
There is no way to access TC variables from the unit test. The best way I think is to write values into files and then read it by TC script.
To expand on Bobik , generally speaking, running Unit tests via TestComplete is simply provided to give you a central execution point for your tests rather than having unit tests run in one tool and functional in another. So, all that is supported is generally a way of executing. Passing variables back and forth between the unit test and TestComplete automation will have to be done via some other vehicle, either via file, registry key, data table, etc.
- LinoTadros5 years agoCommunity Hero
You can get access to TestComplete Project variables and ProjectSuite variables from NUnit tests in C# (Visual Studio). You will need to instantiate the TestComplete Automation Server in C#, open the project and make changes to the variable object in the project using COM automation.
Cheers
Lino
- tristaanogre5 years agoEsteemed Contributor
LinoTadros wrote:
You can get access to TestComplete Project variables and ProjectSuite variables from NUnit tests in C# (Visual Studio). You will need to instantiate the TestComplete Automation Server in C#, open the project and make changes to the variable object in the project using COM automation.
Cheers
Lino
I think there's also an API now for TestComplete, typically accessed via TestLeft but you should be able to get to it from VisualStudio.
- TanyaYatskovska5 years agoSmartBear Alumni (Retired)
Community, thanks for your great suggestions!
Amna_Saeed321, was the question answered? Please select the best answer as a solution or share your own solution.
Related Content
Recent Discussions
Check PopupMenu exists
Solved3 days agomfoster711- 4 days agosimonaferrara
- 4 days agomacheshmeh