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

refactor(test_utils): Refactor test_utils crate and add folder support with updated documentation #2487

Merged
merged 11 commits into from
Oct 10, 2023

Conversation

pixincreate
Copy link
Member

@pixincreate pixincreate commented Oct 7, 2023

Type of Change

  • New feature
  • Enhancement
  • Refactoring
  • Documentation
  • CI/CD

Description

This PR completely refactors Rustman (newman-fork within Rust wrapper) that aims to de-clutter the runner thereby making it more readable and intuitive. Also, added support for running folders individually instead of running the whole thing every time (If the folder that you wish to run does not contain QuickStart folder, it will be added automatically during run-time to avoid Unauthorized errors).
In addition to this, documentation has also been updated w.r.t the changes done.

Motivation and Context

This had to be done as many of the developers who were affected asked for it.
The main issue was that, if the Postman CI checks failed, there exist no way to do a RCA in an instant. You're forced to -- Manually check the failure point from the available logs from the CI, import the collection in Postman, run QuickStart followed by the folder causing the problem or anything as such since you cannot run individual folders through Test Utils (Rustman).
Increased complexity in main.rs forced me to move it to another file.

How did you test it?

Ran a specific folder and it worked without any issues:
image
image

Ran Stripe collection:
image

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code

@pixincreate pixincreate added A-CI-CD Area: Continuous Integration/Deployment C-doc Category: Documentation updates C-feature Category: Feature request or enhancement S-waiting-on-review Status: This PR has been implemented and needs to be reviewed C-refactor Category: Refactor C-test Category: Tests labels Oct 7, 2023
@pixincreate pixincreate added this to the September 2023 Milestone milestone Oct 7, 2023
@pixincreate pixincreate self-assigned this Oct 7, 2023
@pixincreate pixincreate requested a review from a team as a code owner October 7, 2023 11:16
crates/test_utils/README.md Outdated Show resolved Hide resolved
crates/test_utils/README.md Outdated Show resolved Hide resolved
crates/test_utils/src/newman_runner.rs Outdated Show resolved Hide resolved
crates/test_utils/src/newman_runner.rs Outdated Show resolved Hide resolved
crates/test_utils/src/newman_runner.rs Outdated Show resolved Hide resolved
@SanchithHegde SanchithHegde added this pull request to the merge queue Oct 10, 2023
Merged via the queue into main with commit 6b52ac3 Oct 10, 2023
10 checks passed
@SanchithHegde SanchithHegde deleted the pmrunner-refactor branch October 10, 2023 10:36
@pixincreate pixincreate removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Oct 10, 2023

newman_command.arg("--delay-request").arg("7"); // 7 milli seconds delay

newman_command.arg("--color").arg("on");
Copy link
Contributor

Choose a reason for hiding this comment

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

It will be a good idea to expose all postman run options via this CLI - might be useful at some time. things like delay-request and timeout would be useful.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure! I'll raise another PR soon addressing this since this is already merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CI-CD Area: Continuous Integration/Deployment C-doc Category: Documentation updates C-feature Category: Feature request or enhancement C-refactor Category: Refactor C-test Category: Tests
Projects
No open projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

5 participants