I can't be sure what you actually mean here though, because the word "role" is not clear. Atlassian have chosen to call part of the user managenment system "role". That's a good word for it, but it confuses the use of the word "role" in non-Atlassian English, as your usage of it here is absolutely correct as well. You're trying to find the role of a person involved with an issue. Just to be clear - do you mean "Atlassian role" or "relationship of person to an issue"?
Anyway, to make a start:
Reporter and Assignee are not roles, they're attributes of an issue. So Issue.getAssignee and Issue.getReporter are what you need for them. See http://docs.atlassian.com/software/jira/docs/api/latest/ and look for the Issue object for full docs.
I'm guessing tester is an atlassian-role you've set up - there's no real way to extract this from an issue because it isn't an issue level piece of information, it belongs to the project, and all you need from the issue is "project", so you can read the project object and then the users in the role.
You may also have Tester as a user-picker or multi-user picker, in which case, you need one of the getCustomFieldValue calls.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.