[FEATURE REQUEST] Control order in which Unit tests are executed
See original GitHub issueDescribe the bug I have multiple unit tests in a test suite and these need to be in a certain order, so have information available in the next request. When I execute this with the cli tool, this doesn’t follow the order from the GUI.
I know in theory unit tests shouldn’t depend on each other, but with the current way of running multiple requests, you have no clear view which requests are bering executed due to the use of the name.
To Reproduce Steps to reproduce the behavior:
- Go to ‘Test’
- Create a new test suite
- Create 4 or 5 tests with a incrementing number in it’s name
- Execute the test-suite
- See different order of unit tests
Expected behavior The order with the CLI should be the same as in the GUI.
Screenshots
General
✓ Returns 200 (1585ms)
1) Returns 200
✓ Returns 201 (305ms)
2) Returns 200
2 passing (2s)
2 failing
1) General
Returns 200:
Error: No responses for request
2) General
Returns 200:
Error: No responses for request
The third test (201) should have run second.
Desktop (please complete the following information):
- OS: macOS 10.15.6
- Installation Method: dmg and yarn
- App Version: 2020.3.3 and 2.2.22
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Controlling execution order of unit tests in Visual Studio
An orderedtest a text file that lists your tests in the order they should be executed. · The test execution order is respected...
Read more >Order unit tests - .NET - Microsoft Learn
With MSTest, tests are automatically ordered by their test name. Note. A test named Test14 will run before Test2 even though the number...
Read more >xUnit: Control the Test Execution Order - Hamid Mosalla
In this post I'm going to discuss how we can control the Test Execution Order using xUnit framework by using ITestCollectionOrderer and ...
Read more >JUnit Test Execution Order: Order Of Tests JUnit 4 Vs JUnit 5
The test methods don't follow a specific order by default. The test cases need not necessarily execute in the order in which they...
Read more >The Order of Tests in JUnit - Baeldung
In JUnit 5, we can use @TestMethodOrder to control the execution order of tests. We can use our own MethodOrderer, as we'll see...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
To me it would be a great if:
1.- Insomnia-cli run tests sequentially and in a known order (as insomnia now do) 2.- Insomnia allows to manually reorder tests
This would make test configuration much simpler, reducing the need to deal with javascript code and obscure request ids.
Maybe what insomnia calls “test” could be renamed to “test step” or “api call” or something similar, and what insomnia calls “test suite” could be renamed simply a “test” … what do you think?
Hey All, this one is a critical one for my current case as well, where we have an ordered flow to validate each step of an onboarding api, something like:
Where each call needs to be made in sequence as running the steps out of order wouldn’t work, so we need guaranteed ordering in some way.