Modifying properties in an object

I’m having an issue where my modified properties in an object are not persistent. I’m creating a list of TestCase objects that are created with two properties; name and message. The message property is the handler name that is in the helper object that I add when the TestCase object is created. I then iterate through the list and call the run handler of the TestCase object. This handler sets properties in the TestCase object and sends the message to the helper object. When I come out of the run handler everything looks fine. When I iterate through the list again and check the TestCase objects the properties are no longer set.

I’ve attached my three scripts.

The UnitTest.script is the main one, the TestProject.script is used as a helper object and TestCase.script is the thief.


I’m still not sure why the properties that were changed in the objects handler weren’t persisting but I’ve found a work around. If I send the message to the handler then reinsert the object into the list using

put it into item repeatIndex() of suite

then my modified properties are preserved past the repeat loop.