Best way to test scrips?

I bet this is a can of worms, but is there a happy medium way to test scrips, against our production instance, without setting up a completely new RT instance?

Can i test perl code outputting to the console/logs?

Hello - is anyone able to help here?

What environment do i need to have to be able to write and test scip behavior and actions ?

How complex are your scrips? Mine are quite simple so I usually don’t test them that thoroughly :grin: You could test them against a Test queue and if the scrip editor annoys you, you can edit them locally and do syntax checks with the perl command.

$RT::Logger->debug for printf debugging.

What modules do i need to import/reference to be able to use $self-ticketObj in a local perl script?

Great question, would love an answer as well.

Not too complex, i just want to do a bunch of processing on incoming email/create ticket transaction.

I want to capture the requestor email address and subject, then loop through a (something), maybe a key/value file, find a match, then update a custom field, and or tags.

Wanna help me with the “looping through a perl hash” part?

My scrips are simpler than that :smiley: You have a specific problem with the iterating over a perl hash part?