Uploaded image for project: 'Qt License server'
  1. Qt License server
  2. QLS-777

Unit test review and refactoring

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • Not Evaluated
    • None
    • None
    • None
    • b6a32ab81 (dev), cf5af10b7 (dev)
    • License server development 19, License server development 20, License server development 21, License server development 22

    Description

      • Acquire Knowledge and Conduct Test Coverage Analysis
               Know how to get test coverage with Jest
                Run Tests and Analyze Coverage Reports. Consider(Plan) writing additional tests to cover these areas to improve the coverage.
      • Isolate Unit Tests from Database Connections
                Understand the Importance of Isolation in Unit Testing: Unit tests should be fast, reliable, and independent. Isolating the tests from external dependencies like databases ensures that the tests are not affected by the state of the external system and can run in any environment without requiring a real database connection.
                Refactor Tests to Use Mocks: Modify the existing unit tests to use the mocked database connections. Ensure that the tests verify the behavior of the code under test without actually interacting with the real database.

      .

      Attachments

        1. Screenshot 2024-03-13 at 14.04.10.png
          14 kB
          Lam Pham
        2. Screenshot 2024-03-13 at 14.05.46.png
          12 kB
          Lam Pham
        3. testResults.txt
          10 kB
          Ashan Walpitage
        For Gerrit Dashboard: QLS-777
        # Subject Branch Project Status CR V

        Activity

          People

            aswalpit Ashan Walpitage
            rikuzeng Zheng Zeng
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes