Test Sites and Velo

Visit the Velo by Wix website to onboard and continue learning.

When using test sites on a site that uses Velo, it is important to understand how the different versions of your site work with Velo's features.

Database Collections

When you have both a published revision and a test site revision of your site, you still only have one version of your site's database collections that both revision access. That means, when you perform a data operation, such as updating an item, from either your published or test site revision the change will affect both of your site revisions.

While your data does not change based on the site revision, your database schema may differ from revision to revision. This means that a field that exists in the schema in the test site revision may not exist in the schema in the published revision. Because collection data itself is maintained regardless of whether a field is in the schema or not, this should not affect the functionality of your site revisions.

Backend Events

When an event on your site triggers a backend event handler, the version of the event handler in your published site revision runs, regardless of what revision the site visitor was viewing when causing the event to fire.

For example, let's say you have a onNewOrder event that handles new events in your store. In your published site your event handler sends an email to p@supplier.com for each order received, but in your test site the same event handler sends an email to rc@supplier.com. Whenever a site visitor places an order on your site, whether in the published revision or in the test site, an email will be sent to p@supplier.com.

If you define a backend event handler in your test site revision that does not exist in your published revision, the event handler will never run.

HTTP Functions

When a client reaches one of your HTTP function endpoints, the version of the HTTP function in your published site revision always runs.

For example, let's say you have an endpoint http://www.mysite.com/_functions/quote that calculates price quotes based on information provided in the HTTP request. In your published site your endpoint works based off of your current quote calculation logic, but in your test site the same endpoint uses alternative quote calculation logic. Whenever a client reaches your endpoint, a quote will be calculated based on the logic in your published site.

If you define an HTTP function in your test site revision that does not exist in your published revision, clients will not be able to reach that endpoint.

Scheduled Jobs

When you schedule jobs in your site's backend, only the jobs scheduled in your published site revision run. The jobs scheduled in your test site revision do not run.

Was this helpful?
Yes
No