Using Sample Data
Iguana allows you to use sample data in the Translator editor, to mimic how a script will run within a channel. This is extremely useful during development and testing as you can see exactly how your script will behave with live messages. Sample data can be created in several ways: Loaded from files or the logs, created manually, or included when you import a project.
Sample data is passed to the main function using the Data parameter,
main(Data), in exactly the same way that a script will receive live messages:
Sample data is managed through the Sample Data screen, which is accessed by clicking the Sample Data link in the script editor toolbar:
Tip: Something is wrong I cannot load sample data into my From Translator script!
Actually this is by design. Remember that sample data shows you how your script will behave with live messages. And that sample data is passed through the main Data parameter in exactly the same way as live data.
The From Translator is an exception as it only retrieves data using code, and never receives input through the Data parameter. Therefore to mimic how a live script runs it must never receive input through the Data parameter. This means a From Translator cannot use sample data.
Note: If we did allow sample data, then you could write From Translator code (using the Data parameter) that would work in the editor but fail when you run the channel.