Adding Test Coverage

Created on 29 July 2025, about 2 months ago

Problem/Motivation

No test coverage found.

Steps to reproduce

Install module and check for test coverage. No test coverage found.

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇮🇳India Shubh02

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @Shubh02
  • 🇮🇳India Shubh02

    Proposed resolution

    Adding test coverage in existing module.
    Step 1 - Create a tests folder on root of module.
    Step 2 - Create src folder in tests folder.
    Step 3 - Create Unit folder in src folder under tests folder.
    Step 4 - Create Form folder in Unit folder which is under src/tests.

    So the final path will be /tests/src/Unit/Form
    Step 5 - Download DeferJsFormTest.test file and rename it with DeferJsFormTest.php
    Step 6 - Place this test file DeferJsFormTest.php on path /tests/src/Unit/Form

    Now test coverage is available for this module.

  • First commit to issue fork.
  • 🇮🇳India Shubh02

    Proposed resolution

    Adding test coverage in existing module.
    Step 1 - Create a tests folder on root of module.
    Step 2 - Create src folder in tests folder.
    Step 3 - Create Unit folder in src folder under tests folder.
    Step 4 - Create Form folder in Unit folder which is under src/tests.

    So the final path will be /tests/src/Unit/Form
    Step 5 - Download DeferJsFormTest.txt file and rename it with DeferJsFormTest.php
    Step 6 - Place this test file DeferJsFormTest.php on path /tests/src/Unit/Form

    Now test coverage is available for this module.

  • 🇮🇳India anurag_nagar

    @shubh02 I have checked the test file which seems to be covering test case for number of lines in DeferJsForm , I have raise a MR against it.

  • 🇮🇳India vinodhini.e chennai

    Hi, I have installed the module on a Drupal 11.2.2 and applied the merge request #2

    Reviewed the test file, which covers test cases for the number of lines in the DeferJsForm.

    Thanks.

  • 🇮🇳India anurag_nagar

    anurag_nagar changed the visibility of the branch 3538496-adding-test-coverage to hidden.

Production build 0.71.5 2024