Closed SaturnIC closed 8 months ago
Hello,
It can be that your tests are depending on each other and thats why it's flaky and not because of this extension. You can try command line with shuffle to reproduce the same issue. You can try running the same command line with filter the extension does and figuring out why your tests are flaky.
This filtering feature is a base of other features which would not work so I need solid proof it is not working properly to start to work on some alternatives.
Let me know if you found the issue or need more advice, meanwhile I don't consider this an issue of the extension.
Yes the tests are dependent, but the vscode extension M U S T not change the order of running those tests, by using filters underneath the hood the cause a random execution order.
The order of executing the tests through VSCode should be the same as executing the tests without any filters.
Only beginners care about some arbitrary rules. ("Clean Code" is an egregious example for the harm caused by baseless philosophy being pushed with religious fervor)
Software is all about predictability and deterministic behavior.
And vscode gtest extension shuffling execution orders is an issue that must be fixed.
GoogleTest framework does not define execution order (if I'm correct), therefore developers should not depend on it.
The order is fixed after compilation of the tests, so run them in the order they have been set in the binary.
Checklist
Describe the bug
--gtest_filter=<test-suite>.<test-case>:...
parameters for every single test case(!) Running the test suite on the cli with the same filter parameters causes tests to fail on the cli as well--gtest_color=no
parameter, disabling this parameter on the CLI lets only 1/300 fail--gtest_filter=* --gtest_color=no
lets all tests pass => The gtest_filter parameter with many positive filter strings seems to cause flaky tests