18.9 Testing a Distribution¶
New in build 20121; in its own window, which stays open while you edit, since build 20125.
Test... in the distribution editor runs the distribution right away for a few recipients and shows the e-mails it would send – recipients, subject, text, AI commentary and attachments. Nothing is sent, Acinta Server isn't involved, and the test uses the distribution as it is in the editor, including changes you haven't saved yet.
With the audit log on, each test is recorded as a test run and listed on the Recent runs tab with Test in the Run column – it doesn't count as the distribution's last run. A test closed before it finished is recorded as failed (build 20375 and later).
Use it while you set up a distribution, and again after every change to the workbook, the e-mail text or the recipients.
Running a Test¶
Click Test... next to Schedule... at the bottom of the distribution editor. With AI commentary – or AI commentary boxes in the workbook – and the AI data policy Per Request, you're first asked to confirm the data transfer, as when you save (build 20153 and later); see 18.6 AI Commentary. The test has three steps.
1. Choose the Recipients¶
Datashop builds the recipient list and shows each recipient with e-mail address, name, number of reports and filter values. While the window opens, the activity log shows the progress, e.g. Loading recipients from "Sales persons" (SQL query)..., then "Sales persons": 42 recipients (3.1 s) and Filling the recipient tree.... The log always scrolls to the newest line.
- Tick the recipients to test. A few are ticked for you: the first 3 report runs – or, for collated distributions, the first 2 recipients with all their reports, so you can check that the reports are bundled correctly.
- Shift+click a checkbox to tick or untick every item from the last clicked checkbox to this one – including the reports of collapsed recipients in between. They all get the new state of the clicked item.
- Select all / Select none change the selection.
- The counter shows how many reports and e-mails the test produces and, with AI commentary, the maximum number of AI requests. AI requests cost tokens, also in a test.
Then click Run test.
The Run as row of the statistics list says which user the test runs as: you. Acinta Server runs the distribution as the schedule's user – if data is restricted by user rights, the real e-mails can show different figures.
2. Wait for the Reports¶
The statistics list shows the progress:
| Row | Shows |
|---|---|
| Reports, Emails | Progress bars: done of total, and how many are in progress |
| AI calls | Calls to the AI service, e.g. 3 (2 cached) – answers reused from the cache cost nothing. While calls run, e.g. 3 (2 cached, 1 waiting) |
| Error, Warning | Problems, e.g. a PDF that couldn't be created, or a variable font in a PDF – see Warnings in 18.8 Status Reports and Troubleshooting |
Cancel stops further AI commentary requests at once; reports already started are finished.
3. Check the E-mails¶
The Preview lists the composed e-mails. For each one you see:
- the subject, and To, CC and BCC, above the body;
- the body, formatted exactly as the real recipient will get it in production, including the AI commentary – the test-phase notice isn't added;
- the attachments – double-click one, or click Open attachment, to open it;
- AI request and AI response, to see exactly what was sent to the AI service and what came back (JSON).
When the test has finished, the activity log shows timings and the same notes as the status report, e.g. Collated: 2 report runs sent as 1 email – see 18.8 Status Reports and Troubleshooting.
Status report (new in build 20145) shows the status report of the test as Acinta Server would send it, with its subject and the Send status report to addresses. Click an e-mail in the list to see it again. The status report isn't sent from here.
Open in mail program opens the e-mail as an .eml file, e.g. in Outlook, so you see it as the recipients will. Save as .eml... saves it. The sender address isn't shown: it comes from the server's mail settings.
Send... sends the shown e-mail for real with the project's email server: to the test recipients, or – after you confirm – to the recipient (build 20219 and later). It needs an Email server in the project options; otherwise it says No email server is set up in the project options (Modeller, Project options, "Email server"). – see The Email Server in 26.2 Project Options.
Testing Again¶
Change the e-mail text or the report and click Test... again. AI commentary that hasn't changed is reused – no new costs.
Test Button or Test Phase?¶
| Test... button | Send to test recipients phase | |
|---|---|---|
| Runs | Now, in Datashop | On the schedule, on Acinta Server |
| Sends e-mails | Only the one you send with Send... | Yes – every e-mail goes to the test recipients |
| Runs as | You | The schedule's user |
| Recipients | The ones you tick | All |
| Unsaved changes | Included | Saved distribution only, after a server restart |
Use Test... to get the content right, then the test phase to check the real delivery from the server – see 18.2 Creating a Distribution.
Tips – Testing a Distribution¶
- Tick recipients with different filters – e.g. one sales person with many customers and one with few – to see both ends.
- Keep the selection small when AI commentary is on; each e-mail is an AI request.
Common Issues – Testing a Distribution¶
Problem: The test shows other figures than the e-mails from the server. - Solution: The test runs as you, the server as the schedule's user. Check the user rights of the schedule's user.
Problem: An e-mail has no AI commentary. - Solution: Read the notes at the bottom of the preview – they give the reason, e.g. the data policy or a missing customer key. See 18.6 AI Commentary.