How to deploy and schedule your Cypress tests in the cloud
Tags: cypress, testing, automation
Published: 2023-07-25 19:28:30

---
title: How to deploy and schedule your Cypress tests in the cloud
published: true
date: 2023-06-04 19:17:01 UTC
tags: cypress, testing, automation
canonical_url: https://blog.apify.com/deploy-cypress-tests-cloud/
---

If you're already using Apify and have Cypress code that needs a home, you're in luck. We created Cypress Test Runner to make running Cypress tests in the Apify cloud a breeze.

If you're already using Apify and have Cypress code that needs a home, you're in luck. We created [Cypress Test Runner](https://apify.com/valek.josef/cypress-test-runner?ref=blog.apify.com) to make running Cypress tests on the Apify cloud platform a breeze. Let's see how you can use it.

## **☁️Cloud alternatives for testing**

When it comes to running your Cypress tests in the cloud, there are a few options available:

1. **Cypress Cloud and its alternatives.** Cypress Cloud provides a hosted solution for running your Cypress tests, allowing you to easily execute your tests on a remote infrastructure. There are also open-source alternatives for running Cypress tests and collecting test results.

2. **Run it in CI/CD pipelines.** Integrating your Cypress tests into your CI/CD pipelines is another effective approach tested and used by us here at Apify on a daily basis. By plugging your tests into your existing processes, such as to GitHub Actions, you can seamlessly incorporate testing into your development workflow.

![Example of our CI/CD pipeline we have on GitHub](https://blog.apify.com/content/images/2023/05/Example-of-CI-CD-pipelines.png)

**_Example of our CI/CD pipeline we have on GitHub_**

## **🥾Guide on how to deploy and schedule Cypress tests in the cloud**

If you want to set regular runs for your Cypress tests in the Apify cloud, follow these steps:

### **Step 1. Choose Cypress Test Runner**

![Cypress Test Runner Actor card in Apify Store](https://blog.apify.com/content/images/2023/05/Cypress-Test-Runner.png)

**_Step 1. Choose Cypress Test Runner_**

Head over to [Apify Store](https://apify.com/store?ref=blog.apify.com) and search for _Cypress_. You'll find the [Cypress Test Runner](https://apify.com/valek.josef/cypress-test-runner?ref=blog.apify.com) 🔗. Click **Try for free** and sign in using your email to get started.

### **Step 2. Record or write your tests**

![An example of exporting a test made through Cypress Test Recorder](https://blog.apify.com/content/images/2023/05/image.png)

[**_How to record a Cypress test using Cypress Recorder_**](https://blog.apify.com/how-to-record-test-cypress-recorder-extension/)

Of course, you can add manually written tests as well. But by using the Cypress Test Recorder extension, you can make your test writing a bit faster. Check out our [guide](https://blog.apify.com/how-to-record-test-cypress-recorder-extension/) 🔗 on how to record your tests using the Cypress Recorder Extension in Chrome.

{% embed https://blog.apify.com/how-to-record-test-cypress-recorder-extension/ %}

### **Step 3. Export and paste your tests**

![](https://blog.apify.com/content/images/2023/05/Screenshot-2023-05-19-at-17.54.40.png)

**_Step 3. Export and paste your tests_**

After recording your tests, export them from the Recorder and paste the test code into Cypress Test Runner. This step allows you to set up the runner with your specific tests for execution.

### **Step 4. Start the run**

![Run result: one test failed and one test succeeded](https://blog.apify.com/content/images/2023/05/Cypress-test-fail-and-succeed.png)

**_Run result: one test failed and one test succeeded_**

Now click on **Start** and wait for the run to complete the test. Once your tests are done running, you'll see the Status of the run change to _Succeeded_ or _Failed_. Note that if any of your Cypress tests fail, the whole run will be marked as _Failed_.

![](https://github.com/natashalekh/natashalekh.github.io/blob/main/Log%20cypress%20test.gif?raw=true)

You can also check the full log of every test run.

### **Step 5. Check the dashboard**

To see the test results just copy the dashboard link on top of the Run panel. The dashboard will provide you some valuable insights into your test runs, including detailed test results, metrics, and visual aid. You can use this information to analyze the performance and identify any issues or areas for improving your tests.

![](https://blog.apify.com/content/images/2023/05/Cypress-Test-Runner_failed-test.png)

![](https://blog.apify.com/content/images/2023/05/Cypress-test-dashboard-example.png)

**_Step 5. Check the dashboard_**

### **Step 6. Save your run as a task**

![Step 6. Save your run as a task](https://blog.apify.com/content/images/2023/05/Create-a-task-for-your-run.png)

**_Step 6. Save your run as a task_**

If you want to schedule your test to run on a regular basis, you'll have to create a **Task**. To create a Task, simply head for the **Input** of your Run and click **Save input to new task**.

Now name your task, tweak the Input if needed, and click **Schedule**.

### **Step 7. Schedule your test to run hourly, daily, etc.**

One last thing left to do: choose how often you want the Cypress test to run (weekly, monthly, daily, hourly, custom time or by cron expression). Don't forget to pick your time zone so the run happens exactly when you need it to.

![Step 7. Schedule your test to run hourly, daily, etc.](https://blog.apify.com/content/images/2023/05/Schedule-the-cypress-test-to-run-.png)

**_Step 7. Schedule your test to run hourly, daily, etc._**

By following these steps with Cypress Test Runner, you can effortlessly deploy and schedule your Cypress tests in the Apify cloud. Enjoy the benefits of running your tests remotely, gaining valuable insights, and improving the quality of your software.

## **📇 Template for Cypress Actors**

If you prefer to build your own Cypress Actor, we have a [template](https://apify.com/templates/js-cypress?ref=blog.apify.com) available to help you get started. This template serves as the foundation for any container with Cypress tests (including the one this tutorial is about) and helps our users to create their own Cypress testing solutions faster. Try it and see if it helps you too!

![](https://blog.apify.com/content/images/2023/05/Cypress-template-1.png)

[**_Template for creating Cypress Actors_**](https://apify.com/templates/js-cypress?ref=blog.apify.com)