AWS CodePipeline Integration

Our AWS CodePipeline integration allows you to run a Testable load test as part of your pipeline. Testable will kick off the specified test configuration and update the codepipeline when the test finishes. If all success criteria are met, the action will be marked as a success otherwise as a failure.

The integration configuration can be found at Settings -> Integration.

Integration AWS CodePipeline

Setup IAM user

In order to perform a test as part of your pipeline, Testable needs to add a custom action type to your account and process all jobs related to it. Create an IAM user that has the necessary permissions for this.

After logging into the IAM console, select Policies => Create Policy and use the following JSON:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "Testable",
            "Effect": "Allow",
            "Action": [
                "codepipeline:PollForJobs",
                "codepipeline:PutJobFailureResult",
                "codepipeline:PutJobSuccessResult",
                "codepipeline:AcknowledgeJob",
                "codepipeline:CreateCustomActionType",
                "codepipeline:DeleteCustomActionType",
                "codepipeline:ListActionTypes"
            ],
            "Resource": "*"
        }
    ]
}

Next, create an IAM user and grant it the policy you just created.

Add IAM User for AWS CodePipeline

On the Permissions step choose Attach existing policies directly and then select the policy we created in step 2.

Add IAM User Permissions for AWS CodePipeline

Note the access key id and secret access key once the user is created. Both of these values are required on the Testable side of this setup.

Enable AWS CodePipeline

Login to your Testable account and navigate to Organization => Integrations => AWS CodePipeine tab. Press the button to enable the integration. Use the access key configured in the previous step and select the regions where you plan to setup pipelines.

Adding a test to your pipeline

Once you enable the integration on Testable you should see Testable available as a custom action type when editing your pipeline.

Start by creating an AWS CodePipeline stage:

Add AWS CodePipeline Stage

Next add an Action. The TestConfId is the ID of the test configuration to run in your pipeline. Find this ID by going to it in the browser and looking at the URL https://a.testable.io/test/XXX (the number at the end of the URL is the test configuration ID).

Add AWS CodePipeline Action

And that's it! The chosen test configuration will be run when reaching this action in the pipeline. If all success criteria pass the action will also be marked as successful.

Disable AWS CodePipeline

To disable you can either do it via Testable under Organization => Integrations => AWS CodePipeline tab => Disable button and then press Save.