0

Hello DevOps community!

TL;DR What are your cases where you integrated cypress end-to-end testing to your project? What are the best approaches? Pitfalls?

Long story... I got the QA engineer asking me to help him organizing the end-to-end project testing with Cypress. There are backend and frontend containers running on AWS ECS that are using several other services (RDS, redis, elasticsearch, etc.). We have our infrastructure written in HCL (Terraform) We use Ansible to provision EC2 instance with OpenVPN to allow developers accessing database. We have automatic deployment to AWS using CircleCI. We have three environments - prod, dev and demo - each one is a separate set of identical infrastructure stack.

After a meeting with frontend guys, me and QA agreed that we are not going to run Cypress on every single commit in dev, i.e. we won't configure cypress in workflow for regular features development. Instead, they've raised and idea of having separate environment that will get automatically provisioned on-demand when QA needs to do testing.

I've actually started to glue terraform with ansible to have testing infrastructure being provisioned on-demand, let's say with one shell script? But faced several problems - using terraform provisioners not possible because I'm going to parse tfstate file to perform steps defined in provisioners, but tfstate is being saved on disk only after terraform apply finishes. Organizing an additional instance or VM to apply terraform first and then parse tfstate file looks like overkill.

Any ideas, any use-cases and links are welcomed, many thanks to everyone helping!

1
  • So you already have 3 environments fully coded it seems, what prevents you to create a 4th, 5th, etc. "QA-<testXXX>" environment with the same code and different parameters? It seems you've omitted some necessary bits about what is not coded and manually done to give any advice here. – Tensibai Feb 10 at 12:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.