Instead of the testrun_id as parameter please add a class variable to each testrun class which actually holds the id.