matepek / vscode-catch2-test-adapter

Catch2, Google Test and doctest Adapter for the VSCode
https://marketplace.visualstudio.com/items?itemName=matepek.vscode-catch2-test-adapter
MIT License
209 stars 52 forks source link

Implicit gtest_filter fails when running 300 tests #423

Closed SaturnIC closed 8 months ago

SaturnIC commented 8 months ago

Checklist

Describe the bug

matepek commented 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.

SaturnIC commented 3 months ago

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.

matepek commented 3 months ago

Point 2

SaturnIC commented 3 months ago

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.

matepek commented 3 months ago

GoogleTest framework does not define execution order (if I'm correct), therefore developers should not depend on it.

SaturnIC commented 3 months ago

The order is fixed after compilation of the tests, so run them in the order they have been set in the binary.