derbestebaer, I've been able to set a test suite property from the TestRunListener.beforeStep event handler. As a stand-alone example, I did the following:
1) Created a new test suite
2) Added a test suite custom property called "tsProp"
3) Added a TestRunListener.beforeStep event handler with the following script (lots of log statements to aid debugging):
def stepName = testStep.getName()
log.info('TestRunListener.beforeStep: About to run test step ' + stepName)
def existingValue = testStep.getTestCase().getTestSuite().getPropertyValue('tsProp')
log.info('TestRunListener.beforeStep: Existing value of tsProp = ' + existingValue)
// Set the test suite property
testStep.getTestCase().getTestSuite().setPropertyValue('tsProp', stepName)
log.info('TestRunListener.beforeStep: set tsProp = ' + stepName)
4) Added a new test case.
5) Added 5 Groovy Test Steps to the test case all with the identical script just to display the current value of the test suite property:
def tsProp = context.expand( '${#TestSuite#tsProp}' )
log.info('Groovy Script Test Step: tsProp = ' + tsProp)
On running the test case I got the following log output (the test suite property was blank when I ran the test case):
Wed Oct 31 17:14:46 GMT 2018:INFO:TestRunListener.beforeStep: About to run test step Groovy Script 1
Wed Oct 31 17:14:46 GMT 2018:INFO:TestRunListener.beforeStep: Existing value of tsProp =
Wed Oct 31 17:14:46 GMT 2018:INFO:TestRunListener.beforeStep: set tsProp = Groovy Script 1
Wed Oct 31 17:14:46 GMT 2018:INFO:Groovy Script Test Step: tsProp = Groovy Script 1
Wed Oct 31 17:14:46 GMT 2018:INFO:TestRunListener.beforeStep: About to run test step Groovy Script 2
Wed Oct 31 17:14:46 GMT 2018:INFO:TestRunListener.beforeStep: Existing value of tsProp = Groovy Script 1
Wed Oct 31 17:14:46 GMT 2018:INFO:TestRunListener.beforeStep: set tsProp = Groovy Script 2
Wed Oct 31 17:14:46 GMT 2018:INFO:Groovy Script Test Step: tsProp = Groovy Script 2
Wed Oct 31 17:14:46 GMT 2018:INFO:TestRunListener.beforeStep: About to run test step Groovy Script 3
Wed Oct 31 17:14:46 GMT 2018:INFO:TestRunListener.beforeStep: Existing value of tsProp = Groovy Script 2
Wed Oct 31 17:14:46 GMT 2018:INFO:TestRunListener.beforeStep: set tsProp = Groovy Script 3
Wed Oct 31 17:14:46 GMT 2018:INFO:Groovy Script Test Step: tsProp = Groovy Script 3
Wed Oct 31 17:14:46 GMT 2018:INFO:TestRunListener.beforeStep: About to run test step Groovy Script 4
Wed Oct 31 17:14:46 GMT 2018:INFO:TestRunListener.beforeStep: Existing value of tsProp = Groovy Script 3
Wed Oct 31 17:14:46 GMT 2018:INFO:TestRunListener.beforeStep: set tsProp = Groovy Script 4
Wed Oct 31 17:14:46 GMT 2018:INFO:Groovy Script Test Step: tsProp = Groovy Script 4
Wed Oct 31 17:14:46 GMT 2018:INFO:TestRunListener.beforeStep: About to run test step Groovy Script 5
Wed Oct 31 17:14:46 GMT 2018:INFO:TestRunListener.beforeStep: Existing value of tsProp = Groovy Script 4
Wed Oct 31 17:14:46 GMT 2018:INFO:TestRunListener.beforeStep: set tsProp = Groovy Script 5
Wed Oct 31 17:14:46 GMT 2018:INFO:Groovy Script Test Step: tsProp = Groovy Script 5
Compare my scripts to yours and see how you get on.