mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[GH-ISSUE #2928] [feature]: Running tests with Hoppscotch CLI in order #946
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#946
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @LuchoTurtle on GitHub (Feb 22, 2023).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/2928
Is there an existing issue for this?
Summary
Hey there, Hoppscotch team! 👋
Thanks for the amazing work put on so far!
I'm using the
Hoppscotch CLIto run some tests in Github Actions (hopp test).I've run
hopp testquite a few times and the execution flow of each test seems to be absolutely random. Shouldn't the tests be running in the same order that they appear in thejsonfile that is exported/in the GUI? This is a bit frustrating because some tests require the correct execution of others and having no control of the execution order is a bit underwhelming.For example, I have three folders with several requests in each one:
The tests are executed in the order of
Tags->Timers->Items.Inside each folder, the tests are run sequentially.
Is this behaviour intentional?
Why should this be worked on?
I believe the simplest solution would be running the tests in the same order they are displayed in the GUI/exported to the
jsonfile.I think this is important for people who want to use this CLI to make API definition tests.
@cpanten commented on GitHub (Aug 30, 2023):
The issue is related to the collectionstack in

hoppscotch-cli/src/utils/collections.ts.A stack is a last-in first-out collection. So, the last pushed folder is used as next step to do.
I am not a ts developer. Would be nice if an ts expert could take a look on that.
Many thanks in advanced.
@supriyahegde commented on GitHub (Jun 12, 2024):
Hi Team,
@AndrewBastin @liyasthomas
We are also facing this issue with CLI that it doesnt run the tests in the order it is saved in the collection file.
Could you please fix this issue.
Thanks,
Supriya
@jamesgeorge007 commented on GitHub (Nov 28, 2024):
The proposed behaviour update has been implemented in #4475 and released with Hoppscotch CLI v0.13.0.