Uploaded image for project: 'Moodle QA'
  1. Moodle QA
  2. MDLQA-17933 Moodle 4.3 QA
  3. MDLQA-18421

CLONE - Test SEB Javascript API query of Browser Exam Key (BEK) and Config Key (CK) keys

XMLWordPrintable

    • Icon: Functional Test Functional Test
    • Icon: Major Major
    • None
    • Original - DO NOT REPORT TEST RESULTS HERE
    • Quiz

      Setup

      The following tests should be run on at least the Mac OS and Windows platforms.

      Notes

      • SEB == Safe Exam Browser, going forward.
      • By default SEB requires the application to be run on a computer with a single built-in screen. This is configurable, but there is currently a bug in the Windows version that does not allow a computer with external screens only (i.e. a Tower), so it's recommended to test on a laptop without any other screens plugged in.

      Install SEB

      1. On Mac
      2. On Windows

      Site setup

      1. Log in as an admin.
      2. Navigate to Site administration -> Plugins -> Activity modules -> Safe Exam Browser templates
      3. Click 'Add new template'
      4. Set new template name to 'Test template'
      5. Upload an unencrypted seb config file. Either use the one attached to the tracker (SebClientSettings.seb) or generate one using the Safe Exam Browser config tool.
      6. Set Enabled to 'Yes'.
      7. Click 'Save changes'.
      8. Create a test user.
      9. Create a test course.
      10. Enrol a test user in the test course in the 'student' role.

      Setup - SEB Manual config

      1. In the test course, create a quiz.
      2. Give the quiz the name 'SEB quiz - Manual'.
      3. In quiz settings, go to the Safe Exam Browser section.
      4. Set 'Require the use of Safe Exam Browser' to 'Yes - Configure manually'.
      5. Save the quiz settings.
      6. Add a question to the quiz.

      Setup - SEB Template config

      1. Go back to the course homepage with editing mode on.
      2. Duplicate the quiz and give it the name 'SEB quiz - Template'
      3. Edit the quiz settings, and go to the Safe Exam Browser section.
      4. Set 'Require the use of Safe Exam Browser' to 'Yes - Use an existing template'.
      5. For setting 'Safe Exam Browser config template', select the template 'Test template'
      6. Save the quiz settings.

      Setup - SEB Upload config

      1. Go back to the course homepage with editing mode on.
      2. Duplicate the quiz and give it the name 'SEB quiz - Upload config'
      3. Edit the quiz settings, and go to the Safe Exam Browser section.
      4. Set 'Require the use of Safe Exam Browser' to 'Yes - Upload my own config'.
      5. Upload an unencrypted seb config file. Either use the one attached to the tracker (SebClientSettings.seb) or generate one using the Safe Exam Browser config tool.
      6. Save the quiz settings.

      Setup - SEB Client config

      1. Go back to the course homepage with editing mode on.
      2. Duplicate the quiz and give it the name 'SEB quiz - Client config'
      3. In quiz settings, go to the Safe Exam Browser section.
      4. Set 'Require the use of Safe Exam Browser' to 'Yes - Use SEB client config'.
      5. Save the quiz settings.

      Setup - SEB Upload config - Invalid key

      1. Go back to the course homepage with editing mode on.
      2. Duplicate the 'SEB quiz - Upload config' quiz and give it the name 'SEB quiz - Upload config invalid key'
      3. Edit the quiz settings, and go to the Safe Exam Browser section.
      4. Add random key to "Allowed browser exam keys". E.g. 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08
      5. Save the quiz settings.

      Test scenarios

      Test quiz access with 'Configure manually' SEB settings

      1. Open Moodle in a regular web browser (E.g. Firefox, Chrome)
      2. Log in as the test user.
      3. Go to test course
      4. Go to test quiz: 'SEB quiz - Manual'
      5. You should see the message: "The Safe Exam Browser keys could not be validated. Check that you're using Safe Exam Browser with the correct configuration file."
      6. You should see a button with the label: "Launch Safe Exam Browser"
      7. Click on "Launch Safe Exam Browser"
      8. Confirm to open the link via Safe Exam Browser
      9. On the SEB window, log in as a test user.
        • On Windows, the SEB reloads after logging in and you will have to log in again.
      10. You should see the quiz landing page
      11. (Mac only) You should see an alert with the message: "Checking access to Safe Exam Browser..."
      12. (Mac only) After a short delay, the page should reload.
      13. You should no longer see the message: "The Safe Exam Browser keys could not be validated. Check that you're using Safe Exam Browser with the correct configuration file."
      14. You should see a button with the label: 'Attempt quiz'
      15. Click on 'Attempt quiz'
      16. You should see the first question on the quiz.
      17. Close the SEB window via the power button icon on the lower right-hand corner of the window.

      Test quiz access with 'Use an existing template' SEB settings

      1. Go back to the regular web browser window. You may need to reload the page.
      2. Go to test quiz: 'SEB quiz - Template'
      3. You should see the message: "The Safe Exam Browser keys could not be validated. Check that you're using Safe Exam Browser with the correct configuration file."
      4. You should see a button with the label: "Launch Safe Exam Browser"
      5. Click on "Launch Safe Exam Browser"
      6. Confirm to open the link via Safe Exam Browser
      7. Log in as a test user.
        • On Windows, the SEB reloads after logging in and you will have to log in again.
      8. You should see the quiz landing page
      9. (Mac only) You should see an alert with the message: "Checking access to Safe Exam Browser..."
      10. (Mac only) After a short delay, the page should reload.
      11. You should no longer see the message: "The Safe Exam Browser keys could not be validated. Check that you're using Safe Exam Browser with the correct configuration file."
      12. You should see a button with the label: 'Attempt quiz'
      13. Click on 'Attempt quiz'
      14. You should see the first question on the quiz.
      15. Close the SEB window

      Test quiz access with 'Upload my own config' SEB settings

      1. Go back to the regular web browser window. You may need to reload the page.
      2. Go to test quiz: 'SEB quiz - Upload config'
      3. You should see the message: "The Safe Exam Browser keys could not be validated. Check that you're using Safe Exam Browser with the correct configuration file."
      4. You should see a button with the label: "Launch Safe Exam Browser"
      5. Click on "Launch Safe Exam Browser"
      6. Confirm to open the link via Safe Exam Browser
      7. Log in as a test user.
        • On Windows, the SEB reloads after logging in and you will have to log in again.
      8. You should see the quiz landing page
      9. (Mac only) You should see an alert with the message: "Checking access to Safe Exam Browser..."
      10. (Mac only) After a short delay, the page should reload.
      11. You should no longer see the message: "The Safe Exam Browser keys could not be validated. Check that you're using Safe Exam Browser with the correct configuration file."
      12. You should see a button with the label: 'Attempt quiz'
      13. Click on 'Attempt quiz'
      14. You should see the first question on the quiz.
      15. Close the SEB window

      Test quiz access with 'Use SEB client config' SEB settings

      1. Go back to the regular web browser window. You may need to reload the page.
      2. Go to test quiz: 'SEB quiz - Client config'
      3. You should see the message: "This quiz has been configured to use the Safe Exam Browser with client configuration."
      4. You should NOT see a button with the label: "Launch Safe Exam Browser"
      5. (Mac) client configuration
        1. Open SEB
        2. Open Menu > Preferences
        3. On the General tab:
          • Set the Start URL to the quiz's URL
          • Set a quit password (e.g. just use 'quit')
        4. On Config File tab:
          • "Use config file for..." to "configuring clients"
          • Save and restart SEB
        5. Confirm SEB loads the site's login page.
      6. (Windows) client configuration
        1. Open the start menu
        2. Open the SEB Configuration Utility
        3. On the General tab:
          • Set the Start URL to the quiz's URL
          • Set a quit password (e.g. just use 'quit')
        4. On Config File tab:
          • "Use config file for..." to "configuring clients"
          • Press "Configure Client"
        5. Launch the Safe Exam Browser
      7. Log in as a test user.
      8. You should see the quiz landing page
      9. You should no longer see the message: "This quiz has been configured to use the Safe Exam Browser with client configuration."
      10. You should see a button with the label: 'Attempt quiz'
      11. Click on 'Attempt quiz'
      12. You should see the first question on the quiz.
      13. Close the SEB window

      Test quiz access denied with 'Upload my own config'

      1. Go back to the regular web browser window. You may need to reload the page.
      2. Go to test quiz: 'SEB quiz - Upload config invalid key'.
      3. You should see the message: "The Safe Exam Browser keys could not be validated. Check that you're using Safe Exam Browser with the correct configuration file."
      4. You should see a button with the label: "Launch Safe Exam Browser"
      5. Click on "Launch Safe Exam Browser"
      6. Confirm to open the link via Safe Exam Browser
        • On Windows, the SEB reloads after logging in and you will have to log in again.
      7. You should see the quiz landing page
      8. You should see an alert with the message: "Checking access to Safe Exam Browser..."
      9. After a short delay, the page should reload.
      10. You should see a modal pop-up message: "The Safe Exam Browser keys could not be validated. Check that you're using Safe Exam Browser with the correct configuration file."
      11. Once you close the modal, you should NOT see a button with the label: 'Attempt quiz'
      12. Close the SEB window

      Test with an old version of SEB that doesn't support JS API

      1. Install a Safe Exam Browser application that supports config keys but not the JS API.
      2. Go back to the regular web browser window. You may need to reload the page.
      3. Go to test quiz: 'SEB quiz - Upload config'
      4. You should see the message: "The Safe Exam Browser keys could not be validated. Check that you're using Safe Exam Browser with the correct configuration file."
      5. You should see a button with the label: "Launch Safe Exam Browser"
      6. Click on "Launch Safe Exam Browser"
      7. Log in as a test user.
      8. You should see the quiz landing page
      9. You should not see the message: "The Safe Exam Browser keys could not be validated. Check that you're using Safe Exam Browser with the correct configuration file."
      10. You should see a button with the label: 'Attempt quiz'
      11. Click on 'Attempt quiz'
      12. You should see the first question of the quiz.

        1. mac_client config_step 10.jpg
          mac_client config_step 10.jpg
          2.06 MB
        2. mac_client config_step 12.jpg
          mac_client config_step 12.jpg
          2.58 MB
        3. mac_client config_step 3 and 4.png
          mac_client config_step 3 and 4.png
          119 kB
        4. mac_client config_step 5-5.jpg
          mac_client config_step 5-5.jpg
          3.21 MB
        5. mac_invalid key_step 10.jpg
          mac_invalid key_step 10.jpg
          2.87 MB
        6. mac_invalid key_step 3 and 4.png
          mac_invalid key_step 3 and 4.png
          139 kB
        7. mac_manual_step 14.jpg
          mac_manual_step 14.jpg
          3.37 MB
        8. mac_manual_step 16.jpg
          mac_manual_step 16.jpg
          2.54 MB
        9. mac_manual_step 4 and 5.png
          mac_manual_step 4 and 5.png
          52 kB
        10. mac_older seb_step 10.jpg
          mac_older seb_step 10.jpg
          3.48 MB
        11. mac_older seb_step 12.jpg
          mac_older seb_step 12.jpg
          3.13 MB
        12. mac_older seb_step 4 and 5.png
          mac_older seb_step 4 and 5.png
          182 kB
        13. mac_own config_step 12.jpg
          mac_own config_step 12.jpg
          2.13 MB
        14. mac_own config_step 14.jpg
          mac_own config_step 14.jpg
          2.63 MB
        15. mac_own config_step 3 and 4.png
          mac_own config_step 3 and 4.png
          211 kB
        16. mac_template_step 12.jpg
          mac_template_step 12.jpg
          2.33 MB
        17. mac_template_step 14.jpg
          mac_template_step 14.jpg
          2.50 MB
        18. mac_template_step 3 and 4.png
          mac_template_step 3 and 4.png
          139 kB
        19. SebClientSettings.seb
          33 kB
        20. window_client_config_1.png
          window_client_config_1.png
          888 kB
        21. window_client_config_2.png
          window_client_config_2.png
          888 kB
        22. window_invalid_key_2.png
          window_invalid_key_2.png
          658 kB
        23. window_invalid_key.png
          4.69 MB
        24. window_manual_1.png
          window_manual_1.png
          941 kB
        25. window_manual_2.png
          window_manual_2.png
          759 kB
        26. window_template_1.png
          window_template_1.png
          961 kB
        27. window_template_2.png
          window_template_2.png
          544 kB
        28. window_upload_config_1.png
          window_upload_config_1.png
          868 kB
        29. window_upload_config_2.png
          window_upload_config_2.png
          846 kB

            huongn@moodle.com Huong Nguyen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.