Skip to content

馃毃 configlet sync --test found unsynced tests聽#2959

Open

Description

@github-actions
Checking exercises...
[warn] hangman: missing 10 test cases
       - Initially 9 failures are allowed and no letters are guessed (2419ffe6-16d8-4059-856a-9a101998a418)
       - After 10 failures the game is over (17c4296d-daab-44dc-8155-37c77caa52c1)
       - Losing with several correct guesses (77c9ae1f-bbc4-4ed4-b67e-08110cbcfc17)
       - Feeding a correct letter removes underscores (25101d8d-9874-405b-9825-193a14b69753)
       - Feeding a correct letter twice counts as a failure (8e6bd521-bc9b-458f-9cce-f57f4140c173)
       - Guessing a repeated letter reveals all instances (5e6971b7-5e5f-49c2-b85d-1dd6aeb53bd5)
       - Getting all the letters right makes for a win (a6c69d92-01ef-4b81-b9d9-801131e79bbb)
       - Winning on the last guess is still a win (2dc47994-b434-4a26-b70c-1eebeff77fe4)
       - Guessing after a lose is error (52801d56-6963-494b-a901-5736e46ddc12)
       - Guessing after a win is error (29a874f3-a413-4e1b-9a60-6be018e70b60)
[warn] list-ops: missing 1 test case
       - reverse the elements of the list -> non-empty odd-length list (64d77184-5f74-4845-b158-545d2dd2df98)
[warn] tree-building: missing 16 test cases
       - empty list (761790a3-4c27-461a-b4e9-8bce8ccee5a1)
       - single record (dcc89dc3-eb39-4f26-a3cd-964e607c95ff)
       - three records in order (dcdb80f0-e5da-43e1-8b8d-6f307be89c0e)
       - three records in reverse order (2ff5b8f8-d95e-401e-9359-233919488d22)
       - more than two children (de798d3b-8905-4446-a114-a0dd2476d945)
       - binary tree (13dd9b3c-6137-415f-b6fe-5044c1dfbc50)
       - unbalanced tree (5cfd29dc-166b-47da-84ca-1c60b5ae5941)
       - one root node and has parent (a05ddb5d-2d11-4948-88d3-b5f18a44ddce)
       - root node has parent (9ed09df2-8fd6-4e37-aa37-e7753c057a1a)
       - no root node (8755a2c4-2c6b-4396-b155-b5bf4b6bc280)
       - duplicate node (c6ef8f9a-4045-4949-a1e1-e0ae804e4af4)
       - duplicate root (7a7b77a6-3447-4905-b79c-d22bfe43f408)
       - non-continuous (c6f51bd7-3608-4390-b446-dfd1bcbf3ddc)
       - cycle directly (1f3d1b50-4494-4b22-b88a-68f32f7d321d)
       - cycle indirectly (ac568b50-3f9b-4cb4-b602-e0eb13de4269)
       - higher id parent of lower id (cf954b21-3cef-420c-8e72-d19547505e1f)
[warn] some exercises are missing test cases

Activity

  1. kahgoh commented on Jul 5, 2025

    @kahgoh
    Member

    This is a recurring task that has to be done from time to time.
    Do not reference this issue by writing resolves/fixes #XXX in your PR because that will close it.

    We want to keep the track up to date with problem specifications, which means regularly checking if anything changes and needs updating.

    How to do this task:

    Step 1: fetch configlet

    If you're on Linux or a Bash environment, run:

    ./bin/fetch-configlet

    Alternatively, you can download for Windows or MacOS from the releases.

    Step 2: Update tests for an exercise

    The general goal is that all Java practice exercises follow problem specifications, except for when it doesn't make any sense in Java.

    Important:

    Get familiar with the problem specifications repository and the canonical-data.json format it uses for describing tests cases.
    Read CONTRIBUTING.md for the general rules of this repository.
    Please create separate a PR per exercise when changing tests.

    Step 2.1 Update tests.toml

    Update tests.toml by running this command for a chosen exercise:

    ./bin/configlet sync --exercise <exercise-slug> --tests --update

    This command assumes that we want to implement all the new tests, and that is our default approach, but it still needs verifying on a test-by-test base.

    Beware that some new tests may replace an existing one. Typically, these will have a reimplements key and the you might see a message saying "It reimplements this test case:". If this happens, you will likely need to check the contents of the exercise's .meta/tests.toml file to see if the original test has a included = false. If it does, answer no to replacing the existing test (no need to add the test). Otherwise, answer yes and update the test that it replaces.

    Step 2.2 Analyze the new test cases and update the Java tests files accordingly

    Find all the test cases affected by the previous step in the exercise's canonical-data.json file in the problem specifications repository. Analyze what the changes actually are.

    You might need to delete a test. You might need to add a new test. You might also need to replace an existing test with a new one (you'll see in tests.toml that it "reimplements" another).

    Some exercises don't even have a tests.toml file yet. In this case, carefully check which tests from the canonical-data.json are already implemented and make sure the generated tests.toml file reflects this.

    If you believe a new test case shouldn't be implemented, mark it as such in tests.toml. For example:

    [1e22cceb-c5e4-4562-9afe-aef07ad1eaf4]
    description = "some test that will not be implemented for this track"
    include = false
    comment = "Not included because <reason>"

    When editing the Java tests, make sure to:

    Follow the coding style used in the existing test file.
    Use the test description from the tests.toml file as name of the test method (unless that would invalidate the first rule).
    Keep the order of the tests in the Java test file the same as they are in the tests.toml file (unless that would invalidate the first rule).

    Step 2.3 Check that the example solution works with new test cases

    After modifying the Java tests, run this command from the exercises directory to run them:

    ./gradlew practice:<exercise-slug>:test

    If it fails, double-check if the new tests are correct. If they are, that means our example solution for this exercise is no longer valid for the new tests and needs to be updated!

    When adding a completely new function that students need to implement, or when changing the return types of an existing one, make sure to also update the stub file.

    Step 2.4 Remove deprecated files

    Previously the version of each practice exercise was tracked through a .meta/version file. This is no longer being used, so please delete it after syncing an exercise with the problem-specifications.

    Resources

    Need help?

    Configlet docs
    General track docs
    Don't hesitate to ask here in case you can't find answers to your questions!

  2. xinri commented on Nov 19, 2025

    @xinri
    Contributor

    @kahgoh and @jagdish-15 is it possible to relaunch the configlet and see if everything had been fixed here?

  3. jagdish-15 commented on Nov 19, 2025

    @jagdish-15
    Member

    You can always run the command locally! Just use bin/configlet sync --tests (or .\bin\configlet sync --tests on Windows)

  4. xinri commented on Nov 19, 2025

    @xinri
    Contributor

    great, thanks. I will try.

    Edit: good for me:
    Image

  5. changed the title [-]馃毃 configlet sync --test found unsynced tests[/-] [+]馃毃 configlet sync --test found unsynced tests (renaming to fix github indexing)[/+] on Jun 19, 2026
  6. changed the title [-]馃毃 configlet sync --test found unsynced tests (renaming to fix github indexing)[/-] [+]馃毃 configlet sync --test found unsynced tests[/+] on Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions