# Run GCP tests on localhost: a worked cost example

> A step-by-step method for comparing your Google Cloud development costs with local emulation, using your own billing data instead of generic savings claims.
>
> Source: https://local.cloud/reduce-gcp-dev-costs/

Cost evaluation

An integration test that talks to LocalCloud instead of a Google Cloud project creates no billed test resources and waits on no cloud provisioning. The example below counts what moves to localhost for one team, with every assumption labeled, so you can repeat it with your own numbers.

[Start free — install the CLI](https://local.cloud/docs/#install-the-cli) [See the worked example](https://local.cloud/reduce-gcp-dev-costs/#worked-example)

Install the CLI

```
curl -fsSL https://local.cloud/install.sh | sh
```

> **Free public preview**
>
> The Public Preview License permits individuals and organizations, including for-profit companies, to use LocalCloud free of charge for internal development, testing, CI, evaluation, and pilots, so moving test runs to localhost adds no license fee during the preview. The [licensing summary](https://local.cloud/docs/licensing/) explains the non-production boundary.

Worked example

## One team’s integration suite, counted

The inputs are illustrative assumptions, not measurements. Replace them with your own.

### Assumptions

- **A1 Developers:** 6 developers each run the integration suite 4 times a day before pushing.
- **A2 CI:** The same suite runs in 40 pull-request pipelines a day.
- **A3 Suite:** Each run creates 4 test resources (a Cloud Storage bucket, a Pub/Sub topic and subscription, and a BigQuery dataset), runs its tests, and deletes them.
- **A4 Coverage:** The operations the suite uses are listed for those services in the compatibility matrix.
- **A5 Month:** A month has 20 working days.

### What moves to localhost

- **Suite runs a day that target localhost:** **64** (6 × 4 + 40)
- **Cloud test resources a day that are never created in Google Cloud:** **256** (64 × 4)
- **Cloud test resources a month that are never created in Google Cloud:** **5,120** (256 × 20)
- **CI runs a month whose suite needs no Google Cloud credentials:** **800** (40 × 20)

Local runs keep their data in a Docker volume on the runner. A CI job can pass `--data-volume NAME` to get its own isolated runtime and storage.

Your numbers

## Turn the count into spend and time

Multiply the runs that move by what one run costs you today. Each figure comes from your own records.

| Input | In the example | Where to get yours |
| --- | --- | --- |
| Suite runs a day (developers and CI) | 64 | Your CI history and team habits |
| Billed cost of one run’s cloud test resources | Not assumed | Your billing export, filtered to the test project |
| Time a pipeline spends creating and deleting those resources | Not assumed | Your pipeline step timings |
| Time LocalCloud takes to report ready on your runner | Not assumed | One timed run on your runner |

- **Cloud test spend avoided a month:** runs that move to localhost × the billed cost of one run’s test resources.
- **CI time avoided a month:** CI runs × (resource setup and teardown time − LocalCloud start time), when the difference is positive.

This page claims no fixed savings: no universal percentage, per-developer figure or guaranteed reduction applies, and only your own billing data sets the result.

## What stays on Google Cloud

- Release validation against real Google Cloud: IAM, quotas, regional behavior, managed integrations, and performance.
- Operations a service doesn’t list in the [compatibility matrix](https://local.cloud/compatibility/).
- Runner capacity for LocalCloud itself: Docker and a default memory limit of 4g per runtime.

[Start free — install the CLI](https://local.cloud/docs/#install-the-cli) [Set up CI integration tests](https://local.cloud/gcp-integration-testing/)
