TestQA1
2 years agoFrequent Contributor
Incrementing Project.Variables from command line test execute
Hi,
I have the below test structure but the variable not getting value from the command line.
Variable page -> Temporary
I have a var called count which has 0 as default value
I have a command line in which I have added TestComplete.exe "C:\Work\My Projects\MySuite.pjs" /run /pv:count=%x%
here %x% = 0,1,2,.... (increments each time command line executes) depends on the test run 1,2,3,4....
I have a After Feature hook that stores:
var count = Project.Variables.count;
Log.Message(count);
The problem is that count is always 0.
For example, using INI file.
Upon opening the application, you read the ini file. Closing the application, you save to the ini file.
Also, https://stackoverflow.com/questions/206114/batch-files-how-to-read-a-file