Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Update the Test Selection With Pydantic & Remove TestRunConfig #16

Draft
wants to merge 8 commits into
base: spring2025
Choose a base branch
from

Conversation

antonio-amjr
Copy link
Contributor

Currently, the Test Selection uses a set of dictionaries to store the tests chosen by the user.

This change removes that set of dictionaries replacing by objects with Pydantic's BaseModel, since Pydantic brings some advantages.

Fixes: project-chip/certification-tool#64

This change is considering: #6

Warning: This may impact the Frontend side, since the JSON request data sent to the Backend's API (createTestRunExecution).

The current JSON data format being used is:

 "selected_tests": {
    "SDK YAML Tests": {
      "FirstChipToolSuite": {
        "TC-ACE-1.1": 1
      },
      "FirstManualSuite": {
        "TC-ACT-2.1": 1,
        "TC-ALOGIN-12.2": 1
      },
      "FirstAppSuite": {
        "TC-CC-2.2": 1
      }
    }
  }

Now the new JSON data format would be:

"selected_tests": {
    "collections": [
      {
        "public_id": "SDK YAML Tests",
        "test_suites": [
          {
            "public_id": "FirstChipToolSuite",
            "test_cases": [
              {"public_id": "TC-ACE-1.1", "iterations": 1},
              {"public_id": "TC-ACL-1.1", "iterations": 1}
            ]
          }
        ]
      },
      {
        "public_id": "python_tests",
        "test_suites": [
          {
            "public_id": "OnboardingPayloadTestSuite",
            "test_cases": [
              {"public_id": "TC-DD-1.1", "iterations": 1}
            ]
          }
        ]
      }
    ]
  }

Copy link
Contributor

@ccruzagralopes ccruzagralopes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if you remembered this, but you'll probably need to update CLI as well

app/crud/crud_test_run_execution.py Outdated Show resolved Hide resolved
@antonio-amjr
Copy link
Contributor Author

antonio-amjr commented Nov 6, 2023

I don't know if you remembered this, but you'll probably need to update CLI as well

No, I was not remembering. I'll take a look. Thanks

@antonio-amjr
Copy link
Contributor Author

@ccruzagralopes @mikaelhm The CLI PR change was created:
project-chip/certification-tool-cli#4

Please review when possible. Thanks

@antonio-amjr antonio-amjr force-pushed the feature/update_test_selection_to_use_pydantic branch 2 times, most recently from 173ed54 to c1945a0 Compare November 20, 2023 14:15
@antonio-amjr antonio-amjr force-pushed the feature/update_test_selection_to_use_pydantic branch from c1945a0 to dd71236 Compare November 22, 2023 20:04
@antonio-amjr antonio-amjr changed the base branch from main to v1.3-TE1 November 22, 2023 20:07
@antonio-amjr antonio-amjr changed the title [Feature] Update the Test Selection To Use Pydantic [Feature] Update the Test Selection With Pydantic & Remove TestRunConfig Nov 22, 2023
@antonio-amjr antonio-amjr force-pushed the feature/update_test_selection_to_use_pydantic branch from 770a995 to be1f18d Compare November 29, 2023 19:47
@antonio-amjr antonio-amjr changed the base branch from v1.3-TE1 to main November 29, 2023 19:51
@antonio-amjr antonio-amjr force-pushed the feature/update_test_selection_to_use_pydantic branch from 109cab1 to 8707de0 Compare November 30, 2023 16:55
@raul-marquez-csa
Copy link
Contributor

Addressed in PR
Updates test_run_executions test selection JSON payload to Pydantic's BaseModel format #16

@hiltonlima
Copy link
Contributor

Please target to branch spring2025

@rquidute rquidute changed the base branch from main to spring2025 October 23, 2024 13:10
@hiltonlima hiltonlima marked this pull request as draft October 23, 2024 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v1.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update TestSelection to use Pydantic
6 participants