Full payment should release only after a telegram bot passes a written acceptance testing script run on a staging deployment the buyer can message directly. The test should cover core flows, failure and retry edges, integration and data checks, security and access, and a handover session performed by someone other than the original author. Testing on the vendor’s screen, or against demo questions written after the build, does not prove the bot works for real customers. This article walks a seven-day test sequence: what the environment needs, what each day covers, how results are scored, and which defects block the final payment milestone.
The test cases should have been agreed before the build started, in the buyer’s language, translated by the vendor into its working language, with expected outcomes recorded for each. A bot that passes cases written at acceptance time can be graded against a shared standard; a bot tested against open-ended impressions leaves acceptance to opinion.
Setting up the test environment and sample data
Before the first test day, confirm that the staging bot runs on a separate token or bot from production, with its own database or test dataset, so tests cannot corrupt real records. Sample data should resemble the real business: anonymized customer records, representative product or course entries, test orders or subscriptions, and a handful of real conversation topics in the languages the bot supports. Placeholder data that does not match the actual catalog produces an unrealistic test.
Confirm access before testing starts: the buyer can open the staging bot in Telegram, reach any admin or test view the bot exposes, and read the vendor’s test notes or deployment notes. Note the staging region and hosting account for later comparison with production plans. Collect the acceptance case list, the expected result per case, and a scoring sheet where each case is marked pass, fail, or partial with a note. Repository access, account ownership, and the other handover artifacts should already exist before testing begins; testing cannot substitute for missing handover materials.
Days one and two: Core flows and auto reply accuracy
Start with the happy paths a real user follows most often. For a support bot, that means opening the bot, reading the welcome message, asking the common repeated questions, and following each guided flow to its end. For a shop bot, browse categories, open a product, add to cart, change quantity, and reach checkout. For a membership or course bot, enroll through the test purchase, open the first module, and return later to resume where progress stopped.
Auto reply accuracy is measured against the real-ticket corpus rather than polished demo questions. Feed the bot 100 to 200 anonymized past messages: questions in normal wording, typos, fragments, mixed languages, and awkward or off-topic entries. Record how many receive a correct relevant answer, how many are misrouted to the wrong topic, how many are correctly escalated, and how many are missed entirely. A reply that answers a different question counts as a misrouting, not a pass. Check that menu buttons, callbacks, and inline keyboards respond at every step, and that returning to a previous step does not leave duplicate state.
On day two, walk each flow in every supported language. Switch language mid-conversation where the bot supports it, and verify replies, menus, and confirmation messages render correctly without mixed-language leftovers. Record wording that is wrong, stale, or translated awkwardly; these are copy defects that the maintenance window should correct before production.
Days three and four: Failure, retry, and edge cases
Most production defects hide outside the happy path. Day three covers order and transaction edges: cancelled or expired checkout, declined payment in sandbox, pending state while the provider confirms, a retried checkout after a failed attempt, a refund or partial refund, and a duplicate callback from the provider. The bot must not double-charge, must not mark an unpaid order as paid, and must keep states consistent across retries.
Day four covers message and conversation edges: an unreachable user, a long message that hits length limits, an image or file attachment the bot expects, a user who starts the bot twice, a user who stops mid-flow and returns after several days, and a user who asks for a human. Escalation cases should hand the full conversation history to the receiving queue or agent view, and the bot should not keep answering after a human owns the thread. Test throttling and retry behavior: send a short burst of messages and observe the queue spacing, and check that retries after a temporary failure are backed off rather than repeated immediately.
For group or moderation bots, add spam and abuse cases: a flood of repeated messages, a new account posting a link, an appeal after a restriction, and an admin action that should be reversible. Verify whitelisted members are not over-restricted and that restricted members can follow the appeal path. The anti-spam rule design behind these cases is covered in the rate-limit and whitelist guide.
Day five: Integration and data checks
Day five verifies connections to external systems: store, CRM, payment provider, membership database, or fulfillment feed. Check that an order created in the source system appears correctly in the bot, that status changes sync in both directions where write-back is in scope, and that matching between provider records and bot records works without duplicate or orphaned entries. Compare five to ten sample records field by field against the source of truth.
Data checks cover storage and export. Inspect what fields are stored per user and per conversation, confirm retention settings match the agreed policy, and request a sample export in CSV and JSON. Verify identifiers, timestamps, messages, statuses, tags, and consent or opt-out flags are present and joinable. Test the deletion path on a test record and confirm the record is removed from the store and any export. Cross-check that no sensitive credentials appear in stored logs, message history, or repository commits.
Reconciliation checks follow the data review. For transactional bots, match a sample of completed orders or subscriptions against the provider or source-system record: amounts, references, statuses, and timestamps should line up without unexplained gaps. Check that a record marked pending in one system does not appear confirmed in the bot, and that a refund or cancellation propagates to the bot’s status view. Reports shown to the buyer should trace an aggregate number back to individual records, so a later dispute can be investigated from the actual conversation and order rather than from a summary figure. If the bot feeds a CRM or back-office system, verify the sync rules for matching, status mapping, and write-back timing hold under the sample records.
Day six: Security and access review
Security review on day six checks tokens, admin roles, and callback verification. Confirm the bot token is held in a secured configuration, not embedded in bot messages or public notes, and that it can be rotated at handover. Verify admin commands are restricted to a defined admin list and that non-admins cannot trigger refund, settings, or member-management actions. Check that provider callbacks are verified by signature or secret before the bot changes an order or membership state.
Review session handling for any component that signs in as a user account: session storage, expiry, re-authorization, and unknown-device revocation. Check role separation between day-to-day operators, senior admins, and account owners. The full token-handling and admin-role checklist for a China-built bot is in the security review article; day six should work through that list rather than rely on a general impression that the bot “looks secure.”
Day seven: Third-party handover session
The final test is not another conversation walkthrough; it is a deployment exercise. The buyer’s own engineer, or a third-party contractor who has not worked on the project, deploys the bot from the delivered repository to a fresh server or fresh staging environment, following only the runbook. The vendor observes and answers questions but does not perform the steps. The session should cover provisioning, configuration, secrets setup, database initialization, webhook or polling setup, startup, restart after a stop, and rollback to a previous release.
If the deployment fails because a step is undocumented, a secret is missing, or a dependency is unlisted, the build is not complete regardless of how well the staging bot answered questions. Record every gap as a handover defect: missing file, unclear instruction, missing credential, or untested dependency. The source-code package expected from a Chinese studio, including what belongs in the handover, is detailed in the source code handover guide.
Scoring, fixes, and payment release conditions
Score each acceptance case as pass, partial, or fail, and group defects by severity. Blocking defects are those that break a core transaction, expose credentials or admin access, corrupt records, double-charge or double-subscribe, or block the third-party deployment. Major defects are wrong replies on common topics, missing edge-case handling, or incomplete exports; minor defects are wording, formatting, or cosmetic issues. The vendor should fix blocking defects before the next milestone, major defects before production launch, and minor defects within the agreed maintenance window.
Payment release should track this scoring: the final installment or holdback releases only after blocking defects are closed, the staging bot passes the core and failure cases, and the third-party handover session succeeds. A two-week production run after launch, with the runbook followed independently, is the final condition for the holdback. Buyers should resist releasing full payment on the strength of a polished demo conversation; the evidence that matters is the test script, the export sample, and the deployment that someone outside the original team can repeat.
Leave a Reply