# Performing User Acceptance Testing (UAT) on a Collection

## Overview
User acceptance testing (UAT) allows you to test your collection from the perspectives of site staff and study participants in a non-production sandbox environment. In Studio, you will always need to move the collection to the UAT stage before you can approve it for use. Perform UAT to confirm that your collection and its surveys, schedules, notifications, events, and rules (if applicable) align with your study protocol.

A collection must have all of the following items before you can start UAT:

* At least one survey
* At least one schedule for each survey
* Complete translations for all languages in the collection

In addition, you need an eCOA Vault sandbox in which you’ll perform UAT. Contact your Veeva Professional Services team if you do not already have an eCOA Vault sandbox.

## Setting up the Sandbox
After starting UAT for the production collection, you can access the collection in the eCOA Vault sandbox using a UAT code.

### Use a UAT Code
You can perform these actions on a sandbox study that does not have a collection created.

1. In the *sandbox* eCOA Vault, create a new study to represent the study that you are conducting UAT on.
2. For the *production* eCOA Vault, open the collection version that UAT is being performed on in Studio, select the **Action** menu  <i class="fas fa-ellipsis-h"></i> next to the version number, and select **Copy UAT Setup Code**.
3. For the *sandbox* ePRO Vault, open the Collections page in Studio, select **Use UAT Code**, enter the code, and select **Connect**.

The production collection controls what you see in the sandbox collection. When you make changes to the production collection and then start a new round of UAT or create a new version of the collection, those changes are reflected in the sandbox collection. 

## Performing UAT

Once UAT is set up, the collection will already be activated when you log in to the Veeva eCOA sandbox as a site user. During UAT, you can use the sandbox to complete the same workflows that site staff use to submit surveys and manage survey activities for study participants and/or caregivers. You can also test how study participants and/or caregivers receive notifications and submit surveys in MyVeeva for Patients. To test your collection from end-to-end, complete the following steps.

<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: If you do not allow caregivers to answer surveys as part of your study, you do not need to test their survey access.</p>
    </div>
  </div>
</div>



<table>
  <thead>
    <tr>
      <th>#</th>
      <th>Step</th>
      <th>Testing User Role</th>
      <th>Instructions</th>
      <th>Related Resources</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><strong>1</strong></td>
      <td>Add Study Countries and Sites</td>
      <td>Sponsor/CRO Staff</td>
      <td>In the sandbox eCOA Vault, create the study countries and sites that you want to use for testing. Ensure that the supported languages are selected at the country and site level that meet your UAT requirements.<br><br>
      When creating a site, you can optionally select an Initial Study Version to indicate which collection version you want the site to receive. This can be used for testing new study versions. You can only set this field when creating the site.</td>
      <td>See the following information:
        <ul>
          <li><a href="/en/gr/918788/">Adding Studies, Study Countries, and Study Sites</a></li>
          <li><a href="#testing-a-new-version">Testing a New Version</a></li>
        </ul>
      </td>
    </tr>
    <tr>
      <td><strong>2</strong></td>
      <td>Add Site Users</td>
      <td>Sponsor/CRO Staff</td>
      <td>Create the site users you want to use for testing.<br><br>
      <div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: We recommend using email aliases for site users. For example, if Site User 1’s email address is john.doe+1@veeva.com and Site User 2’s email address is john.doe+2@veeva.com, notifications for both participants are sent to john.doe@veeva.com. Not all email providers support email aliases. We recommend using Gmail.</p>
    </div>
  </div>
</div>

</td>
      <td><a href="/en/gr/918786/">Managing Site Users</a></td>
    </tr>
    <tr>
      <td><strong>3</strong></td>
      <td>Create Participants</td>
      <td>Site Staff</td>
      <td>In the sandbox Veeva eCOA, create study participants to test surveys, schedules, and notifications. To test email notifications from MyVeeva for Patients, you must create the participant record using an email account you can access.
      <div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: We recommend using email aliases if you create more than one participant for testing. For example, if Participant 1’s email address is jane.doe+1@veeva.com and Participant 2’s email address is jane.doe+2@veeva.com, notifications for both participants are sent to jane.doe@veeva.com. Not all email providers support email aliases. We recommend using Gmail.</p>
    </div>
  </div>
</div>


      </td>
      <td><a class="external-link " href="https://sites.veevavault.help/gr/ecoa/managing-participants/onboarding-participants/" target="_blank" rel="noopener">Onboarding Participants<i class="fa fa-external-link" aria-hidden="true"></i></a> in eCOA Help for Sites
      </td>
    </tr>
    <tr>
      <td><strong>4</strong></td>
      <td>Register and Log In To MyVeeva for Patients</td>
      <td>Study Participant</td>
      <td>
        <ul>
          <li>MyVeeva for Patients is the application that study participants and caregivers use to receive, complete, and submit surveys.</li>
          <li>After a participant has been added, the participant and/or caregiver receives a MyVeeva for Patients welcome email. You can register the account of the participant and/or caregiver by following the link from the email.</li>
          <li>You must use a sandbox MyVeeva for Patients environment to test surveys with the participant and/or caregiver account you created. See the <a href="#testing-apps">Testing the MyVeeva for Patients Android, iOS, and Web Apps</a> section to set up access to the sandbox environment. Note that if you use Time Travel when testing a MyVeeva User view, you cannot log in to the Android or iOS app and must test using the web app instead.</li>
        </ul>
      </td>
      <td>See the following pages in eCOA Help for Sites:
        <ul>
          <li><a class="external-link " href="https://sites.veevavault.help/gr/ecoa/helping-participants/completing-registration-myveeva/" target="_blank" rel="noopener">Completing Registration<i class="fa fa-external-link" aria-hidden="true"></i></a></li>
          <li><a class="external-link " href="https://sites.veevavault.help/gr/ecoa/helping-participants/logging-in-myveeva/" target="_blank" rel="noopener">Logging In<i class="fa fa-external-link" aria-hidden="true"></i></a></li>
        </ul>
      </td>
    </tr>
    <tr>
      <td><strong>5</strong></td>
      <td>Add Participant Event Dates and Times</td>
      <td>Site Staff</td>
      <td>
        <ul>
          <li>Enter datetimes for participant events to trigger surveys and notifications as defined in the collection.</li>
          <li>You can use Time Travel to fast-forward through the study timeline without waiting for real-world time to pass or entering past dates and times for events.</li>
        </ul>
      </td>
      <td><a class="external-link " href="https://sites.veevavault.help/gr/ecoa/capturing-data/working-with-events/" target="_blank" rel="noopener">Working with Events<i class="fa fa-external-link" aria-hidden="true"></i></a> in eCOA Help for Sites</td>
    </tr>
    <tr>
      <td><strong>6</strong></td>
      <td>Submit Surveys in MyVeeva for Patients</td>
      <td>Study Participant</td>
      <td>When you add participant event datetimes for the study participant, the participant and/or caregiver receives notifications and surveys in MyVeeva for Patients as defined in the collection.
        <ul>
          <li>Confirm that the participant and/or caregiver receives the expected notifications.</li>
          <li>Log in to MyVeeva for Patients at the appropriate time to receive, complete, and submit surveys.</li>
        </ul>
      </td>
      <td><a class="external-link " href="https://sites.veevavault.help/gr/ecoa/capturing-data/starting-an-in-person-survey/" target="_blank" rel="noopener">Starting an In-Person Survey<i class="fa fa-external-link" aria-hidden="true"></i></a> in eCOA Help for Sites</td>
    </tr>
    <tr>
      <td><strong>7</strong></td>
      <td>Submit Site Surveys in eCOA</td>
      <td>Site Staff</td>
      <td>After you add participant event datetimes for the study participant, any site surveys associated with those events are available for site staff to submit.</td>
      <td><a class="external-link " href="https://sites.veevavault.help/gr/ecoa/helping-participants/answering-surveys/" target="_blank" rel="noopener">Answering Surveys<i class="fa fa-external-link" aria-hidden="true"></i></a> in eCOA Help for Sites</td>
    </tr>
    <tr>
      <td><strong>8</strong></td>
      <td>Export UAT Data from Study Home</td>
      <td>Site Staff and Sponsor/CRO Staff</td>
      <td>After study participants, caregivers, and site staff submit or miss surveys, the survey and compliance data is available to sites and sponsor users through either Veeva eCOA (Sites) or Study Home (Sponsor) in the eCOA Vault Sandbox. 
        <ul>
          <li><strong>Site Staff:</strong> Run the reports from the Study Details tab in eCOA to export Survey and Compliance data.</li>
          <li><strong>Sponsor Staff:</strong> Using Study Home, export Survey and Compliance  data from the reports tab.</li>
        </ul>
      </td>
      <td>See <a href="/en/gr/14834/">Running Study Home Reports</a> and <a href="/en/gr/912966/">Using a File Transfer Protocol (FTP) Connections to Export Jobs</a> for information on how to export site-facing UAT survey data.</td>
    </tr>
    <tr>
      <td><strong>9</strong></td>
      <td>Complete UAT</td>
      <td>Sponsor/CRO Staff</td>
      <td>When UAT is complete, navigate to the collection in Studio and select <strong>Finish UAT</strong>, then select the appropriate outcome depending on the outcome of your testing.
        <ul>
          <li>If UAT passes, select <strong>Yes, Complete UAT</strong>.</li>
          <li>If changes are needed, select <strong>No, Make Changes</strong>. Editing is unlocked and you can resume making changes to the collection. After you make changes, you can start UAT again.</li>
        </ul>
        If you need to make changes after you have completed UAT, you can select the <strong>All Actions</strong> button <img class="inline" src="https://platform.veevavault.help/assets/images/23r3_ePRO_all_actions_icon.png" alt="All Actions button" style=" width: 1.5rem;" /> and select <strong>Back to Draft</strong> to make additional edits. The summary of changes entered before is retained, and you'll have to start and complete the UAT again to move it back to the UAT Passed status. You can't make any more changes after you approve the collection.
      </td>
      <td><a href="/en/gr/912963/#approving-a-collection">Approving a Collection</a></td>
    </tr>
  </tbody>
</table>

## Testing Using Time Travel

You can change the virtual timeline of a MyVeeva User to complete UAT faster. This functionality is only available in sandbox environments. 


<div class="note-border alert-important">
  <div class="alert alert-important" role="alert">
    <div><i class="far fa-exclamation-circle"></i></div>
    <div class="alert-text">
      <p><strong>Important</strong>:</p>
<ul>
  <li>You can only move forward in time while using Time Travel. If you need to test an earlier event, you must create a new participant and start over.</li>
  <li>Rules that use time-based functions like <code class="language-plaintext highlighter-rouge">Today</code>, <code class="language-plaintext highlighter-rouge">Now</code>, or <code class="language-plaintext highlighter-rouge">isDateInRange</code> use the system time and cannot be tested using Time Travel.</li>
  <li>Notifications are not displayed in Virtual Time or for changes related to Virtual Time.</li>
</ul>
    </div>
  </div>
</div>



### Moving Forward in Time

Complete the following steps to test using Time Travel:

1. In Participant Details, select **Start** under **UAT Time Travel**. The system sets a **Virtual Time** and pauses the live count.
2. You can move forward up to 20 years in the future in a variety of ways, but remember that once you move forward, you cannot return to an earlier virtual date:
    * **Calendar Selection:** Select the **Edit** button, and select a specific future date and time, and select **Advance**. You can also select the **Add** icons <i class="far fa-plus"></i> to increase the date by hours, days, or weeks. 
    * **Advance to Event:** Select **Advance to Event**, select the event you want to jump to, and select **Advance**. Only events that have an event date or expected date are available for selection.<br><br>It may take up to a minute for eCOA to update. Make sure you stay on the page while the time is being updated. 

{:start="3"}
3. If you want event-based surveys to be displayed, set the related event date.
4. Refresh the MyVeeva web app to see the results of the time change for the participant testing.
5. To pause time, select the **Pause** icon <i class="fas fa-pause"></i>.

Time will continue passing from the virtual time you set, even if you are not logged in or actively working on UAT for eCOA. You can view the current virtual time in the UAT Time Travel banner at the top of the page.

When you log in as any user who can view participant data, you will see that participants who are running in Time Travel mode have the UAT Time Travel (Active) icon <img class="inline" src="https://platform.veevavault.help/assets/images/26R1_eCOA_Time_Travel_Icon.png" alt="UAT Time Travel (Active) Icon" style="" /> displayed next to their participant ID in the Participants list, and a purple UAT Time Travel banner is displayed at the top of the page when you view the participant’s page, events page, and past surveys list. However, when logged in as a user with the Site Viewer role, you cannot enable or modify the virtual time.

When using Time Travel, remember that any dates you enter must align with the current Virtual Date to be accepted for configured acceptance windows. For example, when adding Transcriptions or completing Data Changes.

## Testing the MyVeeva for Patients Android, iOS, and Web Apps {#testing-apps}

You can test participant and caregiver survey actions in the MyVeeva for Patients Android, iOS, or web app. To test in the apps, complete the following steps to ensure that the app knows your participant was created in a sandbox for UAT.

<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: If you plan to use Time Travel to test future scenarios, you cannot log in to the Android or iOS app and must test using the Web app instead.</p>
    </div>
  </div>
</div>



### Android or iOS

#### Registering as a New Participant

1. As a site user in the sandbox Veeva eCOA, create a participant or caregiver. See <a class="external-link " href="https://sites.veevavault.help/gr/ecoa/managing-participants/onboarding-participants" target="_blank" rel="noopener">Onboarding Participants<i class="fa fa-external-link" aria-hidden="true"></i></a> for more information. Note the activation code that is generated when you create the participant.
2. Download the MyVeeva for Patients Android app from <a class="external-link " href="https://play.google.com/store/apps/details?id=com.veeva.myveeva.forpatients&hl=en_US&gl=US" target="_blank" rel="noopener">Google Play<i class="fa fa-external-link" aria-hidden="true"></i></a> or the MyVeeva for Patients iOS app from the <a class="external-link " href="https://apps.apple.com/us/app/myveeva-for-patients/id1557308393" target="_blank" rel="noopener">App Store<i class="fa fa-external-link" aria-hidden="true"></i></a>.
3. Open the app. In the Username field, enter \|sbx to indicate that the participant was created in a sandbox.
4. Select **Register with Activation Code**.
5. Enter the activation code that was generated as part of Step 1. If you forgot it, you can generate a new one. 
6. Complete the registration steps. You are logged in as the participant.

#### Logging In

1. Open the MyVeeva for Patients app.
2. In the Username field, enter the username you set and \|sbx at the end to indicate that the participant was created in a sandbox.
3. For example, if your participant’s email is jane.doe+1@veeva.com, enter your username as jane.doe+1@veeva.com\|sbx.
4. Enter your password.
5. When the app requests a multifactor authentication code, enter any six digits. You are now logged in as the participant.

### Web

#### Registering as a New Participant

1. As a site user in the sandbox Veeva eCOA, create a participant or caregiver. See <a class="external-link " href="https://sites.veevavault.help/gr/ecoa/managing-participants/onboarding-participants" target="_blank" rel="noopener">Onboarding Participants<i class="fa fa-external-link" aria-hidden="true"></i></a> for more information. Note the activation code that is generated when you create the participant.
2. Go to <a class="external-link " href="https://patients-sbx.myveeva.com" target="_blank" rel="noopener">https://patients-sbx.myveeva.com<i class="fa fa-external-link" aria-hidden="true"></i></a>.
3. Select **Register with Activation Code**.
4. Enter the activation code that was generated for this participant when you created it in Veeva eCOA. If you forgot it, you can generate a new one.
5. Complete the registration steps. You are logged in as the participant.

#### Logging In

1. Go to <a class="external-link " href="https://patients-sbx.myveeva.com" target="_blank" rel="noopener">https://patients-sbx.myveeva.com<i class="fa fa-external-link" aria-hidden="true"></i></a>.
2. Enter your username and password.
3. When the app requests a multifactor authentication code, enter any six digits. You are now logged in as the participant.

## Making Changes during UAT
The following types of changes require a new round of UAT to be started:
* Surveys, schedules, groups, languages, and rules

The following types of changes apply immediately to the UAT Sandbox:
* Participant ID format
* Study Resources
* In-Person Access setting

To make changes to your collection with a new round of UAT, perform the following steps:
* In the Production eCOA Vault, navigate to the collection version with the status UAT In Progress.
* Select **Finish UAT** and **No, make changes**.
* Make changes to your collection and start a new round of UAT.

## Testing a New Version {#testing-a-new-version}

If you want to test the effects of accepting a new version, you can set up a new site on a previous version by deploying a different version to UAT sites using the Deployments tab in the Study Settings tab of Studio. See <a href="/en/gr/918800/">Deploying Collections to Sites</a> for more information.