日本語

Sandbox Testing

Aikido Deploy runs your pull request in an Aikido-hosted sandbox and tests the changes before deploying to any of your environments

Sandbox Testing runs your application from the pull request branch in an Aikido-hosted sandbox and tests the changes. An agent plans extra tests for the pull request changes, covering what your CI doesn't. These tests only exist in the sandbox, to check the state of the deployment. Aikido Deploy doesn't add them to your repository as unit tests. This catches pull requests that pass CI but break when the application actually runs.

Sandbox Testing is part of Aikido Deploy. It does not need a staging environment, and it does not replace smoke testing, which runs against a live environment after a deployment.

#How it works

When a pull request gets your trigger label, Aikido Deploy:

  1. Checks out the pull request branch in a sandbox.
  2. Builds and starts the application, following your instructions.
  3. Plans new tests that your CI doesn't cover, based on the pull request changes, then runs them in the sandbox.
  4. Fixes failures it finds and pushes the fix to the pull request branch, then tests again.

Each retry sees the results of earlier attempts and reruns tests that failed to confirm the fix works.

Open the deployment in Aikido Deploy to follow the run. The Sandbox testing section shows the proposed tests and the agent activity for each one.

#Prerequisites

#Enable Sandbox Testing

  1. #Open the repository settings

    Go to Deploy in the Aikido app and open the repository.

  2. #Manage Sandbox Testing

    In the Sandbox Testing section, click Manage.

  3. #Turn it on and add instructions

    Turn on Enabled, then describe how to run the application locally in Instructions. Click Save.

The default instructions are Look at README.md for instructions on running the app locally. Replace them if your README doesn't cover how to run the application.

#Write good instructions

The instructions tell the sandbox how to start your application. Cover the things a new developer would need:

  • How to install dependencies and start the application.
  • Which services the application needs, such as a database, and how to start them.
  • Any environment variables or setup commands the tests depend on.

Aikido checks new instructions before saving them. Instructions that try to change how Aikido Deploy behaves, reach other systems, or make unrelated changes are rejected. Describe how to run the application, nothing more.

#Limitations

  • Sandbox Testing doesn't take screenshots or use a browser yet.