<?xml version="1.0" encoding="utf-8"?>
<protocol title="Sample protocol - Functional verification of a computerized system" code="SAMPLE-001" version="1.0">
  <test name="Login and authentication">
    <step code="1.1" name="Open the application">
      <action>Start the sample application.</action>
      <expected>The login screen opens.</expected>
    </step>
    <step code="1.2" name="Login with valid credentials">
      <action>Enter a valid user name and password and confirm.</action>
      <expected>Access is granted and the user name is displayed.</expected>
    </step>
    <step code="1.3" name="Login with wrong password">
      <action>Enter a wrong password and confirm.</action>
      <expected>Access is denied and an error message is shown.</expected>
    </step>
    <step code="1.4" name="Lock after failed attempts">
      <action>Repeat the login with a wrong password three times.</action>
      <expected>The account is locked and the event is recorded.</expected>
    </step>
  </test>
  <test name="Record management">
    <step code="2.1" name="Create a record">
      <action>Create a new record filling in the mandatory fields.</action>
      <expected>The record is saved with date, time and user.</expected>
    </step>
    <step code="2.2" name="Change with reason">
      <action>Change a field of the record and enter the reason.</action>
      <expected>The change is accepted only when a reason is entered.</expected>
    </step>
    <step code="2.3" name="Audit trail">
      <action>Open the change history of the record.</action>
      <expected>Previous value, new value, user, date and time are visible.</expected>
    </step>
    <step code="2.4" name="Approved record cannot be deleted">
      <action>Try to delete an already approved record.</action>
      <expected>Deletion is not allowed.</expected>
    </step>
  </test>
  <test name="Reports and export">
    <step code="3.1" name="Generate the report">
      <action>Generate the summary report of the records.</action>
      <expected>The report opens and lists the expected records.</expected>
    </step>
    <step code="3.2" name="Export to PDF">
      <action>Export the report as a PDF file.</action>
      <expected>The PDF file is created and opens correctly.</expected>
    </step>
    <step code="3.3" name="Content consistency">
      <action>Compare the PDF with the data on screen.</action>
      <expected>The PDF data match the data on screen.</expected>
    </step>
  </test>
</protocol>
