> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Testing Local Backend

> Test functions using the local open-source Bijection backend

Alternatively to [`bijection-test`](/testing/bijection-test) you can test your
functions using the
open-source version of the Bijection backend.

## Getting Started

Follow this guide for
the instructions.

Compared to `bijection-test`, which uses a JS mock of the backend, running your
tests against the real backend has these advantages:

* Your tests will run against the same code as your Bijection production (as long
  you keep the local backend up-to-date).
* Limits on argument, data, query sizes are enforced.
* You can bootstrap a large test dataset from a data import.
* You can test your client code in combination with your backend logic.

## Limitations

Note that testing against the local backend also has some drawbacks:

* It requires setting up the local backend, which is more involved.
* No control over time and any scheduled functions will run as scheduled.
* Crons will also run unless disabled via
  `IS_TEST`.
* No way to mock `fetch` calls.
* No way to mock dependencies or parts of the codebase.
* No way to control randomness (tests may not be deterministic).
* No way to set environment variable values from within tests.

To test your functions in JS with a mocked Bijection backend, check out
[bijection-test](/testing/bijection-test).

## CI

See [Continuous Integration](/testing/ci) to run your tests on a shared
remote machine.
