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

[EIM-104] [Test] Automated test refactor #87

Merged
merged 19 commits into from
Jan 24, 2025

Conversation

Fabricio-ESP
Copy link
Collaborator

@Fabricio-ESP Fabricio-ESP commented Jan 21, 2025

Description

Test automation infrastructure refactor. The actual tests steps are miantained but with this PR starting this tests are concentrated into a ingle test runner script.
The script is launched using different entry codes which will use JSON files as test suite instructions.
The test parameters are defined in the files located at ./src/tests/runs/suites

The tests are launched directly from npm scripts, so the bash/powershell scripts have been removed.

To create new tests runs, with different set of parameters it is only necessary to add a new entry in the json file. Future test suite expansion will use this structure by creating new test types, or appending test cases to the current scripts.

CI

The workflow setup is currently running the "basic" test and "extended" test on all runners. The intent is to split this into different workflows and have the basic tests running for all PRs, and the extended test only focusing on release testing. The exact distinction will be defined later.

Test Reports

For each test runs, reports are published back into the workflow page for easier readability, note the example below.
image

Known issues

The failing tests are already documented.

Related

Testing


Checklist

Before submitting a Pull Request, please ensure the following:

  • 🚨 This PR does not introduce breaking changes.
  • All CI checks (GH Actions) pass.
  • Documentation is updated as needed.
  • Tests are updated or added as necessary.
  • Code is well-commented, especially in complex areas.
  • Git history is clean — commits are squashed to the minimum necessary.

Copy link
Collaborator

@Hahihula Hahihula left a comment

Choose a reason for hiding this comment

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

One more thing is that I would probably unify the three 'runs' and take the json filename as param. because it's just duplicate code, but otherwise it's looking good.

reporter: mocha-json
fail-on-empty: "true"

# publish-test-results:
Copy link
Collaborator

Choose a reason for hiding this comment

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

forgotten ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed.

logger.info("Installation completed");
testRunner.output = "";
testRunner.sendInput("n");
// expect(
Copy link
Collaborator

Choose a reason for hiding this comment

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

forgotten?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed my mind about adding a test there. Removed.

Copy link
Collaborator

@Hahihula Hahihula left a comment

Choose a reason for hiding this comment

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

LGTM!

@Fabricio-ESP Fabricio-ESP merged commit 08d8af2 into master Jan 24, 2025
9 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants