---
title: Testing with a Staging Environment - Continuous Deployment
description: In this article, we'd like to talk about how we at TestingBot make sure
  that new code that goes into production is tested thoroughly.
source_url:
  html: https://testingbot.com/blog/staging-tests-continous-deployment
  md: https://testingbot.com/blog/staging-tests-continous-deployment.md
---

# Continuous Deployment Overview

By [Jochen D.](https://testingbot.com/about/jochen-d)2018-11-19

 Share on Facebook 

 Share on Twitter 

 Post on Reddit 

 Share link 

In this article, we'd like to talk about how we at TestingBot make sure that new code that goes into production is tested thoroughly.

As a cloud testing company, we deal with testing on a daily basis. For us to provide a good service, it's essential that we use the service ourselves.

For this reason, everything at TestingBot is being tested by TestingBot itself (`*inception*`).

For our website we've got a batch of Selenium tests which test various functionality on several browsers and platforms.  
Here's what our tests are verifying:

- Does the page render correctly on each browser?
- Do the buttons work, do they trigger the correct action?
- Does the pricing page work, does upgrading your subscription function correctly?
- Can we create a new account, can we log in?
- Does the member dashboard work, can we see and edit tests
- and a lot more test cases...

We've configured our test runner to be able to run on several environments via a configuration setting:

- **local:** tests run on our own computer via [TestingBot Tunnel](https://testingbot.com/support/tunnel)
- **staging:** tests run on our own staging environment
- **production:** tests run on the live environment (TestingBot.com)

For each environment, we use a separate database, to make sure we do not mix data between environments.

## Running tests against code that's about to go into production.

#### Repository Setup

We make sure that our production webserver syncs code from our **master branch**.  
We've also toggled a setting in our repository that we can only push new code in our **development branch** , not in our master branch.  
The only one with a access to push to master is our [Jenkins CI](https://jenkins.io/).

We've also added a **GIT hook** to our repository that will trigger a Jenkins CI Job as soon as we push new code into the repository.  
This Jenkins CI job does the following:

- Sync the development branch on our staging server, so that the staging webserver is serving the latest code, including the code we just pushed.
- Run a **lint checker** on the new code, to make sure we don't introduce syntax errors in our code.  
The reason we do this first is because it's very fast to do this, and because it doesn't make sense to first run longer tests when the code has been broken anyway.

- Run all tests against this staging webserver. Since we use a separate database, the production data is not affected.
- As soon as one of the steps above fail, the Job fails. If all steps succeed, we continue to the last step:
Jenkins will merge the newly pushed code into the **master branch**.  
When we deploy now, the new code will be included in production.

The process outlined above makes sure that we always know that new changes that go into production pass all tests.

#### Deploying to production

Once Jenkins informs us that all tests pass (we use a Slack hook), we can deploy the new code.

Once the code is deployed, we will run the same tests again, this time we set the environment variable to **production.**

If all goes well, these tests should all pass, since they already passed in our staging environment.

## Improvements

Since we're an Automated Testing company, we'd like to improve this process in the future.

When the staging tests pass, we can configure our Jenkins to automatically deploy the new code from the **master branch**. At this point, we've basically reached the [Continuous Deployment](https://en.wikipedia.org/wiki/Continuous_deployment) level.

## How TestingBot can help you

Interested in using this approach for your product? At TestingBot, we provide [over 4600 browser combinations](https://testingbot.com/support/web-automate/browsers) to run tests against.   
Once you've created some Selenium tests and connected the tests with our grid, you can start testing your code on various platforms, browsers and devices.

[← Previous post Automated and Live Testing in different Geographical Locations](https://testingbot.com/blog/geo-country-testing) [Next post → Black Friday and Cyber Monday Testing](https://testingbot.com/blog/black-friday-cyber-monday-testing)

## Sidebar

### TestingBot Cloud Testing

Run automated, manual and visual tests on remote browsers and devices. Sign up for a free trial.

[Free Trial](https://testingbot.com/users/sign_up)

### Latest articles

[![Announcing AI Test Insights](https://testingbot.com/assets/blog/2026/ai-insights.jpg)](https://testingbot.com/blog/ai-test-insights)

#### Announcing AI Test Insights

Use AI Insights to quickly discover why an automated test...

[Read: Announcing AI Test Insights](https://testingbot.com/blog/ai-test-insights)

[![Selenium vs Playwright 2026](https://testingbot.com/assets/blog/2026/selenium-vs-playwright-2026.jpg)](https://testingbot.com/blog/selenium-vs-playwright)

#### Selenium vs Playwright 2026

Comparing Selenium vs Playwright - which is the best test...

[Read: Selenium vs Playwright 2026](https://testingbot.com/blog/selenium-vs-playwright)

[![Maestro Physical Device Testing](https://testingbot.com/assets/blog/2026/maestro-physical.jpg)](https://testingbot.com/blog/maestro-physical-device-testing)

#### Maestro Physical Device Testing

Maestro testing in parallel on physical Android and iOS d...

[Read: Maestro Physical Device Testing](https://testingbot.com/blog/maestro-physical-device-testing)

## Related Articles

[![Selenium vs Playwright 2026](https://testingbot.com/assets/blog/2026/selenium-vs-playwright-2026.jpg)](https://testingbot.com/blog/selenium-vs-playwright "Selenium vs Playwright 2026")

### [Selenium vs Playwright 2026](https://testingbot.com/blog/selenium-vs-playwright)

Comparing Selenium vs Playwright - which is the best test framework for your usecase?

[Read article →](https://testingbot.com/blog/selenium-vs-playwright)

[![tvOS Physical Device Testing](https://testingbot.com/assets/blog/2025/appletv.jpg)](https://testingbot.com/blog/tvos-automated-testing "tvOS Physical Device Testing")

### [tvOS Physical Device Testing](https://testingbot.com/blog/tvos-automated-testing)

Run automated tvOS tests on physical AppleTV devices.

[Read article →](https://testingbot.com/blog/tvos-automated-testing)

[![February 2023 Product Updates](https://testingbot.com/assets/blog/2023/feb_prod_update.jpg)](https://testingbot.com/blog/february-2023-updates "February 2023 Product Updates")

### [February 2023 Product Updates](https://testingbot.com/blog/february-2023-updates)

An overview of the exciting new features released on TestingBot in February.

[Read article →](https://testingbot.com/blog/february-2023-updates)

[![Selenium 20th birthday](https://testingbot.com/assets/blog/2024/selenium20.webp)](https://testingbot.com/blog/selenium-20-years "Selenium 20th birthday")

### [Selenium 20th birthday](https://testingbot.com/blog/selenium-20-years)

Celebrate Selenium's 20th birthday. An overview of the years.

[Read article →](https://testingbot.com/blog/selenium-20-years)

## More by Jochen D.

[![Announcing AI Test Insights](https://testingbot.com/assets/blog/2026/ai-insights.jpg)](https://testingbot.com/blog/ai-test-insights "Announcing AI Test Insights")
### [Announcing AI Test Insights](https://testingbot.com/blog/ai-test-insights)

Use AI Insights to quickly discover why an automated test failed.

[![Maestro Physical Device Testing](https://testingbot.com/assets/blog/2026/maestro-physical.jpg)](https://testingbot.com/blog/maestro-physical-device-testing "Maestro Physical Device Testing")
### [Maestro Physical Device Testing](https://testingbot.com/blog/maestro-physical-device-testing)

Maestro testing in parallel on physical Android and iOS devices.

[![tvOS Physical Device Testing](https://testingbot.com/assets/blog/2025/appletv.jpg)](https://testingbot.com/blog/tvos-automated-testing "tvOS Physical Device Testing")
### [tvOS Physical Device Testing](https://testingbot.com/blog/tvos-automated-testing)

Run automated tvOS tests on physical AppleTV devices.

[See all posts by Jochen D. →](https://testingbot.com/about/jochen-d)

## Ready to start testing?
[Start a free trial](https://testingbot.com/users/sign_up)
