Overview
Conifer is an open-source framework that allows developers to easily deploy an infrastructure that runs Cypress tests in parallel without a CI. The user can run the full Cypress test suite on a parallelised infrastructure that belongs to them.
The Team
Sam Harreschou Software Engineer Los Angeles, CA
Ahmad Jiha Software Engineer Bay Area, CA
Ainaa Sakinah Software Engineer Tokyo, Japan
Lawrence Tam Software Engineer Bay Area, CA
Table of Contents
- Prerequisites
- Installing Conifer
- Initialization
- Building a Conifer Image
- Deploying Conifer
- Teardown
- Architecture
- Helpful Resources
Prerequisites
- Node.js (v12+)
- NPM
- AWS Account
- AWS CLI configured locally
- Docker (v18.09+)
You'll need to have the above accounts and tools before running any Conifer commands. Being that Conifer is an Node package, both Node.js and NPM must be installed on your local machine. Conifer also requires you to have an AWS account and the AWS CLI configured locally since it relies your local environment to provision AWS resources. Conifer uses Docker images and containers to run parallelized tests on AWS.
Installing Conifer
npm i -g conifer-test
Conifer Commands
Command | Description |
---|---|
conifer init |
Gathers project information, testing parameters, and provisions necessary tools to build, deploy, and run conifer in your application. |
conifer build |
Builds your application with Conifer's Dockerfile and uploads the image to AWS ECR. |
conifer deploy |
Deploys the AWS infrastructure needed to run your application's tests in parallel. |
conifer run |
Runs your application's tests in parallel based on the gathered testing parameters. |
conifer teardown |
Destroys most or all of the AWS resources that were deployed. |
Initialization
The first command you want to run to setup your project is init
.
conifer init
Note: Please ensure you are in your project directory before running conifer init
.
- Conifer prompts you for the number of parallel instances you want provisioned and the type of AWS EC2 instance.
- Conifer provisions a
.conifer
folder within your project directory and installs the necessary deployment and dashboard packages to deploy and run Conifer. - Creates a configuration file called
conifer-config.json
that stores prompt information.
Building a Conifer Image
Prerequisites:
- Application Dockerfile
Conifer assumes your application already has a Dockerfile and will use your Dockerfile in combination with Conifer's Dockerfile.
Note: In order for Conifer to use your Dockerfile, you will need to comment out your FROM
instruction.
conifer build
- Builds the Conifer image based on your Dockerfile and Conifer's Dockerfile to install the necessary dependencies needed to run your application and perform Cypress tests within a Docker container.
- Can be used to re-build if any changes were made to your application.
Deploying Conifer
conifer deploy
- Deploys the required AWS infrastructure using AWS CDK based on Conifer's configuration file.
- Automatically launches the Conifer dashboard so you can see your test results live.
Teardown
conifer teardown
Destroys most or all of the AWS infrastructure depending on prompt responses.
Note: We do not destroy the Image stored on AWS ECR and the DynamoDB Table unless specified.
Conifer Architecture
The above diagram shows the complete infrastructure of Conifer that is provisioned with deploy
. For a deeper understanding of this architecture and what each piece is doing, please read our case study.