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] Improve modularity of test cases implementation #1861

Closed
martin-mat opened this issue Jan 23, 2024 · 3 comments
Closed

[Feature] Improve modularity of test cases implementation #1861

martin-mat opened this issue Jan 23, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@martin-mat
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
Test case implementation contains code that is repeated/duplicated across tests or have unnecessary dependency on test information on other part of the code. Examples:

  • test category for certification. This is defined on 2 places - as a tag in points.yml and ten also as an emoji on several places in test case implementation in a string that needs to be printed out in case of test pass/fail/skip. In case that one needs to change test category, they need to change in on all those places.
  • Emojis in test case implementation. In every test case it needs to be explicitly put a ✔ emoji when PASSED, ✖ when failed etc... along with other reporting decorations. When one wants to change how tests are reported, it needs to be changed in every test case. Redundacy is a "good" base for inconsistency.
  • time reporting using task_start_time repeats for each test case
  • test case/test category emoji handling repeats for each test case

Describe the solution you'd like
Improve test case implementation and reporting modularity. Avoid information redundancy in code as much as possible. Aoid need for copy/pasting as much as possible. Use more modularity/classes.

Describe alternatives you've considered
An alternativu woul be to keep the code as it is. However it is a pain to add or change a test case with keeping everything consistent.

**How will this be tested? aka Acceptance Criteria (optional) **
full regression test run pass

(optional: unnecessary for things like some version bumps etc.)

Once this issue is addressed how will the fix be verified?
full regression test run pass

Additional context

@martin-mat martin-mat added the enhancement New feature or request label Jan 23, 2024
@martin-mat
Copy link
Collaborator Author

Hello, @agentpoyo, can you please assign this one to me? I'm already work in progress with that and about to propose a change for review.

martin-mat added a commit to martin-mat/cnf-testsuite that referenced this issue Jan 26, 2024
Signed-off-by: Martin Matyas <martin.matyas@gmail.com>
@martin-mat
Copy link
Collaborator Author

@wavell @denverwilliams @agentpoyo please review (do not merge for now, see PR cncf#1867 description).

@agentpoyo
Copy link
Collaborator

@wavell @denverwilliams @agentpoyo please review (do not merge for now, see PR #1867 description).

I updated the title to be "WIP". You can also create "Draft" pull requests to prevent merges.

@lixuna lixuna moved this to In Progress in CNTI Test Catalog Feb 12, 2024
martin-mat added a commit to martin-mat/cnf-testsuite that referenced this issue Feb 15, 2024
Signed-off-by: Martin Matyas <martin.matyas@gmail.com>
martin-mat added a commit to martin-mat/cnf-testsuite that referenced this issue Feb 20, 2024
Signed-off-by: Martin Matyas <martin.matyas@gmail.com>
martin-mat added a commit to martin-mat/cnf-testsuite that referenced this issue Feb 20, 2024
Signed-off-by: Martin Matyas <martin.matyas@gmail.com>
martin-mat added a commit to martin-mat/cnf-testsuite that referenced this issue Feb 27, 2024
Signed-off-by: Martin Matyas <martin.matyas@gmail.com>
HashNuke added a commit that referenced this issue Feb 28, 2024
Modularize implementation of tests #1861
@github-project-automation github-project-automation bot moved this from In Progress to Done in CNTI Test Catalog May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants