AWS CodePipeline

Applies to CrossBrowserTesting SaaS, last modified on January 10, 2023

For this document, we provide an example Lambda Function located in our AWS CodePipeline GitHub Repository.

AWS CodePipeline is a continuous delivery tool that lets you automate your development process quickly, safely, and at scale. Through AWS CodePipeline’s integration with many other AWS and third party services such as ECS, S3, Elastic Beanstalk, CloudFormation, GitHub, and Jenkins, every time you commit code, a build is created and automatically run, allowing you to test every commit.

In this guide we will use AWS CodePipeline with GitHub and an AWS Lambda Function for testing using the Selenium WebDriver and the JavaScript programming language.

Create an AWS Lambda Function

  1. Navigate to https://console.aws.amazon.com/lambda/

  2. Click the Create Function button.

    Creating lambda function

    Click the image to enlarge it.

  3. Name your function and click the Create Function button.

    Naming lambda function

    Click the image to enlarge it.

  4. Download the example Lambda Function, and choose Upload a .zip file from the Code entry type drop-down in the Function Code section.

    Uploading lambda function

    Click the image to enlarge it.

  5. Set your username and authkey as environment variables.

    Setting environment variables

    Click the image to enlarge it.

  6. Set your execution role and basic settings then click Save.

    Setting execution role

    Click the image to enlarge it.

Set up AWS CodePipeline

  1. Navigate to the AWS CodePipeline homepage.

  2. Click the Create pipeline button.

    Creating pipeline

    Click the image to enlarge it.

  3. Name your Pipeline and click Next.

    Naming pipeline

    Click the image to enlarge it.

  4. Select GitHub from the Source provider drop-down, click the Connect to GitHub button, chose your repository and branch, then click Next.

    Selecting source provider

    Click the image to enlarge it.

  5. Add any additional desired steps, click Next, and then Create Pipeline.

  6. Edit you pipeline to add a Lambda stage by clicking the Edit > Add Stage > Add action group.

    Adding stage

    Click the image to enlarge it.

  7. Name your action, choose AWS Lambda as the Action Provider, set your function name and user parameters, and click Done.

    Setting action provider

    Click the image to enlarge it.

  8. Save your pipeline and commit to your repository.

Congratulations! You have successfully integrated CrossBrowserTesting and AWS CodePipeline. Now you are ready to see your test run in our app.

Conclusions

By following the steps outlined in this guide, you are now able to seamlessly integrate AWS CodePipeline and CrossBrowserTesting. If you have any questions or concerns, please feel free to reach out to our Support team.

See Also

Continuous Integration
Travis CI
GitHub Actions
CircleCI

Highlight search results