APPLICATION DESIGN


Testing agents
You can test an agent in the following ways:
To use the Test menu command

1. Select the agent and choose Actions - Test.

2. Read the Agent Log and check:

3. If necessary, make corrections and run the test again.

To use the LotusScript debugger

1. Choose File - Tools - Debug LotusScript.

2. Run the agent and the LotusScript debugger appears. You can then review each step as the agent the agent runs.

3. You can also use message boxes and print statements.

To create a test database

You may wish to make a test copy of an existing database before working with the actual database.

For agents that have multiple steps or complex tasks, split the process into several smaller tasks and create an agent for each. Test and fix each smaller agent first. When everything is working correctly, combine the agents into one. Then test the agent again.

Note Java agents have a console tool to which agents can print messages. In IBM® Lotus® Domino(TM) Designer, choose File - Tools - Show Java Debug Console. In addition, you can use the remote debugging tool (File - Tools - Remote Debugging), which allows remote debugging of the LotusScript in an agent script and allows the monitoring of the execution of Java agents.

1. Choose File - Database - New Copy to make a test copy of the database, with documents.


2. Create test documents: 3. (Optional) Create a debug document to write values to.

4. Run the agent.

5. Use other available debugging tools to catch errors and make corrections.

6. Rerun the agent until it is working correctly.

7. Copy the tested agent to the live database.

See Also