Hi,
Unfortunately, I don't think this is easily done. If you take a look at the "Events" tab in the project view, you can set up groovy scripts to be run triggered by different events, but I haven't been able to produce a solution for your exact case. These events operate on a TestSuite and TestCase level, and it's difficult to differentiate between a TestStep being run individually and it being run together with an entire TestCase. The TestRunListener.beforeStep event, which seemed like it could help, is actually triggered only in TestSteps run from a TestCase, and not for those run individually.
Let me know if I have misunderstood you, or if I can assist you further in any other way.
Regards,
Arian
SmartBear Sweden