Git Product home page Git Product logo

qinwentu / serverless-automated-ui-testing Goto Github PK

View Code? Open in Web Editor NEW

This project forked from awslabs/serverless-automated-ui-testing

0.0 1.0 0.0 32.98 MB

This repository will contains HTML and Javascript files for static S3 websites (Test Website & Status page), CodeBuild build specification, Python script to perform the testing ans CloudFormation template to launch the stack which will be used in a blog post.

License: MIT No Attribution

Python 98.78% JavaScript 0.38% HTML 0.79% Shell 0.06%

serverless-automated-ui-testing's Introduction

Serverless-Automated-UI-Testing

Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: MIT-0


UI Testing is one of the important part of SDLC. This repo contains sample website which can be hosted as S3 website. AWS CodeBuild has been used to perform the Automated UI testing using Selenium Webdriver on Firefox and Chrome. AWS CodeBuild also have been used to trigger asyncronous headless UI testing on PhantomJS using AWS Lambda. AWS CodePipeline have been used to orchestrate the Continuous Delivery pipeline with multiple stages such as Source, UI Testing, Approval & Production Deployment. This repo contains the CloudFormtaion template which will create the CodePipeline and the corresponding resources (AWS CodeCommit repository needs to be created manually and files should be commited).

Details about using this repo is detailed in the blog post.


CodePipeline Design

Let's start by creating the repository and enabling Continuous Delivery pipeline for automated UI testing.

Step 1:

Creating CodeCommit repository

Create a CodeCommit repository as mentioned below.

aws codecommit create-repository --repository-name automated-ui-testing --repository-description "Repository for Automated UI Testing and Continuous Delivery using CodePipeline."

Once the CodeCommit repository has been created, clone this GitHub repository and upload the content to automated-ui-testing.

Step 2:

Update CloudFormation parameters configuration file

There is a JSON (CloudFormation Configuration) file in the repo.

automated-ui-testing-params.json: - CloudFormation parameter configuration file for Continuous Delivery Pipeline.

Update the configuration file with appropriate values for SourceRepo, ApprovalTopic, ProductionBucket based on the requirement.

Step 3:

Creating CodePipeline using CloudFormation

Once the configuration file has been updated, execute the following command to create the CloudFormation stack which will create the required CodePipeline.

aws cloudformation create-stack --stack-name automated_ui_testing --template-body file://automated-ui-testing.yaml --parameters file://automated-ui-testing-params.json --capabilities CAPABILITY_NAMED_IAM

Once the CloudFormation successfully creates the stack, it would have created a CodePipeline with similar stages as shown below.

CodePipeline Stages

Note: While deleting, the CloudFormation will retain the S3 buckets it has created. If not needed, the buckets created by CloudFormation will contian the stack name as part of bucket name, identify those buckets and delete them.

serverless-automated-ui-testing's People

Contributors

hideokamoto avatar hyandell avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.