UAT Roadmap: Writing an Effective UAT Script

By Editorial Team on December 13, 2023

Part 4 – How to Write an Effective UAT Script

User Acceptance Testing (UAT) ensures the quality and user satisfaction of software systems. One of the critical components of successful UAT is the creation of an effective testing script. This phase allows end-users, such as researchers, clinicians, data managers, and quality assurance, to verify that the electronic data capture (EDC) system meets their requirements and workflow needs. In this blog post, we will provide a comprehensive guide on writing an effective testing script to be used during UAT.

What Is a Testing Script?

A testing script outlines the actions to be performed and the expected results for each test case during User Acceptance Testing (UAT). When conducting UAT on a study built in an electronic data capture (EDC) system, the script guides thorough testing, ensuring that the EDC meets the end user’s requirements and expectations. 

Types of Tests 

There are a couple of types of tests – positive and negative. 

  1. Positive test: Positive tests aim to verify that the system performs as expected. 
    • Test Scenario: Administer the drug to a patient with a weight within the specified range. 
    • Expected Result: The system accurately calculates and recommends the appropriate dosage. 
  2. Negative test: Negative tests are designed to check if the system can handle unexpected or inaccurate inputs.  
    • Test Scenario: Attempt to register a patient with missing or invalid information, such as an incomplete date of birth. 
    • Expected Result: The system should identify incomplete/invalid data and prevent patient registration. 

Who Should Write a Testing Script?

The responsibility of writing a testing script for a study built in an electronic data capture (EDC) system may be assigned to different team members, depending on project resources. It is essential to have individuals who understand the protocol and EDC system involved in writing a testing script. That might be a monitor, for example. Because study builders are most familiar with the study build, and how it relates to the study protocol, they may assist in creating these scripts. However, they must maintain objectivity when doing so. Eventually, the testing script will be reviewed by the Quality Assurance (QA) team before testing to ensure accuracy and completeness. When it finally comes to testing, ideally, your testing scriptwriters will not be testers. 

How to Write a Testing Script?

When writing tests, it is essential to refer to the study requirements. Some tests might be general and already written for you, while others will be study-specific. 

  • General: These would apply across an organization’s studies and may be found in Standard Operating Procedures (SOPs). Examples include “Visit dates entered must not be set to a future date” or “Weight in pounds must be converted to kilograms.” 
  • Study-specific: These would apply to a specific protocol and would be detailed in said protocol. Examples include a dosing calculation or “all roles except the treatment administrator is masked to treatment group.” 

Remember, when creating tests, you want to avoid adding details that might guide the tester to the expected result. Strike a balance and tailor each test to the situation. For example, be thorough and detailed when writing up a dosage calculation test – each weight category should be tested for the correct dosage output. On the other hand, when drafting an expected date visit test, you don’t have to include as many details – only that the expected visit date should be X days from the entered visit date.  

Where to Store the Testing Script?

Where to store your testing script can vary depending on your team’s workflow. However, it is recommended to store the tests in a place accessible to all appropriate stakeholders. Paper is an option but not always easily accessible. Other options include an Excel or Word file shared via SharePoint. 

Elements of a Test Script 

To be clear as to what should be tested and the expected results, each test in your testing script should specify the following: 

  1. Test number: Each test should have a unique reference number for easy tracking and identification. 
  2. Description of test: Define what is being tested (e.g., a dosing calculation output). 
  3. Precondition: Specify any conditions that must be met before the test is executed (e.g., you must be logged in as a treatment administrator). 
  4. Steps: Outline the actions that need to be performed during the test. Here, you want to be sure that any details do not guide your testers to the expected results. You are simply outlining the steps needed to perform the test. For example, if testing randomization, your steps might include “randomize eight eligible patients.” (Your expected results, the next item in our list, might then include “randomization ratios are maintained across patients and within a block.”) 
  5. Expected results: Provide enough information so the tester can confidently determine whether the test passed or failed. For positive tests, the expected results should align with the desired behavior. For negative tests, specify what should not happen. However, proving a negative is not always possible. A simple negative test might be testing a field that should only contain numbers and entering letters. If the builder accidentally used a free text field (i.e., not a numeric field), no error would populate, making it “harder” to prove the negative. 
  6. Pass/Fail status: Indicate whether the test has passed or failed, and if possible, attach evidence to support the assessment. 
  7. Objective evidence: If necessary, provide proof that a test passed (e.g., the test patient ID that triggered the test result) so that another team member can verify the pass/fail status. 

Minimum UAT Requirements 

When conducting User Acceptance Testing (UAT), you will want to create a blank slate and run enough tests so that you can see a pattern, ensuring that your test results are accurate. At a minimum,

  • Create a brand-new site for testing, 
  • Add ten new patients, 
  • Cover all patient scenarios, and 
  • Involve different roles, including masked/blinded roles.

How Long Does UAT Take? 

The time it takes to conduct User Acceptance Testing (UAT) depends on various factors such as the study’s protocol requirements, the complexity of the study, available resources, and internal procedures. A complicated study will take longer. The more resources (e.g., number of testers) will speed up the process. If you’re setting up the UAT process for the first time, it might take longer as you work to define your process. However, once you have established an effective process for your organization and understand how your selected electronic data capture (EDC) system works, future UAT cycles should be faster. 

Post-UAT Considerations

Keep in mind that failures are to be expected during User Acceptance Testing (UAT) so that any problems can be corrected before going live. So after UAT, you will want to fix any fails. However, before implementing a fix, we suggest a risk assessment to evaluate the fix’s complexity and impact. Consider… 

  • Will a fix affect other tests? If so, that would require retesting, including retesting tests that might have previously passed. The impact can range from none (e.g., changing text on a label) to moderate (e.g., editing a calculation that affects a subsequent calculation) to high (e.g., changes impacting forms across multiple visits).  
  • If a test fails, will not making a fix prevent the study build from meeting the study requirements? For example, during testing, it’s discovered that the system fails to create a serious adverse event form, a critical data collection point in the protocol. This instance is high risk and should be fixed regardless of the impact on other calculations.    

Risk assessment: Assess the complexity and impact of test failures and consider the implications of making fixes. 

Archiving UAT Results  

Once User Acceptance Testing (UAT) is completed, lock down your documentation in a password-protected or locked file, or print a final copy of your results. 

Maintain the testing script data and results throughout the trial, as these documents affirm the precise implementation of the study and the effective execution of UAT. Additionally, they serve as valuable resources, offering insights and lessons learned for future studies. 

An effective testing script is essential for successful User Acceptance Testing (UAT). You can ensure an efficient UAT process by understanding the purpose of a testing script, assigning script-writing responsibilities, following a structured approach to script creation, documenting in appropriate platforms, and considering post-study usage. 


Learn More About UAT

Navigating User Acceptance Testing (UAT)

Looking to learn more about User Acceptance Testing (UAT)? Explore our collection of resources to understand how UAT ensures that your study database meets study requirements and expectations of end-users and complies with applicable regulations.