08-03-2010 09:13 AM
Hello,
I'm finishing up a project that automatically builds and distributes my test sequences. It uses the property loader at runtime to get the actual step parameters. Everything is working well, and my process is fully automated, but it can't seem to import the ConditionExpr property (conditions for loops). I have about 20 other properties that all import fine, but I can't do anything with timing and if I try, I get stuck in an infinite loop.
I've attached a dummy sequence file and the corresponding CSV. The step names are weird, but that's just because of how our database for result files works. Each of the tests is just getting the current time, looping until the duration specified has passed, and then comparing. Pointless test but it demonstrates the problem.
My tests build dynamically, so there are common step types - each step is defaulted to a common version - they get updated from the property loader. Any insight would be extremely helpful.
Thanks,
Bryan
Solved! Go to Solution.
08-04-2010 04:28 PM
Hello Bryan,
I was able to reproduce the problem using your files, but was not able to reproduce it when I created my own. I am still looking in to what could be causing the While loop to be always set to true. I was wondering if you used a different type of file, such as txt, if the problem is still there. Have a great day!
Best Regards,
Adam G
08-05-2010 07:59 AM
Adam,
I took the sequence, set the parameters manually, and used the actual property exporter to get a file that was in the format TestStand would be able to use (tried both CSV and tab-delimited text). I expected that this would work as it was the actual file that was exported by TestStand, but it still imported the ConditionExpr as 'True'. I ran a diff on the files too, and there doesnt appear to be a difference in the area pertaining to that condition or the import values.
Not really sure what to try next. I looked through the actual step type as well and considered making a custom step, but I can't find anything that would indicate that the actual step is part of the problem. Any ideas?
Thanks,
Bryan
08-05-2010 08:11 AM
HI,
I have had problems before with csv file format, where if they were created in a text editor and saved from a text editor, there was no problem, but if I opened and modified within excel and saved from excel as csv format, the property loader failed to load the properties.
Never really pin down the problem and this was several years ago.
08-06-2010 12:28 PM
Hello Bryan,
I think I have found out what is happening. I looked at your properties file in Notepad and noticed that the FileGlobals.Duration < 5 did not have quotes around it. This causes TestStand to evaluate the expression when it is being imported which causes it to be set to true. If it has quotes around it, TestStand will still evaluate it, but it does so by removing the quotes and then putting the expression in the While loop. I am not sure what caused the file to be exported this way. I was hoping you could walk me through the steps you did to export the file so we can try and see what might have gone wrong. Also what version of TestStand are you using?
When I exported the properties I went through these steps:
1. Go to Tools»Import/Export Properties
2. Selected the destination for my file and the format
3. Went to the Properties Tab and exported all of the properties
4. Pressed Export
A workaround you can use right now is to go into your properties files and manually put quotes around the expressions for the While Loop. Look forward to your response and have a great day!
Best Regards,
Adam G
08-17-2010 08:20 AM
Thank you all that helped with this issue. Placing quotes around the logic statements did solve our property loader issues.
~Cy