Chapter Overview

In this chapter, we simulate a scenario where a development user's new feature causes the QA testing to fail. With Delphix, engineering teams can branch and restore to specific states of data to easily ensure the most accurate data is being made available to the right people at the right time. With a click of a button, application data is restored in moments to a test-ready state so that tests are always run with pristine data sets. 

Chapter Guide

Prerequisite: Sharing a Bookmark from the Developer User

As a prerequisite, you must have completed Chapter 3, during which we share a bookmark with the QA user that we will be using for this section.

Branching Application Data

As the QA user, you want to test and run scripts against the data that was shared with you by the developer. You can organize data in the data container into task-specific groupings, called "branches." For example, you can use a branch to group all the data you have used while addressing a particular bug, testing a new feature in an application, or exploring a business analytics scenario. A branch is used to track a logical task, and contains a timeline of the historical data for that task. One branch is the "active" branch, which means that it is the branch that is currently being updated with new data from the data sources. At any time, you can change which branch is active and thus change which data is in the associated data sources.

1) First, begin by logging in to Delphix as the QA user, using the credentials provided. You'll see that this container looks the same, except now we are on the QA environment, which you can confirm by the string "QA/Testing" next to the container icon.

2) Scroll to the bottom of the Delphix page and click Available. You should see the RC 12345 bookmark from the previous chapter, which was shared with us by the developer. Notice that you don't see the 'Upgraded Public Reports' bookmark because that bookmark was not shared with you.

3) Click the branch icon on the bookmark: . Name the branch "Testing RC 12345".

4) Now Delphix is creating a new branch of application data specifically for testing the RC. Notice how the name of your Jet Stream object at the top changed to "Testing RC 12345". During this process, Delphix is "pausing" your current data, removing it from the QA environment, then provisioning the new branch of data to the QA environment from the "Testing RC 12345" bookmark.

Quickly Reset Data After Destructive Testing

In this section we will simulate destructive testing and quickly resetting the data to a pristine, or "test ready", state. 

1) Once the job from the previous step is complete, open the link to QA studio from your welcome page, in a new window/tab. Enter "DELPHIX_DEMO" as your workspace and log in with the QA credentials.

2) Click on 'SQL Workshop'.

3) Click on 'SQL Scripts'.

4) Click the run icon on the "1 simple test" script. This was a simple select query that was successful.

5) In a new browser window/tab, open the link to QA Application from your welcome page. Log in with the QA credentials. Click around and validate the environment is functioning correctly.

6) Now we're going to run a regression test that will simulate a break in the application. Go back to the original page by clicking 'SQL Scripts'. Run the Regression Test, and view the results. It appears we have dropped the table.

10) Go back to the QA instance of the application. Of course, it's not working. Now that we've found a bug, let's go back to Delphix to share that state of the application back with the developer.

11) Select the most recent point in time, and create a bookmark and title it "Found BUG in regression of RC 12345". Tag it with "RC 12345", "Bug", and "JIRA-12345". These tags show how Delphix integrates with the software development lifecycle, as searching for these bookmarks via tags like 'Bug' and 'JIRA' is incredibly useful.

12) Now, share that bookmark so that the developer user may access it.

13) Go to branches and go back to Manual Testing branch and activate. This pauses the RC 12345 branch we were working on and takes us back to whatever we might have been doing before running scripts on 'RC 12345'.

14) Let's log back in to Delphix as the dev user. We can see where QA branched off that branch! Let's go down to bookmarks, click available, and we see the bookmark that QA shared with us. Restore from this bookmark so we can see the state of the application and what we did to cause it to fail the regression test. Feel free to test the search functionality for 'Bug', 'JIRA', or 'RC 12345'! As the developer, restore to the branch, which lets you access the QA user's broken state, from which you can start debugging and fixing the broken code that was written!

15) Run the dev instance and you'll see it's broken as well, since we restored to a state when the application was down.

16) Now restore from a working point in time, so we can start working again as a developer. Click the "RC 12345" bookmark you created as the developer user and restore. Data is never destroyed in Delphix, we are just accessing different saved states of data rapidly!