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

Test specification refactor #884

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Test specification refactor #884

wants to merge 3 commits into from

Conversation

mattiaswal
Copy link
Contributor

@mattiaswal mattiaswal commented Jan 10, 2025

Description

Build test specification from a suite file instead of parsing directory tree.

If a test should be skipped when generate test specification:

- case: meta/wait.py
  infamy:
    specification: False

If running the same test twice with different parameters add new suite in the test directory.
Example:

- name: testX
  case: test.py
  opts: ["--data", "testX"]
  infamy:
    title: The testX test case

- name: testY
  case: test.py
  opts: ["--data", "testY"]
  infamy:
    title:  The testY test case

If specify title it will be used instead of the one in the docstring in the test-code.

Checklist

Tick relevant boxes, this PR is-a or has-a:

  • Bugfix
    • Regression tests
    • ChangeLog updates (for next release)
  • Feature
    • YANG model change => revision updated?
    • Regression tests added?
    • ChangeLog updates (for next release)
    • Documentation added?
  • Test changes
    • Checked in changed Readme.adoc (make test-spec)
    • Added new test to group Readme.adoc and yaml file
  • Code style update (formatting, renaming)
  • Refactoring (please detail in commit messages)
  • Build related changes
  • Documentation content changes
    • ChangeLog updated (for major changes)
  • Other (please describe):

@mattiaswal mattiaswal marked this pull request as draft January 10, 2025 13:44
@mattiaswal mattiaswal force-pushed the test-spec-ng branch 3 times, most recently from d90dbe1 to 78fbc3f Compare January 10, 2025 20:17
@mattiaswal mattiaswal added the ci:main Build default defconfig, not minimal label Jan 10, 2025
@mattiaswal mattiaswal changed the title Test spec ng Test specification refactor Jan 10, 2025
All test added parameters is required and no default behaviour is allowed.
The suite can also contain meta data for the test specification,
One meta data that is implemented is title, which is used when the
same test code is used twice with parameters.

Also if a test case should not be present in the test specification
for some case. You can add specification: False as meta data.
@mattiaswal mattiaswal requested review from troglobit and wkz January 10, 2025 20:43
@mattiaswal mattiaswal marked this pull request as ready for review January 10, 2025 20:43
Copy link
Contributor

@troglobit troglobit left a comment

Choose a reason for hiding this comment

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

Great work on this, amazing improvement for Infamy! ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:main Build default defconfig, not minimal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants