Skip to content

Testing

Test Inttegro API integrations locally with contract validation, deterministic outcomes, isolated state, and controlled failures.

Inttegro publishes a Simile service that runs the public API contract on your machine or in CI. Use it to test requests, responses, authentication, stateful workflows, exact error outcomes, and retry behavior without sending a request to the production API.

What the testing service represents

The published Inttegro Simfile composes the OpenAPI contract with public test behavior. OpenAPI owns routes, request and response schemas, field rules, error shapes, and cross-field soundness constraints. The accompanying Simile modules add observable behavior that an HTTP schema cannot express by itself, including test principals, named outcomes, persistent state effects, asynchronous work, and controlled delivery faults.

Your application still sends ordinary Inttegro HTTP requests. The differences are the base URL and bearer credential: both come from the local Simile profile instead of an Inttegro production account. Keeping those values configurable lets the same integration code run locally, in CI, and against Inttegro without maintaining a separate test client.

This is a provider-authored contract emulator, not a shared sandbox. Test state belongs to the local Simile service, so one developer or CI job does not depend on another account’s records, execution order, or availability.

Testing mechanisms

Mechanism What to test What it establishes
Contract validation Required fields, formats, alternatives, bounds, and cross-field relationships The request is accepted by the published Inttegro contract and the response conforms to one declared outcome.
Authentication profiles Active, revoked, and expired local credentials The integration sends bearer credentials correctly and handles authentication failure without exposing a key.
Named scenarios Exact successes and documented domain errors The test reaches the intended public outcome instead of relying on random response synthesis.
Stateful workflows Create, update, lookup, page, and reset sequences Later requests observe the public consequences declared for earlier requests.
Idempotency and lost responses Replay the same logical write after a response is lost Retry code reuses one stable key and does not duplicate a committed operation.
Fault profiles Bounded latency and delivery failures Timeouts, backoff, cancellation, and recovery behave as expected under controlled failure.
Isolated profiles Separate local applications and test runs Credentials and state do not leak between tests that require independent setup.

These mechanisms are complementary. Schema validation catches malformed requests, but it cannot prove that your code handles a declined payment. A named decline scenario reaches that outcome, but it does not prove safe retry behavior after a network interruption. Build the suite from the public behavior your integration depends on rather than treating one successful request as complete coverage.

Report contract inconsistencies

The local test service is part of Inttegro’s public integration contract. If its observable behavior contradicts the API documentation or the production API, please report it rather than adding an emulator-specific workaround. In particular, report cases where:

  • the emulator accepts a request that the documented API rejects, or rejects a documented request;
  • a response has the wrong status, error code, shape, field relationship, or state transition;
  • a named scenario does not produce its documented public outcome; or
  • a stored resource cannot be retrieved or updated as the public workflow describes.

Simile can capture a self-contained reproduction, verify it locally, remove recognized secrets, and let you review the report before it is sent. Automatic reporting is optional and profile-scoped; leaving it off does not prevent you from preparing and sending a one-off report. Never include production credentials or real customer data in a reproduction.

Follow Report an inconsistency for the Inttegro workflow, or read Simile’s issue-reporting guide for the complete consent, evidence, and submission model.

Structure an integration test

Start each independent suite with a known profile and state boundary. Load the profile’s base URL and synthetic key through environment variables, then run the same client code your application uses outside tests.

For each workflow:

  1. Send a representative valid request and assert the response fields your application actually consumes.
  2. Retrieve or page the resulting resource when the workflow depends on a later request observing the write.
  3. Select documented error scenarios and assert both the HTTP status and the public error tuple your recovery code uses.
  4. Send malformed requests to verify that validation failures stop the workflow before any stateful consequence occurs.
  5. For an idempotent write, simulate a lost response and repeat the same operation with the same payload and key.
  6. Reset or replace the profile before a test that requires an empty account.

Prefer assertions about public behavior: status, response shape, documented fields, resource state, and retry semantics. Do not make a test depend on Simile’s storage layout, internal collection names, or an implementation detail that is absent from the Inttegro contract.

Use deterministic outcomes deliberately

When a test needs a specific public result, start the service with the named scenario for that result. Inttegro’s published scenarios cover reviewed successes and failures such as invalid payment methods, refund cancellation failures, expired upload requests, and a response lost after an idempotent write commits.

Without a selected scenario, Simile can synthesize any response alternative allowed by the operation. That is useful for contract exploration and broad payload coverage. It is not appropriate for a test whose expected branch must remain stable. Keep scenario selection in the test harness so production code does not know that the emulator exists.

Know what requires another test boundary

The local service validates the contract Inttegro publishes and emulates the public behavior declared with it. It cannot prove behavior outside that boundary, including:

  • production credentials, account configuration, or historical data;
  • private fraud, compliance, or provider-routing decisions;
  • mobile money, banking, email, SMS, or object-storage provider availability;
  • production latency, capacity, DNS, and network paths; or
  • the customer experience in your deployed browser or mobile application.

Before releasing, also test your own deployed application, secret injection, redirect handling, reconciliation, observability, and user interface. Use the local emulator for repeatable API coverage; use production-readiness checks for the infrastructure and providers that only exist outside it.

Run the service

Follow Test with Simile for the complete setup and walkthrough. It covers installing Simile, downloading Inttegro’s published contract bundle, creating a local application profile, calling public and authenticated operations, selecting scenarios and faults, and isolating or resetting state.

Type to search…

↑↓ navigate↵ selectEsc close