Hello, for our Python code base, we are using pytest to write tests. We want to insure that Sonarqube reports coverage above 75%, but for certain classes, we dont directly instantiate the classes or call their methods.
Instead, based on reading an input file, we compute which class to instantiate and then call a method in that class.
So if code coverage in Sonarqube does a static analysis of the tests to see what they are calling, then it will not see any code instantiating instances of those classes.
On the other hand, if Sonarqube detects what code paths were executed when the test ran, after the test did run, then it will notice that a certain code path was covered by the test based on its response to the input file.